3 Replies Latest reply on May 18, 2009 12:36 AM by jaikiran pai

    @Clustered + @RemoteBinding(jndiBinding => org.jboss.ejb3.co

    Andrzej Smolinski Newbie

      I got problem when deploy some ejb in clustered environemnt:
      JBoss 5.1.0.CR1 (same in 5.0.0.GA), JDK 1.6

      I deploy ejb 3.0 stateless bean (ejb jar included in ear file):

      @Clustered(partition= "DefaultPartition")
      @Remote
      @RemoteBinding(jndiBinding="prj/ServerCmdExecutor/remote")
      public class ServerCmdExecutorBean implements CmdExecutor {
      ...


      and gets error:

      java.lang.RuntimeException: org.jboss.ejb3.common.registrar.spi.DuplicateBindException: Could not register org.jboss.ejb3.proxy.clustered.factory.sess
      ion.stateless.StatelessSessionClusteredProxyFactory@565388 under an already registered key, "ProxyFactory/prototype_ear-0.1-SNAPSHOT/ServerCmdExecutor
      Bean/prj/ServerCmdExecutor/remote/DefaultPartition" for EJB ServerCmdExecutorBean
      at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.createJndiReferenceBindingSet(JndiSessionRegistrarBase.java:245)
      at org.jboss.ejb3.proxy.clustered.jndiregistrar.JndiClusteredSessionRegistrarBase.createJndiReferenceBindingSet(JndiClusteredSessionRegistrarB
      ase.java:213)
      at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bindEjb(JndiSessionRegistrarBase.java:148)
      at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:208)
      at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:522)
      at org.jboss.ejb3.stateless.StatelessContainer.lockedStart(StatelessContainer.java:186)
      at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:884)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)



      If I remove @RemoteBinding then it works but I get default name mapping which is ear name related (and is not good for me).
      It also work if this ejb is not clustered. What can be wrong, am I missing something or there can be some bug?