Hi guys,
Is there a global context in Enterprise beans where I can store a HashTable which can be shared by all the enterprise beans.
Basically, what I'm looking for is a in memory Object which can be accessed from many enterprise beans.
Please tell me some suggestions to do this.
Not sure what you mean by "global context", but you can do put the hash table whereever you choose in your JNDI tree, and any EJBs can look it up in that location, just like they look up anything else. Write an MBean that puts the hash table into JNDI using bind. I did this by looking at the example MBean. Another option to consider, however, rather than have the EJBs access the hashtable directly and perhaps encounter write collisions, is to provice access functions in the MBean, and have the EJBs call those access functions. Then the MBean can take care or synchronization as necessary.
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
