[jboss-user] [Installation, Configuration & DEPLOYMENT] - Undeploying multiple wars inside an ear causes NameAlreadyBo

KlausMa do-not-reply at jboss.com
Mon Dec 10 05:08:14 EST 2007


Hi.

I want to deploy two war's in one ear.

If I start JBoss, I get a NameAlreadyBoundException when JBoss tries to deploy the second war. I have run Jboss in Debug mode and find out that the Exception comes from a class named org/jboss/web/AbstractWebDeployer.
There is a method parseWebAppDescriptors() which parses the web.xml in the war and at the end of the method a UserTransaction is bound to JNDI

 // Add a link to the global transaction manager
  |    envCtx.bind("UserTransaction", new LinkRef("UserTransaction"));
  |    log.debug("Linked java:comp/UserTransaction to JNDI name: UserTransaction");
  |    envCtx = envCtx.createSubcontext("env");
  | 

I guess, when the second war is parsed, JBoss tries to bind a second UserTransaction with the same name what causes the NameAlreadyBound Exception.

 Now, my question. is it possible to deploy two war's in one ear and how can I solve the exception.

Thanks

Klaus

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111551#4111551

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111551



More information about the jboss-user mailing list