[JBoss Portal] - Re: Loss of Session Attributes
by thomas.heute@jboss.com
This is how it's supposed to be.
Sessions are scoped per web application. See the Servlet spec:
anonymous wrote :
| "SRV.7.3 Session Scope
| HttpSession objects must be scoped at the application (or servlet context) level.
|
| The underlying mechanism, such as the cookie used to establish the session, can be the same for different contexts, but the object referenced, including the attributes in
| that object, must never be shared between contexts by the container.
| To illustrate this requirement with an example: if a servlet uses the RequestDispatcher to call a servlet in another Web application, any sessions created for and visible to the servlet being called must be different from those visible to the calling servlet.
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041288#4041288
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041288
17 years, 8 months
[EJB 3.0] - Re: Differences in EJB3
by snau2005
I'll try to answer, but do not trust my words 100% - I'm not an expert.
EJB 2.1 its old so do not learn old technology that for sure.
EJB 3.0 is a standard, it was made by Sun, hibernate, jboss etc (check sun page for details). But in creating EJB hibernate as I know was involved a lot of. But hibernate also made it's own API, annotanions, but almost the same.
Jboss implementation is on top of hibernate engine. That means that if you call some of ejb function or use some ejb annotation you in reality call hibernate.
But EJB 3 does not have some features which hibernate have.
So normally I code everything using EJB 3, but I need some extra feature or something I'm using hibernate annotations or functions. You can always switch from EJB layer to hibernate (example:
| import org.hibernate.Session;
| import javax.persistence.EntityManager;
|
| @PersistenceContext (unitName="blabla")
| protected EntityManager em;
|
|
| Session session = ((Session)em.getDelegate());
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041284#4041284
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041284
17 years, 8 months