geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r280938 - in /geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector: ./ outbound/
Date Wed, 14 Sep 2005 20:51:25 GMT
Author: jboynes
Date: Wed Sep 14 13:51:21 2005
New Revision: 280938

URL: http://svn.apache.org/viewcvs?rev=280938&view=rev
Log:
JSR77 attribute support

Modified:
    geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImpl.java
    geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImplGBean.java
    geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImpl.java
    geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImplGBean.java
    geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
    geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImpl.java?rev=280938&r1=280937&r2=280938&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImpl.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImpl.java
Wed Sep 14 13:51:21 2005
@@ -16,21 +16,37 @@
  */
 package org.apache.geronimo.connector;
 
-import javax.management.MalformedObjectNameException;
+import org.apache.geronimo.management.ResourceAdapter;
 
 /**
  * @version $Rev:  $ $Date:  $
  */
-public class ResourceAdapterImpl {
+public class ResourceAdapterImpl implements ResourceAdapter {
+    private final String objectName;
     private final String jcaResource;
 
-    public ResourceAdapterImpl(String objectName, String jcaResource) throws MalformedObjectNameException
{
+    public ResourceAdapterImpl(String objectName, String jcaResource) {
+        this.objectName = objectName;
         this.jcaResource = jcaResource;
     }
 
-    public String getJCAResource() {
-        return jcaResource;
+    public String[] getJCAResources() {
+        return new String[] {jcaResource};
     }
 
+    public String getObjectName() {
+        return objectName;
+    }
+
+    public boolean isStateManageable() {
+        return false;
+    }
 
+    public boolean isStatisticsProvider() {
+        return false;
+    }
+
+    public boolean isEventProvider() {
+        return false;
+    }
 }

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImplGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImplGBean.java?rev=280938&r1=280937&r2=280938&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImplGBean.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterImplGBean.java
Wed Sep 14 13:51:21 2005
@@ -20,15 +20,17 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.management.ResourceAdapter;
 
 public class ResourceAdapterImplGBean {
-    
+
     public static final GBeanInfo GBEAN_INFO;
 
     static {
         GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(ResourceAdapterImpl.class, NameFactory.RESOURCE_ADAPTER);
         infoBuilder.addAttribute("objectName", String.class, false);
         infoBuilder.addAttribute("JCAResource", String.class, true);
+        infoBuilder.addInterface(ResourceAdapter.class);
 
         infoBuilder.setConstructor(new String[]{
             "objectName",

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImpl.java?rev=280938&r1=280937&r2=280938&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImpl.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImpl.java
Wed Sep 14 13:51:21 2005
@@ -21,30 +21,44 @@
 import javax.management.ObjectName;
 
 import org.apache.geronimo.management.J2EEServer;
+import org.apache.geronimo.management.JCAConnectionFactory;
 import org.apache.geronimo.j2ee.management.impl.InvalidObjectNameException;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
 
 /**
  * @version $Rev$ $Date$
  */
-public class JCAConnectionFactoryImpl {
-    private final J2EEServer server;
+public class JCAConnectionFactoryImpl implements JCAConnectionFactory  {
+    private final String objectName;
     private final String managedConnectionFactory;
 
     public JCAConnectionFactoryImpl(String objectName, J2EEServer server, String managedConnectionFactory)
{
+        // todo do we really need to do this at runtime - shouldn't the builder set this
up correctly?
         ObjectName myObjectName = JMXUtil.getObjectName(objectName);
         verifyObjectName(myObjectName);
 
-        this.server = server;
+        this.objectName = objectName;
         this.managedConnectionFactory = managedConnectionFactory;
     }
 
-//    public String getServer() {
-//        return server.getObjectName();
-//    }
-
     public String getManagedConnectionFactory() {
         return managedConnectionFactory;
+    }
+
+    public String getObjectName() {
+        return objectName;
+    }
+
+    public boolean isStateManageable() {
+        return false;
+    }
+
+    public boolean isStatisticsProvider() {
+        return false;
+    }
+
+    public boolean isEventProvider() {
+        return false;
     }
 
     /**

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImplGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImplGBean.java?rev=280938&r1=280937&r2=280938&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImplGBean.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImplGBean.java
Wed Sep 14 13:51:21 2005
@@ -20,13 +20,14 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.management.J2EEServer;
+import org.apache.geronimo.management.JCAConnectionFactory;
 
 /**
  * 
  * @version $Revision$
  */
 public class JCAConnectionFactoryImplGBean {
-    
+
     public static final GBeanInfo GBEAN_INFO;
 
     static {
@@ -34,8 +35,8 @@
         infoFactory.addReference("J2EEServer", J2EEServer.class);
 
         infoFactory.addAttribute("objectName", String.class, false);
-//        infoFactory.addAttribute("server", String.class, false);
         infoFactory.addAttribute("managedConnectionFactory", String.class, true);
+        infoFactory.addInterface(JCAConnectionFactory.class);
 
         infoFactory.setConstructor(new String[]{"objectName", "J2EEServer", "managedConnectionFactory"});
 

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java?rev=280938&r1=280937&r2=280938&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
Wed Sep 14 13:51:21 2005
@@ -37,11 +37,12 @@
 import org.apache.geronimo.naming.geronimo.GeronimoContextManager;
 import org.apache.geronimo.transaction.manager.NamedXAResource;
 import org.apache.geronimo.transaction.manager.ResourceManager;
+import org.apache.geronimo.management.JCAManagedConnectionFactory;
 
 /**
  * @version $Rev$ $Date$
  */
-public class ManagedConnectionFactoryWrapper implements GBeanLifecycle, DynamicGBean, ResourceManager
{
+public class ManagedConnectionFactoryWrapper implements GBeanLifecycle, DynamicGBean, ResourceManager,
JCAManagedConnectionFactory {
 
     private static final Log log = LogFactory.getLog(ManagedConnectionFactoryWrapper.class);
 
@@ -292,5 +293,21 @@
 
     public void returnResource(NamedXAResource xaResource) {
         ((ConnectionManagerContainer.ReturnableXAResource) xaResource).returnConnection();
+    }
+
+    public String getObjectName() {
+        return objectName;
+    }
+
+    public boolean isStateManageable() {
+        return false;
+    }
+
+    public boolean isStatisticsProvider() {
+        return false;
+    }
+
+    public boolean isEventProvider() {
+        return false;
     }
 }

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java?rev=280938&r1=280937&r2=280938&view=diff
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java
Wed Sep 14 13:51:21 2005
@@ -22,6 +22,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.transaction.manager.ResourceManager;
+import org.apache.geronimo.management.JCAManagedConnectionFactory;
 
 /**
  *
@@ -50,6 +51,7 @@
         infoFactory.addOperation("$getManagedConnectionFactory");
 
         infoFactory.addInterface(ResourceManager.class);
+        infoFactory.addInterface(JCAManagedConnectionFactory.class);
 
         infoFactory.addReference("ResourceAdapterWrapper", ResourceAdapterWrapper.class,
NameFactory.RESOURCE_ADAPTER);
         infoFactory.addReference("ConnectionManagerContainer", ConnectionManagerContainer.class,
NameFactory.JCA_CONNECTION_MANAGER);



Mime
View raw message