File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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: 30085
    
149

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
 
Similar Threads
Does WL10 deploy both EJB2.0 and EJB3.0
Message driven beans
Deleting EJB from container cache?
EJB 5.0 & Entity Bean
EJB3 and the Singleton