geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r534702 - /geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
Date Thu, 03 May 2007 04:23:58 GMT
Author: dblevins
Date: Wed May  2 21:23:56 2007
New Revision: 534702

URL: http://svn.apache.org/viewvc?view=rev&rev=534702
Log:
Only need to create a link for UserTransaction

Modified:
    geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java?view=diff&rev=534702&r1=534701&r2=534702
==============================================================================
--- geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
Wed May  2 21:23:56 2007
@@ -25,6 +25,7 @@
 
 import javax.annotation.Resource;
 import javax.naming.Reference;
+import javax.naming.LinkRef;
 import javax.xml.namespace.QName;
 
 import org.apache.commons.logging.Log;
@@ -140,9 +141,15 @@
             }
             GerResourceEnvRefType gerResourceEnvRef = refMap.get(name);
             try {
-                AbstractNameQuery containerId = getAdminObjectContainerId(name, gerResourceEnvRef);
-                Reference ref = buildAdminObjectReference(localConfiguration, containerId,
iface);
-                getJndiContextMap(componentContext).put(ENV + name, ref);
+                String refType = getStringValue(resourceEnvRef.getResourceEnvRefType());
+                if (refType.equals("javax.transaction.UserTransaction")) {
+                    LinkRef linkRef = new LinkRef("java:comp/UserTransaction");
+                    getJndiContextMap(componentContext).put(ENV + name, linkRef);
+                } else {
+                    AbstractNameQuery containerId = getAdminObjectContainerId(name, gerResourceEnvRef);
+                    Reference ref = buildAdminObjectReference(localConfiguration, containerId,
iface);
+                    getJndiContextMap(componentContext).put(ENV + name, ref);
+                }
             } catch (UnresolvedReferenceException e) {
                 throw new DeploymentException("Unable to resolve resource env reference '"
+ name + "' (" + (e.isMultiple() ? "found multiple matching resources" : "no matching resources
found") + ")");
             }



Mime
View raw message