[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    Re: [JBoss-user] is there Global Context in Enterprise Beans..
From:       Guy Rouillier <guy-rouillier () speakeasy ! net>
Date:       2003-03-31 19:17:28
[Download RAW message or body]

Magesh Prabhu wrote:
> 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
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic