Another reason might be that transaction and security contexts may not be
propagated to the child threads.  Also, the jca 1.5 spec goes to some pains
to prevent 2 threads that import the same transaction from running at once:
in general the effects of running several threads within one transaction
may be difficult to predict, and I think it is appropriate to internally
prevent more than one thread working within a transaction as well.

thanks
david jencks

On 2002.09.22 09:30:42 -0400 Rick LaBanca wrote:
> I think a session bean doing threads is not encouraged, but accessing
> something else that happens to be threaded could be ok. In my testing it
> is
> ok in jboss right now anyway, I do spawn off threads for multiple
> requests.
> 
> I really don't understand the restriction anyway. So long as your
> response
> to a call in a session bean blocks until all internal threads are done, I
> can't see why the server would care.
> 
> I think what they mean to restrict is a bean spawning a thread, then
> returning he original call while it runs. Then the container could try to
> passivate something really running. So using threads within one blocking
> call of a bean should be safe. Wish it was clearer.
> 
> In fact I wish they would just allow it for those that need it in the
> case I
> mentioned too. All they need do is has a call to either poll a bean to
> see
> if it's active or not, or have the bean do callbacks to indicate when
> it's
> idle (no threads running).
> 
> Rick
> 
> 
> 
> > Isn't accessing threading facilities a no no in session beans? If you
> > have a deamon like service then I assume that it's multi threaded, so
> is
> > calling your singleton in effect breaking the ejb rules?
> >
> > How do other people deal with this. I've recently had the need to
> access
> > a file based content store from session beans and considered creating a
> > jca module. Is this the right way to do it?
> >
> > -k.
> >
> 
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to