geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r511054 - in /geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation: EJBAnnotationHelper.java ResourceAnnotationHelper.java
Date Fri, 23 Feb 2007 19:07:47 GMT
Author: sppatel
Date: Fri Feb 23 11:07:46 2007
New Revision: 511054

URL: http://svn.apache.org/viewvc?view=rev&rev=511054
Log:
GERONIMO-2874 need to call getStringValue to get value of element

Modified:
    geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationHelper.java
    geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/ResourceAnnotationHelper.java

Modified: geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationHelper.java?view=diff&rev=511054&r1=511053&r2=511054
==============================================================================
--- geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationHelper.java
(original)
+++ geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/EJBAnnotationHelper.java
Fri Feb 23 11:07:46 2007
@@ -248,9 +248,13 @@
             }
         }
 
+        //------------------------------------------------------------------------------------------
+        // 1. <ejb-local-ref>
+        //------------------------------------------------------------------------------------------
         if ( localFlag ) {
 
-            // <ejb-local-ref>
+            log.debug( "addEJB(): <ejb-local-ref> found");
+
             String localRefName = annotation.name();
             if ( localRefName.equals("") ) {
                 if ( method != null ) {
@@ -264,7 +268,7 @@
             boolean exists = false;
             EjbLocalRefType[] ejbLocalRefEntries = webApp.getEjbLocalRefArray();
             for ( EjbLocalRefType ejbLocalRefEntry : ejbLocalRefEntries ) {
-                if ( ejbLocalRefEntry.getEjbRefName().equals( localRefName ) ) {
+                if ( ejbLocalRefEntry.getEjbRefName().getStringValue().equals( localRefName
) ) {
                     exists = true;
                     break;
                 }
@@ -354,7 +358,12 @@
         }                                                                           // end
if local
         else {                                                                      // else
remote
 
-            // <ejb-ref>
+            //--------------------------------------------------------------------------------------
+            // 2. <ejb-ref>
+            //--------------------------------------------------------------------------------------
+
+            log.debug( "addEJB(): <ejb-ref> found");
+
             String remoteRefName = annotation.name();
             if ( remoteRefName.equals("") ) {
                 if ( method != null ) {
@@ -368,7 +377,7 @@
             boolean exists = false;
             EjbRefType[] ejbRefEntries = webApp.getEjbRefArray();
             for ( EjbRefType ejbRefEntry : ejbRefEntries ) {
-                if ( ejbRefEntry.getEjbRefName().equals( remoteRefName ) ) {
+                if ( ejbRefEntry.getEjbRefName().getStringValue().equals( remoteRefName )
) {
                     exists = true;
                     break;
                 }

Modified: geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/ResourceAnnotationHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/ResourceAnnotationHelper.java?view=diff&rev=511054&r1=511053&r2=511054
==============================================================================
--- geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/ResourceAnnotationHelper.java
(original)
+++ geronimo/server/branches/2.0-M3/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/annotation/ResourceAnnotationHelper.java
Fri Feb 23 11:07:46 2007
@@ -264,6 +264,7 @@
                 resourceName = field.getDeclaringClass().getName() + "/" + field.getName();
             }
         }
+        log.debug( "addResource(): resourceName: " + resourceName );
 
         //------------------------------------------------------------------------------------------
         // Resource type:
@@ -282,6 +283,7 @@
                 resourceType = field.getType().getName();
             }
         }
+        log.debug( "addResource(): resourceType: " + resourceType );
 
         //------------------------------------------------------------------------------------------
         // Method name (for setter-based injection) must follow JavaBeans conventions:
@@ -302,10 +304,12 @@
             injectionJavaType = field.getName();
             injectionClass = field.getDeclaringClass().getName();
         }
+        log.debug( "addResource(): injectionJavaType: " + injectionJavaType );
+        log.debug( "addResource(): injectionClass   : " + injectionClass );
+
 
         // 0. exclusions
         //  WebServiceContext
-
         if (resourceType.equals("javax.xml.ws.WebServiceContext")) {
             return;
         }
@@ -323,10 +327,12 @@
              resourceType.equals( "java.lang.Long" )        ||
              resourceType.equals( "java.lang.Float" ) ) {
 
+            log.debug( "addResource(): <env-entry> found");
+
             boolean exists = false;
             EnvEntryType[] envEntries = webApp.getEnvEntryArray();
             for ( EnvEntryType envEntry : envEntries ) {
-                if ( envEntry.getEnvEntryName().equals(resourceName) ) {
+                if ( envEntry.getEnvEntryName().getStringValue().equals(resourceName) ) {
                     exists = true;
                     break;
                 }
@@ -383,10 +389,12 @@
         //------------------------------------------------------------------------------------------
         else if ( resourceType.equals("javax.xml.rpc.Service") ) {
 
+            log.debug( "addResource(): <service-ref> found");
+
             boolean exists = false;
             ServiceRefType[] serviceRefs = webApp.getServiceRefArray();
             for ( ServiceRefType serviceRef : serviceRefs ) {
-                if ( serviceRef.getServiceRefName().equals(resourceName) ) {
+                if ( serviceRef.getServiceRefName().getStringValue().equals(resourceName)
) {
                     exists = true;
                     break;
                 }
@@ -456,10 +464,12 @@
                   resourceType.equals("org.omg.CORBA_2_3.ORB")                  ||
                   resourceType.endsWith("ConnectionFactory") ) {
 
+            log.debug( "addResource(): <resource-ref> found");
+
             boolean exists = false;
             ResourceRefType[] resourceRefs = webApp.getResourceRefArray();
             for ( ResourceRefType resourceRef : resourceRefs ) {
-                if ( resourceRef.getResRefName().equals(resourceName) ) {
+                if ( resourceRef.getResRefName().getStringValue().equals(resourceName) )
{
                     exists = true;
                     break;
                 }
@@ -550,10 +560,12 @@
         else if ( resourceType.equals("javax.jms.Queue")    ||
                   resourceType.equals("javax.jms.Topic") ) {
 
+            log.debug( "addResource(): <message-destination-ref> found");
+
             boolean exists = false;
             MessageDestinationRefType[] messageDestinationRefs = webApp.getMessageDestinationRefArray();
             for ( MessageDestinationRefType messageDestinationRef : messageDestinationRefs
) {
-                if ( messageDestinationRef.getMessageDestinationRefName().equals(resourceName)
) {
+                if ( messageDestinationRef.getMessageDestinationRefName().getStringValue().equals(resourceName)
) {
                     exists = true;
                     break;
                 }
@@ -629,10 +641,12 @@
         else if ( annotation.type().getCanonicalName().equals("javax.resource.cci.InteractionSpec")
||
                   annotation.type().getCanonicalName().equals("javax.transaction.UserTransaction")
 || true ) {
 
+            log.debug( "addResource(): <resource-env-ref> found");
+
             boolean exists = false;
             ResourceEnvRefType[] resourceEnvRefs = webApp.getResourceEnvRefArray();
             for ( ResourceEnvRefType resourceEnvRef : resourceEnvRefs ) {
-                if ( resourceEnvRef.getResourceEnvRefName().equals(resourceName) ) {
+                if ( resourceEnvRef.getResourceEnvRefName().getStringValue().equals(resourceName)
) {
                     exists = true;
                     break;
                 }



Mime
View raw message