EJB Session Bean sharing common resource

S

soccer

Hi all,

I am new to EJB and I am now using JBOSS to do some development.

I have written a stateless session bean and I would like to know if the
bean is thread safe. Since, my session bean has a static object, I
would like to have all my bean instances sharing a common object. My
guess is each session bean is not thread safe. So, can anyone give me
some suggestion to get around this problem.

The idea is I would like to have all instances of my session bean to
share a common resource. The common resource may be a huge byteBuffer
(I don't want all my bean instance has its own copy for space reason)
or it has a socket to communicate with another process outside of the
VM.

I really want to use the best option available to tackle this problem,
then I will have a better understanding how EJB works.

Thanks!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top