Does EJB archtictures supports static data members like
the stadard object orineted architectrue does?
Can I use static members to store data shared between
all beans and if not what's the right way to do so?
-
static members (2 messages)
- Posted by: Ofer Shchori
- Posted on: August 13 2000 07:34 EDT
Threaded Messages (2)
- static members by chris bono on August 13 2000 12:19 EDT
- static members by Kumar Mettu on August 13 2000 16:15 EDT
-
static members[ Go to top ]
- Posted by: chris bono
- Posted on: August 13 2000 12:19 EDT
- in response to Ofer Shchori
Ofer,
Statics that are not idempotent should not be used in EJB. The reason is that a static is unique for that class per JVM. So if you are clustering, then each JVM will have a copy of the static and it therefore will not be static. It could eat your lunch. This is what I understand the reasoning to be.
Workarounds could be to have an RMI singleton, if that is what you are attempting to do. We have also stored static data in JNDI, which the entries will be replicated over clustered environment.
Chris -
static members[ Go to top ]
- Posted by: Kumar Mettu
- Posted on: August 13 2000 16:15 EDT
- in response to Ofer Shchori
You can only use static final data members.