Hi Adrian,

Thanks for the reply.

I had already try your ping/noop solution for testing if a stateful bean is
alive.
But here I came on the other error in some case: 
"Application Error: tried to enter Stateful bean with different transaction
context" :(( 
because my stateful bean is already involved in another transaction.

May be just 2 words about our app:
It's an intranet build upon Tomcat/Jboss/Struts. The struts actions will
access a stateful bean 
that serve to centralize and execute business actions. By the same time,
there is a stateful bean (a controller)
for each EntityBean of the system. The execution of the business actions may
access the controllers.
That's why if a web users send many requests, I can have multiple
transaction on the same statefull bean.

So I need to find a way to prevent my stateful beans to "be entered with
different transaction context".
I tryed to set the transaction attribute of the ping method to
"Notsupported" but I still get this error.

It's 2 full days now, I'm getting around looking for solutions, but I'm
still stuck.

Any help is appreciated!
Alban.

-----Original Message-----
From: Adrian Brock [mailto:[EMAIL PROTECTED]
Sent: mercredi, 29. octobre 2003 16:03
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Transactions on Stateful beans


On Wed, 2003-10-29 at 14:18, Alban Soupper wrote:
> Hi all,
> 
> I have some difficulties with the transactions on Stateful beans.
> My client may spawn many requests in a very short time, and the request
> processing accesses some controllers (My stateful beans).
> This leads sometimes to an exception: "Application Error: tried to enter
> Stateful bean with different transaction context", due to the fact my
> request processors
> access all at the same moment to my controllers.
> 
> 1- Is there a way, to specify in JBoss, that we can have concurrent access
> on the stateful beans ?
>       - if yes, what could the traps?

No, concurrent access is not supported.
But, you can provide your own synchronized wrapper.

> 2- Is there a way, to check if a stateful is currently involved in a
> transaction?
> 
> Bonus:
> 3- Is there a way, to know if a stateful bean is still alive ?
> 

A simple ping/noop() method on the interface will tell you
whether it still exists. You get a Remote/EJBException if the
session was removed due to it being idle too long (default 30 minutes).

Regards,
Adrian

> Thanks by advance,
> Alban.
> 
> 
>
****************************************************************************
*******
> 
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager to [EMAIL PROTECTED]
> 
>
****************************************************************************
*******
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?   SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
xxxxxxxxxxxxxxxxxxxxxxxx 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
xxxxxxxxxxxxxxxxxxxxxxxx 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to