0 Replies Latest reply on Jan 14, 2004 7:25 PM by kishore bottu

    Class loader and multiple ear files in cluster

    kishore bottu Newbie

      I am deploying 2 ear files that have stateless session beans in jboss3.2.3.
      Stateless session bean(bean1) in ear1 invokes the Stateless session bean(bean2) on ear2. I scoped those ear files with different loader-repository tags and configured invoker-proxy-binding in jboss.xml to use
      ByValueInvokerInterceptor for both Standard and Clustered configurations. It works fine with multiple utility class versions, But Invoking a bean across the ear files I have problems in clustered mode.

      Single Instance with no cluster --
      bean1 in ear 1 calling the bean2 in ear2 with java.naming.provider.url
      set to localhost:1099 works.If I use the default InitialContext it doesn't
      work.

      Two instances in clustered mode --
      bean1 in ear1 calling the bean2 in ear2 with java.naming.provider.url
      set to

      host1:1099 - fails
      host2:1099 - fails.
      javax.ejb.EJBException: Invalid invocation, check your
      deployment packaging, method=public abstract
      com.cluster.simple.sessionbeans.SimpleSession
      com.cluster.simple.sessionbeans.SimpleSessionHome.create() throws
      java.rmi.RemoteException,javax.ejb.CreateException
      host1:1100 - fails
      host2:1100 - fails
      I get a java.lang.ClassCastException.

      With these scenarios It succeeds -
      undeploy ear2 on host1 and java.naming.provider.url set to
      host1:1100 - succeeds
      host2:1100 - succeeds

      I am invoking bean1 from console client which in turn calls bean2.
      Why is it a problem on the Clustered Mode?. I know people are struggling
      with classloader problems. Any suggetions will be a great help.

      Thanks,
      Anoop