Hi,
I'm declaring a session bean as stateless in deployment descriptor and then also am declaring a member variable for that bean. How the container will treat this bean as? Statefull or Stateless?
I'm using weblogic 8.1.
Thanks,
Jay Khimani
-
Sateless Beans With Member Variables (5 messages)
- Posted by: Jay Khimani
- Posted on: April 25 2005 00:29 EDT
Threaded Messages (5)
- Sateless Beans With Member Variables by Veerabahu Ponambalam on April 25 2005 02:31 EDT
- Sateless Beans With Member Variables by Aaron Craven on April 25 2005 09:42 EDT
- Sateless Beans With Member Variables by Jay Khimani on April 25 2005 11:11 EDT
-
Sateless Beans With Member Variables by OttO LOttO on April 25 2005 04:25 EDT
- Sateless Beans With Member Variables by Jay Khimani on April 26 2005 02:23 EDT
-
Sateless Beans With Member Variables by OttO LOttO on April 25 2005 04:25 EDT
- Sateless Beans With Member Variables by Jay Khimani on April 25 2005 11:11 EDT
-
Sateless Beans With Member Variables[ Go to top ]
- Posted by: Veerabahu Ponambalam
- Posted on: April 25 2005 02:31 EDT
- in response to Jay Khimani
The container will treat as a Staleless bean. The member variable value may be corrupted since it is a staless bean. -
Sateless Beans With Member Variables[ Go to top ]
- Posted by: Aaron Craven
- Posted on: April 25 2005 09:42 EDT
- in response to Jay Khimani
...declaring a session bean as stateless in deployment descriptor and then also am declaring a member variable for that bean...
I have to ask: why? -
Sateless Beans With Member Variables[ Go to top ]
- Posted by: Jay Khimani
- Posted on: April 25 2005 11:11 EDT
- in response to Aaron Craven
Well reason is, i want to store some static variable like logger and some config managers.
After going through some articles and design contracts of SLSB, I think there should not be any problem as of I'm not maintaining any user specific data.
Thanks,
Jay Khimani -
Sateless Beans With Member Variables[ Go to top ]
- Posted by: OttO LOttO
- Posted on: April 25 2005 16:25 EDT
- in response to Jay Khimani
Well reason is, i want to store some static variable like logger and some config managers. After going through some articles and design contracts of SLSB, I think there should not be any problem as of I'm not maintaining any user specific data.Thanks,Jay Khimani
store some static variables in Stateless Beans? EJBs were designed to be distributed, how could you manage static variables in several JVMs? -
Sateless Beans With Member Variables[ Go to top ]
- Posted by: Jay Khimani
- Posted on: April 26 2005 02:23 EDT
- in response to OttO LOttO
Well this is the point which I missed. thanks for this point. static wont work with clusters. For this reason have changed my static member variables to non-static variables.