• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Global variables in SessionBeans?

 
Murali Mohan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Can we declare global variables in stateless and stateful session beans? How does container handles it?
Regards,
Murali
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohan,
The answer to this question is no. Non-final static variables are not allowed in any EJB.
The questions you are asking are very basic -- I understand that you are just starting out with EJB's, and that's great -- but all of the answers to these questions can be found in any of the basic texts on EJB's. I suggest you either read Ed Roman's "Mastering EJB" (which is available online at the ServerSide) or you buy a copy of Richard Monson-Haefel's "Enterprise JavaBeans".
Kyle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic