This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stateless Session EJB saving at ServletContext?

 
Pearlo Muthukumaran
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a stateless session EJB deployed in JBoss 3.0.2 and a normal clinet written for testing the EJb works perfectly. Now I am building a web interface factoring the design MVC way.
Could somebody tell me whether it is the best practise to put the session bean at the ServletContext?
Will this improve the application performance?
ie I would like to do something like
MyEJB a = MyEJBHome.create();
this.getServletContext().setAttribute("MY_SESSION_BEAN",a);
within the init method of the first servlet invoked within the application and all other servlets make use of this object - a of type MyEJB for further method invocations.
Please respond from the performance point of view.
Thanks in advance
Kala
 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello

i don't think it will generate any performance problem!
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic