"raehalme" wrote:"raehalme" wrote:
Hi!
I have a generic library that contains multiple EJB components. Among session and entity beans, it also contains a message-driven bean. I have added this library to two of my applications, which I am trying to deploy on the same server.
The first application deploys just fine. But when I try to deploy the second application, I get an exception:
javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=local/XXX,service=EJB already registered.
It cannot deploy the MDB as it's already been deployed on the first application. I guess the JNDI name "local/XXX" is the problem?
You can specify different JNDI names for session and entity bean home interfaces in the JAR's jboss.xml. Where can you specify a JNDI for the message-driven bean?
Best regards,
Thomas
"raehalme" wrote:
It's possible to avoid the duplicate JNDI name problem for message-driven beans by using a different EJB name in ejb-jar.xml each time the component is deployed.