5 Replies Latest reply: Aug 13, 2013 5:27 PM by user3356478 RSS

    EJB3 Clustering - WebLogic 10

    504662
      I am using EJB3 stateless beans with my EJBS deployed on a cluster with two managed servers. I also have a web application that is hosted on separate machines and access the EJBS. I have included the EJB3 interface classes (simple interfaces) in the web-inf/lib directory of my web application. The problem I am facing is that the EJBs are not clustered. I have added the following in the weblogic-ejb-jar.xml for every EJB.

      <stateless-session-descriptor>
      <stateless-clustering>
      <stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>
      </stateless-clustering>
      </stateless-session-descriptor>

      However, the web application is not abel to get a weblogic.rmi.cluster.ClusterableRemoteRef to the EJBS on my web application.
      If I shut down one managed server of the EJB cluster, I get the exception

      java.rmi.ConnectException: Destination unreachable; nested exception is:
      java.net.ConnectException: Connection refused: connect; No available router to destination
      at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:472)
      at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:404)
      at weblogic.rjvm.RJVMImpl.ensureConnectionEstablished(RJVMImpl.java:297)
      at weblogic.rjvm.RJVMImpl.getOutputStream(RJVMImpl.java:341)
      at weblogic.rjvm.RJVMImpl.getRequestStreamInternal(RJVMImpl.java:595)
      at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:547)
      at weblogic.rjvm.RJVMImpl.getOutboundRequest(RJVMImpl.java:767)
      at weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:160)
      at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:212)


      It seems that the client is getting a weblogic.rmi.internal.BasicRemoteRef instead of weblogic.rmi.cluster.ClusterableRemoteRef

      What must I do to enable the client to get a clusterable EJB reference?