You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by da...@apache.org on 2007/05/04 03:50:02 UTC

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

Author: dain
Date: Thu May  3 18:50:01 2007
New Revision: 535055

URL: http://svn.apache.org/viewvc?view=rev&rev=535055
Log:
Only process resource annotations for registered admin objects and user transaction

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=535055&r1=535054&r2=535055
==============================================================================
--- 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 Thu May  3 18:50:01 2007
@@ -347,11 +347,19 @@
             } else {
                 //if it maps to a resource-env-ref in the geronimo plan, it's a resource-ref
                 GerResourceEnvRefType resourceEnvRefType = refMap.get(resourceName);
-                if (resourceEnvRefType != null) {
+                if (resourceEnvRefType != null || resourceType.equals("javax.transaction.UserTransaction")) {
                     //mapped resource-env-ref
                     addResourceEnvRef(annotatedApp, resourceName, resourceType, method, field, annotation);
                     return true;
                 } else {
+                    //look for an JCAAdminObject gbean with the right name
+                    AbstractNameQuery containerId = buildAbstractNameQuery(null, null, resourceName, NameFactory.JCA_ADMIN_OBJECT, NameFactory.RESOURCE_ADAPTER_MODULE);
+                    try {
+                        localConfiguration.findGBean(containerId);
+                    } catch (GBeanNotFoundException e) {
+                        //not identifiable as an admin object ref
+                        return false;
+                    }
                     addResourceEnvRef(annotatedApp, resourceName, resourceType, method, field, annotation);
                     return true;
                 }