I'm using JBoss 3.0.8 and testing clustering failover, in particular the
recovery of a ejb session.
I would like to ask if someone as executed such test and has suceeded with
it.
(Strangely I was almost sure I had good results in this test some months
ago, with a previous JBoss version)
I am having the feeling the error is somewhere in the way I've written the
test, but here goes:


Test Case:
2 servers in a clusters, JB1 and JB2, no load balancing involved. Cluster
here is setup to test the ability to replicate and recover a session after a
node failure.
Client connects (with IE) to a webpage in JB1. That page counts the number
of times that session has been used.
JB1 is shutdown, then out back up.
Client then interacts again with JB1. The expected result is a incremented
counter, just as if the server had not failed.

Test Application design and racionale:
1 statefull ejb, wich has a "int increment()" function, returning a "i++"
whose "i" is inited to "0" at ejb creation.
1 servlet that:
  - if httpSession.isNew, creates a ejb connection and calls increment().
Keeps the connection in httpSession context.
  - otherwise, calls increment on the already connected ejb.
  + increment a counter that represents the number of times that httpSession
has been used.
  + gives control to a jsp
1 jsp that returns a page to the client stating:
   a) number of times that httpSession has been called
   b) the return value of the ejb increment() call.

I've tested the ejb failover by using a java app calling the ejb directly.
It worked.

On this web test I described, what happens is that, after JB1 gets shutdown
and restarted, i get a page that correctly indicates the httpSession count
number. However, I don't get the correct value of the statefull ejb.
I wonder... is there a need for a special "ejb recovery" coding? I don't
understand why I can get this ejb value right trough the client java app,
but not through this servlet..

Anyone faced a problem like this?
And, btw, in theory, is ejb session recovery similar to httpSession
recovery?





-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to