Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [Clustering/JBoss] - Clustered local interfaces?
 Really?

scott.stark@jboss.org

2007-07-20


Hi guys,

I ask awfully lots of questions recently but bear with me. I found something truly weird. I wanted to see what happens if I declare local interface as clustered in jboss.xml. I did not expect that it would work just like remote. Does anyone have an explanation?

the only thing which is different was logging. At startup JBoss told me:
[org.jboss.ejb.StatefulSessionContainer] *** EJB 'WorkAddress' deployed as CLUSTERED but not a single clustered-invoker is bound to container ***

but after that my EJBLocalHome and EJBLocalObject work as if they were cluster-aware EJBHome and replica-aware EJBObject.

Any ideas???

Here is my code.

I did

  <ejb-name>WorkAddress</ejb-name>
  <local-jndi-name>WorkAddressLocal</local-jndi-name>
  true


then started two nodes in JBoss with sticky OFF.

I do servlet->SessionFacade (Stateful Session Bean)->Local statefull session bean (my WorkAddressLocal)

My session facade has 2 instance variables, reference to EJBLocalHome and reference to EJBLocalObject. I initialize them when my Session Facade is called the first time. After that I store Session Facade bean in the session. Second requests comes around and gets load-balanced to the other node. Over there I successfully recover my Session Facade which has 2 references and test both of them:

test LocalHome
    //workAddressHome was created earlier in ejbCreate
    WorkAddressLocal bean = workAddressHome.create();  
    bean.test();   //success


test EjbLocalObject
  //workAddressLocal was created earlier in ejbCreate
  workAddressLocal.test();//success also !
  ....

Many thanks if anyone who can shed some light on the matter

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066369#4066369

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066369
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.