Permalink
Browse files

bug 395436: [enterprise] Do not rebind resources from OpenEJB to Tomc…

…at JNDI
  • Loading branch information...
1 parent e56ed2f commit cbbbe6981b0145521745e2996a5f088ac2586765 @violetagg violetagg committed Nov 30, 2012
@@ -6,7 +6,7 @@
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core.source-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545-virgo-2/org.apache.openejb.core-4.0.0.beta-2_v201205260545-virgo-2.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545-virgo-2/org.apache.openejb.core.source-4.0.0.beta-2_v201205260545-virgo-2.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.loader/4.0.0.beta-2_v201205041336/org.apache.openejb.loader-4.0.0.beta-2_v201205041336.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.ejb/3.1.1.v201204261316/javax.ejb-3.1.1.v201204261316.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina-7.0.32.v201211201336.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina.source-7.0.32.v201211201336.jar"/>
@@ -28,6 +28,7 @@
import javax.ejb.TransactionManagement;
import javax.naming.Context;
import javax.naming.LinkRef;
+import javax.naming.NameAlreadyBoundException;
import javax.naming.NamingException;
import javax.naming.RefAddr;
@@ -205,7 +206,12 @@ private void bindRefInTomcat(Map<String, Object> appBindings, Context jndiContex
continue;
this.logger.debug("Binding " + jndiName + " with value " + value);
ContextUtil.mkdirs(jndiContext, jndiName);
- jndiContext.rebind(jndiName, value);
+ try {
+ // Note: This will not rebind the DataSources also
+ jndiContext.bind(jndiName, value);
+ } catch (NameAlreadyBoundException e) {
+ // ignore
+ }
}
}
@@ -9,7 +9,7 @@
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar" sourcepath="/IVY_CACHE/javax.servlet/javax.servlet/3.0.0.v201103241009/javax.servlet-sources-3.0.0.v201103241009.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina-7.0.32.v201211201336.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina.source-7.0.32.v201211201336.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.web.enterprise.appdeployer"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545-virgo-2/org.apache.openejb.core-4.0.0.beta-2_v201205260545-virgo-2.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@@ -9,8 +9,8 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.ejb/3.1.1.v201204261316/javax.ejb-3.1.1.v201204261316.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina-7.0.32.v201211201336.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina.source-7.0.32.v201211201336.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.glassfish.com.sun.faces/2.1.6.v201205171319/org.glassfish.com.sun.faces-2.1.6.v201205171319.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.persistence/2.0.4.v201112200901/javax.persistence-2.0.4.v201112200901.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.glassfish.com.sun.faces/2.1.6.v201205171319-virgo-1/org.glassfish.com.sun.faces-2.1.6.v201205171319-virgo-1.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.persistence/2.0.4.v201112161009/javax.persistence-2.0.4.v201112161009.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@@ -7,7 +7,7 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.1.v20120830-144521/org.eclipse.osgi-3.8.1.v20120830-144521.jar" sourcepath="/IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545-virgo-2/org.apache.openejb.core-4.0.0.beta-2_v201205260545-virgo-2.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.loader/4.0.0.beta-2_v201205041336/org.apache.openejb.loader-4.0.0.beta-2_v201205041336.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.transaction/1.1.1.v201105210645/javax.transaction-1.1.1.v201105210645.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina-7.0.32.v201211201336.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina.source-7.0.32.v201211201336.jar"/>
@@ -5,7 +5,7 @@
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core.source-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545-virgo-2/org.apache.openejb.core-4.0.0.beta-2_v201205260545-virgo-2.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545-virgo-2/org.apache.openejb.core.source-4.0.0.beta-2_v201205260545-virgo-2.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina-7.0.32.v201211201336.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina.source-7.0.32.v201211201336.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.coyote/7.0.32.v201211201952/org.apache.coyote-7.0.32.v201211201952.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.loader/4.0.0.beta-2_v201205041336/org.apache.openejb.loader-4.0.0.beta-2_v201205041336.jar"/>
@@ -7,8 +7,7 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina-7.0.32.v201211201336.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina.source-7.0.32.v201211201336.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core.source-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545-virgo-2/org.apache.openejb.core-4.0.0.beta-2_v201205260545-virgo-2.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545-virgo-2/org.apache.openejb.core.source-4.0.0.beta-2_v201205260545-virgo-2.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.loader/4.0.0.beta-2_v201205041336/org.apache.openejb.loader-4.0.0.beta-2_v201205041336.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.security.jacc/1.4.0.v201205031350/javax.security.jacc-1.4.0.v201205031350.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@@ -10,7 +10,7 @@
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.tomcat.api/7.0.32.v201211081135/org.apache.tomcat.api-7.0.32.v201211081135.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545/org.apache.openejb.core-4.0.0.beta-2_v201205260545.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.core/4.0.0.beta-2_v201205260545-virgo-2/org.apache.openejb.core-4.0.0.beta-2_v201205260545-virgo-2.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.openejb.loader/4.0.0.beta-2_v201205041336/org.apache.openejb.loader-4.0.0.beta-2_v201205041336.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina-7.0.32.v201211201336.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.catalina/7.0.32.v201211201336/org.apache.catalina.source-7.0.32.v201211201336.jar"/>
@@ -31,7 +31,7 @@
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.M04/org.eclipse.virgo.util.io-3.6.0.M04.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.M04/org.eclipse.virgo.util.io-sources-3.6.0.M04.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.M04/org.eclipse.virgo.util.osgi.manifest-3.6.0.M04.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.deployer/3.6.0.BUILD-20121009125557/org.eclipse.virgo.nano.deployer-3.6.0.BUILD-20121009125557.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.deployer/3.6.0.M04/org.eclipse.virgo.nano.deployer-3.6.0.M04.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.nano.core/3.6.0.M04/org.eclipse.virgo.nano.core-3.6.0.M04.jar" sourcepath="/IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.nano.core/3.6.0.M04/org.eclipse.virgo.nano.core-sources-3.6.0.M04.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.web.core/2.2.0.M02/org.eclipse.gemini.web.core-2.2.0.M02.jar"/>
<classpathentry kind="output" path="target/classes"/>

0 comments on commit cbbbe69

Please sign in to comment.