aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Stateless Session Bean  Problems Singleton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Stateless Session Bean  Problems Singleton" Watch "Stateless Session Bean  Problems Singleton" New topic
Author

Stateless Session Bean Problems Singleton

seshu Palamanti
Ranch Hand

Joined: Jul 03, 2004
Posts: 59
Hi Every one,
We have a caching service which uses a JBoss Tree Cache class, its like we can put and get object out the cache. We wanted remote users to use this service so we added a state less bean in front of the Caching Tree Class, The state of the Tree Cache class is taken care by Spring Core so which defaults to singleton , so clients get a hold of Tree using a session bean (stateless) call put an object, we can do all the operations on cache like put and get with in a single session bean call but when we put an object in one call and try to retrieve it in another I get a null. I know that stateless session beans are there to forget the state, but if it interfaces a class object whose state is maintained by spring and defaults to singleton there should be no problem, but when we run some test cases it wont work, it works fine in one session bean call, but when I put and get an object in two different calls it fails and I get a null value. Hope I was able to explain the design here, the main question after this would be how can we get a stateless session bean to get hold of a bean which is singleton? In multiple calls.

Any help would be appreciated.
Thanks in advance.
Regards
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

"Seshu",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with display names get deleted.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stateless Session Bean Problems Singleton