[JBoss-user] [EJB/JBoss] - Re: Removing a Stateless Session Bean

2004-11-04 Thread jorge_el_curioso
Thanks James.

I guess maybe I should explain a bigger picture.  I have a singleton that may be 
accessed by multiple threads.  There are functions in this object that use a stateless 
bean.  Because this is a singleton, different threads would be sharing the same 
reference to the bean.

Now, is this scenario even a good idea?  Or should I synchronize all accesses to the 
bean?  Or maybe JBoss already does the synchronization?

A specific example:  Let's say the bean reference is x.  x is a variable shared by two 
threads.  If you call x.doSomething() from one thread and at the same time call 
x.doSomethingElse() from another thread.  What can we assume or not assume about what 
might happen?

Thanks!
Brian

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853920#3853920

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853920


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Removing a Stateless Session Bean

2004-11-03 Thread jorge_el_curioso
Hi,

I am using Jboss 3.0.2, and I have two questions.

1.
Suppose you have a Stateless Session Bean and two threads sharing a reference to it.  
If while thread A is waiting for a remote method to finish, thread B calls remove() on 
the Bean, what would happen to thread A?

The answer I'm hoping for is that the method call on thread A will run its course and 
not fail with some (unexpected) exception.

2.
If you repeatedly call remove(), and the create() on a Home interface for a Stateless 
Session Bean, say once a minute, should I be concerned that garbage might accumulate 
on the server side?

Thanks!
Brian

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853807#3853807

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853807


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user