aspose 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
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: 86
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30780
    
157

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
 
jQuery in Action, 2nd edition
 
subject: singleton stateless session bean in EJB 2.0