Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?

Luigi Viggiano

You can pass the HttpSession as parameter to an EJB method, only if all objects in session are serializable.

This has to be consider as "passed-by-value", that means that it's read-only in the EJB. If anything is altered from inside the EJB, it won't be reflected back to the HttpSession of the Servlet Container.

The "pass-by-reference" can be used between EJBs Remote Interfaces, as they are remote references.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact