geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r152639 - geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Date Tue, 08 Feb 2005 05:45:15 GMT
Author: geirm
Date: Mon Feb  7 21:45:14 2005
New Revision: 152639

URL: http://svn.apache.org/viewcvs?view=rev&rev=152639
Log:
add support for JAXR connection factory as a resource ref

Modified:
    geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java

Modified: geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?view=diff&r1=152638&r2=152639
==============================================================================
--- geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
(original)
+++ geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Mon Feb  7 21:45:14 2005
@@ -65,6 +65,8 @@
  */
 public class ENCConfigBuilder {
 
+    private static final String JAXR_CONNECTION_FACTORY_CLASS = "javax.xml.registry.ConnectionFactory";
+
     public static ObjectName getGBeanId(String j2eeType, GerGbeanLocatorType gerGbeanLocator,
J2eeContext j2eeContext, DeploymentContext context, Kernel kernel) throws DeploymentException
{
         ObjectName containerId = null;
         if (gerGbeanLocator.isSetGbeanLink()) {
@@ -180,9 +182,15 @@
             } else {
                 //determine jsr-77 type from interface
                 String j2eeType;
+
+
                 if ("javax.mail.Session".equals(type)) {
                     j2eeType = NameFactory.JAVA_MAIL_RESOURCE;
-                } else {
+                }
+                else if (JAXR_CONNECTION_FACTORY_CLASS.equals(type)) {
+                    j2eeType = NameFactory.JAXR_CONNECTION_FACTORY;
+                }
+                else {
                     j2eeType = NameFactory.JCA_MANAGED_CONNECTION_FACTORY;
                 }
                 String containerId = getResourceContainerId(name, j2eeType, uri, gerResourceRef,
refContext, j2eeContext, earContext);
@@ -559,10 +567,14 @@
             ResourceRefType resourceRefType = resourceRefs[i];
 
             String type = resourceRefType.getResType().getStringValue().trim();
+
             if (!URL.class.getName().equals(type)
-                    && !"javax.mail.Session".equals(type)) {
+                    && !"javax.mail.Session".equals(type)
+                    && !JAXR_CONNECTION_FACTORY_CLASS.equals(type) ) {
+
                 GerResourceRefType gerResourceRef = (GerResourceRefType) refMap.get(resourceRefType.getResRefName().getStringValue());
                 String containerId = getResourceContainerId(getStringValue(resourceRefType.getResRefName()),
NameFactory.JCA_MANAGED_CONNECTION_FACTORY, uri, gerResourceRef, refContext, j2eeContext,
earContext);
+
                 if ("Unshareable".equals(getStringValue(resourceRefType.getResSharingScope())))
{
                     unshareableResources.add(containerId);
                 }



Mime
View raw message