• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I access ServletContex from EJB Session bean  RSS feed

 
Narcom Mocran
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I access ServletContext from EJB Session bean, both located on the same application server (GlassFish).

I make some init in servlet container(Tomcat), authorization(Shiro+Spring) and want to access this information from EJB session bean.
I have GUI java application on client side.

How can I do this?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to pass whatever state you hold in the ServletContext to your EJB application, or put it in somewhere that is shared e.g. JNDI (ServletContext cannot be directly shared with an EJB application).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!