Hi All
Please help to share yr experience on my below question about design / programming of EJB in a cluster.
As we know, the ejb remote reference is not serializable. For a stateful session bean designed to run in cluster env, hence, instance variable of ejb remote reference should not be used. Instead, it is recommneded that EJB handle is serialized. However, if an instance of server is crashed and the SFSB is created and activated in another instance of server, below statements are implemented to get back the remote reference of other ejb used within the SFSB
Object obj = myHandle.getEJBObject();
myEJB = (MyEJB)PortableRemoteObject.narrow(obj,MyEJB.class);
will above remote reference still point to an EJB instance in crashed JVM ? Or another new instance of EJB is created and pointed by above remote reference in new instance of JVM server ? If this is former case, any invocation to this new initialized remote reference will still fail. However, if it is a smart remote stub, call will be retried after locating and pointing to a new EJB created in new server. ?
Can anyone share with me how this work ?
thx & rgds
dso
-
can EJB Handle survive in a clustering env (2 messages)
- Posted by: dso dso
- Posted on: July 15 2004 01:40 EDT
Threaded Messages (2)
- can EJB Handle survive in a clustering env by Bhagvan Kommadi on July 15 2004 10:44 EDT
- can EJB Handle survive in a clustering env by dso dso on July 16 2004 04:41 EDT
-
can EJB Handle survive in a clustering env[ Go to top ]
- Posted by: Bhagvan Kommadi
- Posted on: July 15 2004 10:44 EDT
- in response to dso dso
hi,
Check out this link and see if it answers your question...
http://www.javaworld.com/javaworld/jw-07-2002/jw-0703-service.html
Bhagvan K
http://www.architectcorner.com -
can EJB Handle survive in a clustering env[ Go to top ]
- Posted by: dso dso
- Posted on: July 16 2004 04:41 EDT
- in response to Bhagvan Kommadi
thank u for your reply. I read that article 1 yr or so ago. what the article introduce is very different my question. My question is whether a serialized EJB handle (reference by a SFSB) in other JVM can be activated, deserialized in another instance of JVM. Whether the serialized EJB handle contain any info pointing to a specific instance of EJB in original JVM. If not so, i think the SFSB / EJB handle can survive as move around in different JVMs of same cluster.
Higly appreciate u can share with me your experience on this issue
rgds
dso