-
Jul 8th, 2012, 06:23 AM
#1
Maange beans as sessions via the container
I am using Spring3.1
My application will have kind of bean-manager.
That manager will be able to retrieve request and on each request I need to create new instance of bean dynamically which will be initiate with it's own unique params.
The params will be retrieved via the request method.
This bean must be alive and work asynchronously. (For example it will listen to jms calls, execute methods by demand and so on..)
Moreover I want to have the option to destroy beans also.
Those bean could be resemble as sessions so when the user log off i will destroy those beans.
I understand that I have to create some kind of bean-list or beans pool and manage it with some kind of manager.
How can I create those beans dynamically and have them remain them alive until I destroy them?
When I say user session - it is in the user session but it's not through web/http. the user will connect else where via some protocol and I will have to create a new session and manage it until the user log off and then I will kill the bean by myself.
Any idea how could I implement such thing?
* Is my case equal to stateless or statefull in EJB?
thanks,
ray.
Last edited by ray.frid; Jul 9th, 2012 at 02:34 AM.
Reason: Making my target clear.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules