my dog learned polymorphism*
The moose likes EJB and other Java EE Technologies and the fly likes singleton stateless session bean in EJB 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "singleton stateless session bean in EJB 2.0" Watch "singleton stateless session bean in EJB 2.0" New topic
Author

singleton stateless session bean in EJB 2.0

Ravi Bansal
Ranch Hand

Joined: Aug 18, 2008
Posts: 84
Is it possible to have singleton session bean in EJB 2.0 by applying the singleton pattern on session bean ? will there be any issues with this ? or its totally upto the container to manage the number of bean instances ?

I know EJB 3.0 have provided some special annotations to specify the session bean as singleton . Just wanted to know if something similiar is available in EJB 2.0


SCJP 5.0 94%
OCE-EJBD 90%
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30353
    
150

No. The closest you could get is to have a stateless session bean with a pool size of 1. But you shouldn't be storing things in that bean anyway.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: singleton stateless session bean in EJB 2.0