Good to know you solved it!

Cheers,


sacha

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Joao Clemente
> Sent: vendredi, 1. ao�t 2003 12:05
> To: [EMAIL PROTECTED]
> Subject: SOLVED (Re: [JBoss-user] Cluster failover and "no 
> concurrent calls on stateful beans")
> 
> 
> Thank you for having replied Sacha. I'll not provide the 
> exception stack
> trace as we've found what was causing the problem.
> I'll post our finding here to end this thread with the 
> explanation for our
> problem (well, at least is what we suspect it was the 
> problem. I'm sorry if
> what I'm saying is not 100% correct, but it is our conclusion so far)
> 
> It was all about the design we were using to do the recovery:
> 
> Supose we had an EJB1 and a EJB2. Both ejb's have a recovery method
> "recover()"  to fix the transient parts that were lost during 
> failover. That
> recover method is called whenever we access an transient 
> variable by an
> accessor we have in the class:
> 
> class ejb1 {
>   transient xxx transientVariable;
>   getTransientVariable()
> 
>       if (transientVariable== null) revover();
>       return transientVariable;
>   }
>   recover () { // Get the transient variables in a valid 
> state again. }
>   method1()
> 
>      // ...
>      getTransientVariable().doSomething();
>   }
>   method2() {
>     // ... access ejb2 and invoque someMethod();
>   }
> }
> 
> 
> ejb2 has a similar approach, but it had a difference: The 
> recover method had
> to access ejb1 to get a value.
> our client (servlet) would, for instance, invoque ejb1.method2();
> this would make a call to ejb2, so we have ejb1 invoquing ejb2.
> ejb2.method2() would have the need to access a transient 
> variable so it
> would try to recover. In particular that transient variable 
> was provided by
> calling an ejb1 method. It has an reference to ejb1 that was kept safe
> during failover, so it can invoque it something like this:
>   (ejb2) recover() {
>     // need to ask ejb1 for the correct value of some 
> transient variable
> that I have:
>     ejb1.giveMeSomeVariable();
>   }
> 
> so ejb1 is calling ejb2 that, when recovering, needs to call 
> ejb1 again..
> and... well "concurrent call on statefull beans"...
> 
> 
> 
> well, I actually thing that in some occasions it should be 
> possible to use
> this... In particular, if there existed a "const method()" in 
> java (there is
> no "const" is java, is there?) I think it should be possible. 
> This would say
> that the method is harmless to the state of the bean... But 
> this is another
> story...
> Hope maybe our bad (old) design will help someone to avoid 
> this mistakes :-)
> 
> Joao Clemente
> 
> ----- Original Message -----
> From: "Joao Clemente" <[EMAIL PROTECTED]>
> Sent: Monday, July 28, 2003 4:36 PM
> 
> 
> > We're changing our app so that we can recover the transient 
> parts of our
> > objects so that we can eventually support failover.
> > One of our recovery methods fails with
> > "Application error: no concurrent calls on stateful beans"
> > and we're being unable to trace what is responsible for 
> this behaviour. We
> > are using a single client so there should be only one call, not two.
> > One thing I am thinking is that maybe the server is 
> activating the ejb and
> > at the same time it invokes the recovery method that we wrote.
> >
> > Maybe one of you has already faced this situation and has 
> suggestions.
> > We're using jboss 3.0.8
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet
> _072303_01/01
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> 




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to