geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r535055 - /geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
Date Fri, 04 May 2007 01:50:02 GMT
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;
                 }



Mime
View raw message