5 Replies Latest reply on Jul 15, 2002 6:33 AM by Panagiotis Korros

    How to deploy an ejb several times?

    Panagiotis Korros Newbie

      I want to deploy an ejb to several J2EE applications to JBoss 3.0
      In each application the ejb has different settings (eg different datasource)
      I make multiple ear files with different names and i gave the bean different jndi names.

      It seems that jboss uses the same JMX name for all ejbs that's why i get the following error:

      javax.management.InstanceAlreadyExistsException: jboss.j2ee:service=EJB,jndiName=PermissionBean already registered.
      at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:654)
      at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:240)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:949)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:276)
      at org.jboss.ejb.EjbModule.createService(EjbModule.java:389)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:134)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894)
      at $Proxy6.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:272)
      at org.jboss.system.ServiceController.create(ServiceController.java:212)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy5.create(Unknown Source)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:380)

      How can i solve this problem? any suggestions?