static members


EJB design: static members

  1. static members (2 messages)

    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?

    Threaded Messages (2)

  2. static members[ Go to top ]

    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.

  3. static members[ Go to top ]

    You can only use static final data members.