geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/test-data/xml/deployment/connector_1_5 geronimo-ra.xml
Date Wed, 21 Jan 2004 22:21:27 GMT
djencks     2004/01/21 14:21:27

  Modified:    modules/core/src/java/org/apache/geronimo/connector/deployment
                        ConnectorDeploymentPlanner.java
                        ManagedConnectionFactoryHelper.java
               modules/core/src/java/org/apache/geronimo/connector/outbound
                        ConnectionManagerDeployment.java
               modules/core/src/java/org/apache/geronimo/connector/outbound/security
                        PasswordCredentialRealm.java
               .        maven.xml
               modules/core project.xml
               modules/core/src/java/org/apache/geronimo/connector/work/pool
                        AbstractWorkExecutorPool.java
               modules/core/src/java/org/apache/geronimo/deployment/model/geronimo/connector
                        GeronimoConnectionManagerFactory.java
               modules/core/src/java/org/apache/geronimo/xml/deployment
                        GeronimoConnectorLoader.java
               modules/core/src/schema geronimo-connector_1_5.xsd
               modules/core/src/test/org/apache/geronimo/xml/deployment
                        GeronimoConnectorLoaderTest.java
               modules/core/src/test-data/xml/deployment/connector_1_5
                        geronimo-ra.xml
  Added:       modules/core/src/java/org/apache/geronimo/connector
                        ResourceAdapterWrapper.java
               modules/core/src/java/org/apache/geronimo/connector/deployment
                        ConnectorDeployer.java ConnectorModule.java
               modules/core/src/java/org/apache/geronimo/connector/outbound
                        ConnectionManagerFactory.java
                        ManagedConnectionFactoryWrapper.java
               modules/core/src/java/org/apache/geronimo/connector/outbound/security
                        ManagedConnectionFactoryListener.java
  Log:
  gbean-based deploying of connectors.  Includes slight cleanup of geronimo-ra.xml syntax
  
  Revision  Changes    Path
  1.1                  incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/ResourceAdapterWrapper.java
  
  Index: ResourceAdapterWrapper.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  package org.apache.geronimo.connector;
  
  import javax.resource.spi.ManagedConnectionFactory;
  import javax.resource.spi.ResourceAdapter;
  import javax.resource.spi.ActivationSpec;
  import javax.resource.spi.endpoint.MessageEndpointFactory;
  import javax.resource.ResourceException;
  
  import org.apache.geronimo.gbean.GBean;
  import org.apache.geronimo.gbean.DynamicGBean;
  import org.apache.geronimo.gbean.WaitingException;
  import org.apache.geronimo.gbean.DynamicGBeanDelegate;
  import org.apache.geronimo.gbean.GBeanInfo;
  import org.apache.geronimo.gbean.GBeanInfoFactory;
  import org.apache.geronimo.gbean.GAttributeInfo;
  import org.apache.geronimo.gbean.GEndpointInfo;
  import org.apache.geronimo.gbean.GConstructorInfo;
  import org.apache.geronimo.gbean.GOperationInfo;
  
  /**
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/21 22:21:25 $
   *
   * */
  public class ResourceAdapterWrapper implements GBean, DynamicGBean {
  
      private static final GBeanInfo GBEAN_INFO;
  
      private final Class resourceAdapterClass;
  
      private final BootstrapContext bootstrapContext;
  
      private final ResourceAdapter resourceAdapter;
  
      private final DynamicGBeanDelegate delegate;
  
      //default constructor for enhancement proxy endpoint
      public ResourceAdapterWrapper() {
          this.resourceAdapterClass = null;
          this.bootstrapContext = null;
          this.resourceAdapter = null;
          this.delegate = null;
      }
  
      public ResourceAdapterWrapper(Class resourceAdapterClass, BootstrapContext bootstrapContext) throws InstantiationException, IllegalAccessException {
          this.resourceAdapterClass = resourceAdapterClass;
          this.bootstrapContext = bootstrapContext;
          resourceAdapter = (ResourceAdapter) resourceAdapterClass.newInstance();
          delegate = new DynamicGBeanDelegate();
          delegate.addAll(resourceAdapter);
      }
  
      public Class getResourceAdapterClass() {
          return resourceAdapterClass;
      }
  
      public void registerManagedConnectionFactory(ManagedConnectionFactory managedConnectionFactory) throws ResourceException {
          managedConnectionFactory.setResourceAdapter(resourceAdapter);
      }
  
      //endpoint handling
      public void endpointActivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) throws ResourceException {
          resourceAdapter.endpointActivation(messageEndpointFactory, activationSpec);
      }
  
      public void endpointDeactivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) {
          resourceAdapter.endpointDeactivation(messageEndpointFactory, activationSpec);
      }
  
      public void doStart() throws WaitingException, Exception {
          resourceAdapter.start(bootstrapContext);
      }
  
      public void doStop() throws WaitingException {
          resourceAdapter.stop();
      }
  
      public void doFail() {
          resourceAdapter.stop();
      }
  
      public Object getAttribute(String name) throws Exception {
          return delegate.getAttribute(name);
      }
  
      public void setAttribute(String name, Object value) throws Exception {
          delegate.setAttribute(name, value);
      }
  
      public Object invoke(String name, Object[] arguments, String[] types) throws Exception {
          //we have no dynamic operations
          return null;
      }
  
      static {
          GBeanInfoFactory infoFactory = new GBeanInfoFactory(ResourceAdapterWrapper.class.getName());
          infoFactory.addAttribute(new GAttributeInfo("ResourceAdapterClass"));
          infoFactory.addEndpoint(new GEndpointInfo("BootstrapContext", BootstrapContext.class.getName()));
  
          infoFactory.addOperation(new GOperationInfo("registerManagedConnectionFactory", new String[] {ManagedConnectionFactory.class.getName()}));
          infoFactory.addOperation(new GOperationInfo("endpointActivation", new String[] {MessageEndpointFactory.class.getName(), ActivationSpec.class.getName()}));
          infoFactory.addOperation(new GOperationInfo("endpointDeactivation", new String[] {MessageEndpointFactory.class.getName(), ActivationSpec.class.getName()}));
          infoFactory.setConstructor(new GConstructorInfo(
                  new String[]{"ResourceAdapterClass", "BootstrapContext"},
                  new Class[]{Class.class, BootstrapContext.class}));
          GBEAN_INFO = infoFactory.getBeanInfo();
      }
  
      public static GBeanInfo getGBeanInfo() {
          return GBEAN_INFO;
      }
  }
  
  
  
  1.12      +2 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorDeploymentPlanner.java
  
  Index: ConnectorDeploymentPlanner.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorDeploymentPlanner.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ConnectorDeploymentPlanner.java	14 Jan 2004 08:29:38 -0000	1.11
  +++ ConnectorDeploymentPlanner.java	21 Jan 2004 22:21:25 -0000	1.12
  @@ -203,7 +203,7 @@
           GeronimoConnectionManagerFactory gcmf = gcd.getGeronimoConnectionManagerFactory();
           assert gcmf != null: "Null GeronimoConnectionManagerFactory";
           MBeanMetadata cmfMD = getMBeanMetadata(raCS.getName(), deploymentUnitName, baseURI);
  -        cmfMD.setGeronimoMBeanDescriptor(gcmf.getConnectionManagerFactoryDescriptor());
  +        cmfMD.setGeronimoMBeanDescriptor(gcmf.getConnectionManagerFactoryClass());
           cmfMD.setName(buildConnectionManagerFactoryDeploymentName(gcd));
           adaptConfigProperties(gcmf.getConfigProperty(), null, cmfMD.getAttributeValues());
           addTasks(cmfMD, deploymentPlan);
  
  
  
  1.5       +2 -1      incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ManagedConnectionFactoryHelper.java
  
  Index: ManagedConnectionFactoryHelper.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ManagedConnectionFactoryHelper.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ManagedConnectionFactoryHelper.java	15 Jan 2004 01:20:53 -0000	1.4
  +++ ManagedConnectionFactoryHelper.java	21 Jan 2004 22:21:25 -0000	1.5
  @@ -71,6 +71,7 @@
   import org.apache.geronimo.kernel.service.GeronimoOperationInfo;
   import org.apache.geronimo.kernel.service.GeronimoParameterInfo;
   import org.apache.geronimo.naming.ger.GerContextManager;
  +import org.apache.geronimo.connector.outbound.ConnectionManagerFactory;
   
   /**
    * ManagedConnectionFactoryHelper
  
  
  
  1.1                  incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorDeployer.java
  
  Index: ConnectorDeployer.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  package org.apache.geronimo.connector.deployment;
  
  import java.net.URI;
  
  import javax.xml.parsers.DocumentBuilder;
  import javax.xml.parsers.ParserConfigurationException;
  import javax.management.ObjectName;
  
  import org.apache.geronimo.deployment.ModuleFactory;
  import org.apache.geronimo.deployment.DeploymentModule;
  import org.apache.geronimo.deployment.model.geronimo.connector.GeronimoConnectorDocument;
  import org.apache.geronimo.deployment.model.connector.ConnectorDocument;
  import org.apache.geronimo.deployment.xml.ParserFactory;
  import org.apache.geronimo.deployment.util.DeploymentHelper;
  import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  import org.apache.geronimo.kernel.deployment.DeploymentException;
  import org.apache.geronimo.gbean.GBeanInfo;
  import org.apache.geronimo.gbean.GBeanInfoFactory;
  import org.apache.geronimo.gbean.GAttributeInfo;
  import org.apache.geronimo.gbean.GOperationInfo;
  import org.apache.geronimo.gbean.GEndpointInfo;
  import org.apache.geronimo.gbean.GConstructorInfo;
  import org.apache.geronimo.xml.deployment.GeronimoConnectorLoader;
  import org.apache.geronimo.xml.deployment.ConnectorLoader;
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.w3c.dom.Document;
  
  /**
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/21 22:21:25 $
   *
   * */
  public class ConnectorDeployer implements ModuleFactory {
      private static final Log log = LogFactory.getLog(ConnectorDeployer.class);
  
      private final static GBeanInfo GBEAN_INFO;
  
      private final ParserFactory parserFactory;
  
      private ObjectName connectionTrackerNamePattern;
  
      public ConnectorDeployer(ObjectName connectionTrackerNamePattern, ParserFactory parserFactory) {
          this.connectionTrackerNamePattern = connectionTrackerNamePattern;
          this.parserFactory = parserFactory;
      }
  
      public ParserFactory getParserFactory() {
          return parserFactory;
      }
  
      public ObjectName getConnectionTrackerNamePattern() {
          return connectionTrackerNamePattern;
      }
  
      public DeploymentModule getModule(URLInfo urlInfo, URI moduleID) throws DeploymentException {
          DeploymentHelper deploymentHelper = new DeploymentHelper(urlInfo, "ra.xml", "geronimo-ra.xml", "META-INF");
          //we require both the standard dd and the Geronimo dd.
          if (deploymentHelper.locateGeronimoDD() == null || deploymentHelper.locateJ2EEDD() == null) {
              return null;
          }
          DocumentBuilder parser = null;
          try {
              parser = parserFactory.getParser();
          } catch (ParserConfigurationException e) {
              throw new DeploymentException("Could not configure parser", e);
          }
          Document connectorDoc = deploymentHelper.getJ2EEDoc(parser);
          if (connectorDoc == null) {
              return null;
          }
          ConnectorDocument connectorDocument = ConnectorLoader.load(connectorDoc);
  
          GeronimoConnectorDocument geronimoConnectorDocument = null;
          Document geronimoConnectorDoc = deploymentHelper.getGeronimoDoc(parser);
          if (geronimoConnectorDoc == null) {
              return null;
          }
          geronimoConnectorDocument = GeronimoConnectorLoader.load(geronimoConnectorDoc, connectorDocument);
  
          return new ConnectorModule(moduleID, geronimoConnectorDocument, this);
      }
  
      static {
          GBeanInfoFactory infoFactory = new GBeanInfoFactory(ConnectorDeployer.class.getName());
          infoFactory.addAttribute(new GAttributeInfo("ConnectionTrackerNamePattern", true));
          infoFactory.addOperation(new GOperationInfo("getModule", new String[]{URLInfo.class.getName(), URI.class.getName()}));
          infoFactory.addEndpoint(new GEndpointInfo("ParserFactory", ParserFactory.class.getName()));
          infoFactory.setConstructor(new GConstructorInfo(new String[]{"ConnectionTrackerNamePattern", "ParserFactory"},
                  new Class[]{ObjectName.class, ParserFactory.class}));
          GBEAN_INFO = infoFactory.getBeanInfo();
  
      }
  
      public static GBeanInfo getGBeanInfo() {
          return GBEAN_INFO;
      }
  }
  
  
  
  1.1                  incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorModule.java
  
  Index: ConnectorModule.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  package org.apache.geronimo.connector.deployment;
  
  import java.beans.PropertyEditor;
  import java.net.URI;
  import java.util.Collections;
  
  import javax.management.AttributeNotFoundException;
  import javax.management.InvalidAttributeValueException;
  import javax.management.MBeanException;
  import javax.management.MalformedObjectNameException;
  import javax.management.ObjectName;
  import javax.management.ReflectionException;
  
  import org.apache.geronimo.common.propertyeditor.PropertyEditors;
  import org.apache.geronimo.connector.ResourceAdapterWrapper;
  import org.apache.geronimo.connector.outbound.ManagedConnectionFactoryWrapper;
  import org.apache.geronimo.deployment.ConfigurationCallback;
  import org.apache.geronimo.deployment.DeploymentModule;
  import org.apache.geronimo.deployment.model.connector.ConfigProperty;
  import org.apache.geronimo.deployment.model.geronimo.connector.GeronimoConnectionDefinition;
  import org.apache.geronimo.deployment.model.geronimo.connector.GeronimoConnectionManagerFactory;
  import org.apache.geronimo.deployment.model.geronimo.connector.GeronimoConnectorDocument;
  import org.apache.geronimo.deployment.model.geronimo.connector.GeronimoResourceAdapter;
  import org.apache.geronimo.gbean.DynamicGAttributeInfo;
  import org.apache.geronimo.gbean.GBeanInfo;
  import org.apache.geronimo.gbean.GBeanInfoFactory;
  import org.apache.geronimo.gbean.InvalidConfigurationException;
  import org.apache.geronimo.gbean.jmx.GBeanMBean;
  import org.apache.geronimo.kernel.Kernel;
  import org.apache.geronimo.kernel.deployment.DeploymentException;
  
  /**
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/21 22:21:25 $
   *
   * */
  public class ConnectorModule implements DeploymentModule {
  
      public final static String BASE_RESOURCE_ADAPTER_NAME = "geronimo.management:J2eeType=ResourceAdapter,name=";
      private final static String BASE_CONNECTION_MANAGER_FACTORY_NAME = "geronimo.management:J2eeType=ConnectionManager,name=";
      private static final String BASE_MANAGED_CONNECTION_FACTORY_NAME = "geronimo.management:J2eeType=ManagedConnectionFactory,name=";
      private static final String BASE_REALM_BRIDGE_NAME = "geronimo.security:service=RealmBridge,name=";
      private static final String BASE_PASSWORD_CREDENTIAL_LOGIN_MODULE_NAME = "geronimo.security:service=Realm,type=PasswordCredential,name=";
  
      private URI moduleID;
      private GeronimoConnectorDocument geronimoConnectorDocument;
      private ConnectorDeployer connectorDeployer;
  
      public ConnectorModule(URI moduleID, GeronimoConnectorDocument geronimoConnectorDocument, ConnectorDeployer connectorDeployer) {
          this.moduleID = moduleID;
          this.geronimoConnectorDocument = geronimoConnectorDocument;
          this.connectorDeployer = connectorDeployer;
      }
  
      public void init() throws DeploymentException {
      }
  
      public void generateClassPath(ConfigurationCallback callback) throws DeploymentException {
          //I have no idea
      }
  
      public void defineGBeans(ConfigurationCallback callback, ClassLoader cl) throws DeploymentException {
          GeronimoResourceAdapter geronimoResourceAdapter = geronimoConnectorDocument.getGeronimoConnector().getGeronimoResourceAdapter();
          //ResourceAdapter setup
          String resourceAdapterClassName = geronimoResourceAdapter.getResourceAdapterClass();
          ObjectName resourceAdapterObjectName = null;
          if (resourceAdapterClassName != null) {
              GBeanInfoFactory resourceAdapterInfoFactory = new GBeanInfoFactory(ResourceAdapterWrapper.class.getName(), ResourceAdapterWrapper.getGBeanInfo());
              GBeanMBean resourceAdapterGBean = setUpDynamicGBean(resourceAdapterInfoFactory, geronimoResourceAdapter.getConfigProperty());
              try {
                  resourceAdapterGBean.setAttribute("ResourceAdapterClass", cl.loadClass(geronimoResourceAdapter.getResourceAdapterClass()));
              } catch (Exception e) {
                  throw new DeploymentException(e);
              }
              try {
                  resourceAdapterObjectName = ObjectName.getInstance(BASE_RESOURCE_ADAPTER_NAME + moduleID);
              } catch (MalformedObjectNameException e) {
                  throw new DeploymentException("Could not construct resource adapter object name", e);
              }
              callback.addGBean(resourceAdapterObjectName, resourceAdapterGBean);
          }
          //ManagedConnectionFactory setup
          for (int i = 0; i < geronimoResourceAdapter.getGeronimoOutboundResourceAdapter().getGeronimoConnectionDefinition().length; i++) {
              GeronimoConnectionDefinition geronimoConnectionDefinition = geronimoResourceAdapter.getGeronimoOutboundResourceAdapter().getGeronimoConnectionDefinition(i);
              assert geronimoConnectionDefinition != null: "Null GeronimoConnectionDefinition";
              //ConnectionManagerFactory
              GeronimoConnectionManagerFactory geronimoConnectionManagerFactory = geronimoConnectionDefinition.getGeronimoConnectionManagerFactory();
              String connectionManagerFactoryClassName = geronimoConnectionManagerFactory.getConnectionManagerFactoryClass();
              GBeanInfo connectionManagerFactoryGBeanInfo;
              try {
                  connectionManagerFactoryGBeanInfo = GBeanInfo.getGBeanInfo(connectionManagerFactoryClassName, cl);
              } catch (InvalidConfigurationException e) {
                  throw new DeploymentException("Unable to get GBeanInfo from class " + connectionManagerFactoryClassName, e);
              }
  
              GBeanMBean connectionManagerFactoryGBean;
              try {
                  connectionManagerFactoryGBean = new GBeanMBean(connectionManagerFactoryGBeanInfo, cl);
              } catch (InvalidConfigurationException e) {
                  throw new DeploymentException("Unable to create GMBean", e);
              }
              try {
                  connectionManagerFactoryGBean.setEndpointPatterns("Kernel", Collections.singleton(Kernel.KERNEL));
                  connectionManagerFactoryGBean.setEndpointPatterns("ConnectionTracker", Collections.singleton(connectorDeployer.getConnectionTrackerNamePattern()));
                  if (geronimoConnectionManagerFactory.getRealmBridge() != null) {
                      connectionManagerFactoryGBean.setEndpointPatterns("RealmBridge", Collections.singleton(ObjectName.getInstance(BASE_REALM_BRIDGE_NAME + geronimoConnectionManagerFactory.getRealmBridge())));
                  }
                  setDynamicAttributes(connectionManagerFactoryGBean, geronimoConnectionManagerFactory.getConfigProperty());
              } catch (DeploymentException e) {
                  throw e;
              } catch (Exception e) {
                  throw new DeploymentException("Problem setting up ConnectionManagerFactory", e);
              }
              ObjectName connectionManagerFactoryObjectName = null;
              try {
                  connectionManagerFactoryObjectName = ObjectName.getInstance(BASE_CONNECTION_MANAGER_FACTORY_NAME + geronimoConnectionDefinition.getName());
              } catch (MalformedObjectNameException e) {
                  throw new DeploymentException("Could not name ConnectionManagerFactory", e);
              }
              callback.addGBean(connectionManagerFactoryObjectName, connectionManagerFactoryGBean);
              //ManagedConnectionFactory
  
              GBeanInfoFactory managedConnectionFactoryInfoFactory = new GBeanInfoFactory(ManagedConnectionFactoryWrapper.class.getName(), ManagedConnectionFactoryWrapper.getGBeanInfo());
              GBeanMBean managedConnectionFactoryGBean = setUpDynamicGBean(managedConnectionFactoryInfoFactory, geronimoConnectionDefinition.getConfigProperty());
              try {
                  managedConnectionFactoryGBean.setAttribute("ManagedConnectionFactoryClass", cl.loadClass(geronimoConnectionDefinition.getManagedConnectionFactoryClass()));
                  managedConnectionFactoryGBean.setAttribute("ConnectionFactoryInterface", cl.loadClass(geronimoConnectionDefinition.getConnectionFactoryInterface()));
                  managedConnectionFactoryGBean.setAttribute("ConnectionFactoryImplClass", cl.loadClass(geronimoConnectionDefinition.getConnectionFactoryImplClass()));
                  managedConnectionFactoryGBean.setAttribute("ConnectionInterface", cl.loadClass(geronimoConnectionDefinition.getConnectionInterface()));
                  managedConnectionFactoryGBean.setAttribute("ConnectionImplClass", cl.loadClass(geronimoConnectionDefinition.getConnectionImplClass()));
                  managedConnectionFactoryGBean.setAttribute("GlobalJNDIName", geronimoConnectionDefinition.getGlobalJndiName());
                  if (resourceAdapterClassName != null) {
                      managedConnectionFactoryGBean.setEndpointPatterns("ResourceAdapterWrapper", Collections.singleton(resourceAdapterObjectName));
                  }
                  managedConnectionFactoryGBean.setEndpointPatterns("ConnectionManagerFactory", Collections.singleton(connectionManagerFactoryObjectName));
                  /*
                  //TODO also set up the login module
                  if (geronimoConnectionDefinition.getAuthentication().equals("BasicUserPassword")) {
                      managedConnectionFactoryGBean.setEndpointPatterns("ManagedConnectionFactoryListener", Collections.singleton(ObjectName.getInstance(BASE_PASSWORD_CREDENTIAL_LOGIN_MODULE_NAME + geronimoConnectionDefinition.getName())));
                  }
                  */
              } catch (Exception e) {
                  throw new DeploymentException(e);
              }
              ObjectName managedConnectionFactoryObjectName = null;
              try {
                  managedConnectionFactoryObjectName = ObjectName.getInstance(BASE_MANAGED_CONNECTION_FACTORY_NAME + geronimoConnectionDefinition.getName());
              } catch (MalformedObjectNameException e) {
                  throw new DeploymentException("Could not construct ManagedConnectionFactory object name", e);
              }
              callback.addGBean(managedConnectionFactoryObjectName, managedConnectionFactoryGBean);
  
          }
  
      }
  
      private GBeanMBean setUpDynamicGBean(GBeanInfoFactory infoFactory, ConfigProperty[] configProperties) throws DeploymentException {
          addDynamicAttributes(infoFactory, configProperties);
          GBeanInfo gbeanInfo = infoFactory.getBeanInfo();
          GBeanMBean gbean;
          try {
              gbean = new GBeanMBean(gbeanInfo);
          } catch (InvalidConfigurationException e) {
              throw new DeploymentException("Unable to create GMBean", e);
          }
          try {
              setDynamicAttributes(gbean, configProperties);
          } catch (DeploymentException e) {
              throw e;
          } catch (Exception e) {
              throw new DeploymentException(e);
          }
          return gbean;
      }
  
      //ManagedConnectionFactories are extremely restricted as to the attribute types.
      private void setDynamicAttributes(GBeanMBean gBean, ConfigProperty[] configProperties) throws DeploymentException, ReflectionException, MBeanException, InvalidAttributeValueException, AttributeNotFoundException {
          for (int i = 0; i < configProperties.length; i++) {
              ConfigProperty configProperty = configProperties[i];
              Object value;
              try {
                  PropertyEditor editor = PropertyEditors.findEditor(configProperty.getConfigPropertyType());
                  if (editor != null) {
                      editor.setAsText(configProperty.getConfigPropertyValue());
                      value = editor.getValue();
                  } else {
                      throw new DeploymentException("No property editor for type: " + configProperty.getConfigPropertyType());
                  }
              } catch (ClassNotFoundException e) {
                  throw new DeploymentException("Could not load attribute class: attribute: " + configProperty.getConfigPropertyName() + ", type: " + configProperty.getConfigPropertyType(), e);
              }
  
              gBean.setAttribute(configProperty.getConfigPropertyName(), value);
          }
      }
  
      void addDynamicAttributes(GBeanInfoFactory infoFactory, ConfigProperty[] configProperties) {
          for (int i = 0; i < configProperties.length; i++) {
              ConfigProperty configProperty = configProperties[i];
              infoFactory.addAttribute(new DynamicGAttributeInfo(configProperty.getConfigPropertyName(), true));
          }
      }
  
      public void complete() {
      }
  }
  
  
  
  1.13      +1 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/ConnectionManagerDeployment.java
  
  Index: ConnectionManagerDeployment.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/ConnectionManagerDeployment.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ConnectionManagerDeployment.java	20 Jan 2004 06:59:22 -0000	1.12
  +++ ConnectionManagerDeployment.java	21 Jan 2004 22:21:26 -0000	1.13
  @@ -63,7 +63,6 @@
   import javax.resource.ResourceException;
   import javax.resource.spi.ManagedConnectionFactory;
   
  -import org.apache.geronimo.connector.deployment.ConnectionManagerFactory;
   import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker;
   import org.apache.geronimo.gbean.GAttributeInfo;
   import org.apache.geronimo.gbean.GBean;
  
  
  
  1.1                  incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/ConnectionManagerFactory.java
  
  Index: ConnectionManagerFactory.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  package org.apache.geronimo.connector.outbound;
  
  import javax.resource.ResourceException;
  import javax.resource.spi.ManagedConnectionFactory;
  
  /**
   * ConnectionManagerFactory
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/21 22:21:26 $
   */
  public interface ConnectionManagerFactory {
  
      Object createConnectionFactory(ManagedConnectionFactory mcf) throws ResourceException;
  
  }
  
  
  
  1.1                  incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
  
  Index: ManagedConnectionFactoryWrapper.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  package org.apache.geronimo.connector.outbound;
  
  import javax.naming.NamingException;
  import javax.resource.spi.ManagedConnectionFactory;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.apache.geronimo.connector.ResourceAdapterWrapper;
  import org.apache.geronimo.connector.deployment.ManagedConnectionFactoryHelper;
  import org.apache.geronimo.connector.outbound.security.ManagedConnectionFactoryListener;
  import org.apache.geronimo.gbean.DynamicGBean;
  import org.apache.geronimo.gbean.DynamicGBeanDelegate;
  import org.apache.geronimo.gbean.GAttributeInfo;
  import org.apache.geronimo.gbean.GBean;
  import org.apache.geronimo.gbean.GBeanInfo;
  import org.apache.geronimo.gbean.GBeanInfoFactory;
  import org.apache.geronimo.gbean.GConstructorInfo;
  import org.apache.geronimo.gbean.GEndpointInfo;
  import org.apache.geronimo.gbean.GOperationInfo;
  import org.apache.geronimo.gbean.WaitingException;
  import org.apache.geronimo.naming.ger.GerContextManager;
  
  /**
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/21 22:21:26 $
   *
   * */
  public class ManagedConnectionFactoryWrapper implements GBean, DynamicGBean {
  
      private static final GBeanInfo GBEAN_INFO;
      private static final Log log = LogFactory.getLog(ManagedConnectionFactoryHelper.class);
  
      private final Class managedConnectionFactoryClass;
      private final Class connectionFactoryInterface;
      private final Class connectionFactoryImplClass;
      private final Class connectionInterface;
      private final Class connectionImplClass;
  
  
      private String globalJNDIName;
  
      private ResourceAdapterWrapper resourceAdapterWrapper;
      private ConnectionManagerFactory connectionManagerFactory;
      private ManagedConnectionFactoryListener managedConnectionFactoryListener;
  
      private ManagedConnectionFactory managedConnectionFactory;
  
      private Object connectionFactory;
  
      private DynamicGBeanDelegate delegate;
  
  
      private boolean registered = false;
  
      //default constructor for enhancement proxy endpoint
      public ManagedConnectionFactoryWrapper() {
          managedConnectionFactoryClass = null;
          connectionFactoryInterface = null;
          connectionFactoryImplClass = null;
          connectionInterface = null;
          connectionImplClass = null;
      }
  
      public ManagedConnectionFactoryWrapper(
              Class managedConnectionFactoryClass,
              Class connectionFactoryInterface,
              Class connectionFactoryImplClass,
              Class connectionInterface,
              Class connectionImplClass,
              String globalJNDIName,
              ResourceAdapterWrapper resourceAdapterWrapper,
              ConnectionManagerFactory connectionManagerFactory,
              ManagedConnectionFactoryListener managedConnectionFactoryListener) throws InstantiationException, IllegalAccessException {
          this.managedConnectionFactoryClass = managedConnectionFactoryClass;
          this.connectionFactoryInterface = connectionFactoryInterface;
          this.connectionFactoryImplClass = connectionFactoryImplClass;
          this.connectionInterface = connectionInterface;
          this.connectionImplClass = connectionImplClass;
  
          this.globalJNDIName = globalJNDIName;
          this.resourceAdapterWrapper = resourceAdapterWrapper;
          this.connectionManagerFactory = connectionManagerFactory;
  
          //set up that must be done before start
          managedConnectionFactory = (ManagedConnectionFactory) managedConnectionFactoryClass.newInstance();
          delegate = new DynamicGBeanDelegate();
          delegate.addAll(managedConnectionFactory);
          this.managedConnectionFactoryListener = managedConnectionFactoryListener;
      }
  
      public Class getManagedConnectionFactoryClass() {
          return managedConnectionFactoryClass;
      }
  
      public Class getConnectionFactoryInterface() {
          return connectionFactoryInterface;
      }
  
      public Class getConnectionFactoryImplClass() {
          return connectionFactoryImplClass;
      }
  
      public Class getConnectionInterface() {
          return connectionInterface;
      }
  
      public Class getConnectionImplClass() {
          return connectionImplClass;
      }
  
      public String getGlobalJNDIName() {
          return globalJNDIName;
      }
  
  
      public Object getConnectionFactory() {
          return connectionFactory;
      }
  
  
      public ResourceAdapterWrapper getResourceAdapterWrapper() {
          return resourceAdapterWrapper;
      }
  
      public void setResourceAdapterWrapper(ResourceAdapterWrapper resourceAdapterWrapper) {
          this.resourceAdapterWrapper = resourceAdapterWrapper;
      }
  
      public ConnectionManagerFactory getConnectionManagerFactory() {
          return connectionManagerFactory;
      }
  
      public void setConnectionManagerFactory(ConnectionManagerFactory connectionManagerFactory) {
          this.connectionManagerFactory = connectionManagerFactory;
      }
  
      //GBean implementation
      public void doStart() throws WaitingException, Exception {
          //register with resource adapter if not yet done
          if (!registered && resourceAdapterWrapper != null) {
              resourceAdapterWrapper.registerManagedConnectionFactory(managedConnectionFactory);
              registered = true;
              log.debug("Registered managedConnectionFactory with ResourceAdapter " + resourceAdapterWrapper.toString());
          }
          //set up login if present
          if (managedConnectionFactoryListener != null) {
              managedConnectionFactoryListener.setManagedConnectionFactory(managedConnectionFactory);
          }
  
          //create a new ConnectionFactory
          connectionFactory = connectionManagerFactory.createConnectionFactory(managedConnectionFactory);
          //If a globalJNDIName is supplied, bind it.
          if (globalJNDIName != null) {
              GerContextManager.bind(globalJNDIName, connectionFactory);
              log.debug("Bound connection factory into global 'ger:' context at " + globalJNDIName);
          }
  
      }
  
      public void doStop() throws WaitingException {
          //tear down login if present
          if (managedConnectionFactoryListener != null) {
              managedConnectionFactoryListener.setManagedConnectionFactory(null);
          }
          connectionFactory = null;
          if (globalJNDIName != null) {
              try {
                  GerContextManager.unbind(globalJNDIName);
              } catch (NamingException e) {
                  throw new RuntimeException(e);
              }
          }
      }
  
      public void doFail() {
      }
  
      //DynamicGBean implementation
      public Object getAttribute(String name) throws Exception {
          return delegate.getAttribute(name);
      }
  
      public void setAttribute(String name, Object value) throws Exception {
          delegate.setAttribute(name, value);
      }
  
      public Object invoke(String name, Object[] arguments, String[] types) throws Exception {
          //we have no dynamic operations.
          return null;
      }
  
  
      static {
          GBeanInfoFactory infoFactory = new GBeanInfoFactory(ManagedConnectionFactoryWrapper.class.getName());
  
          infoFactory.addAttribute(new GAttributeInfo("ManagedConnectionFactoryClass", true));
          infoFactory.addAttribute(new GAttributeInfo("ConnectionFactoryInterface", true));
          infoFactory.addAttribute(new GAttributeInfo("ConnectionFactoryImplClass", true));
          infoFactory.addAttribute(new GAttributeInfo("ConnectionInterface", true));
          infoFactory.addAttribute(new GAttributeInfo("ConnectionImplClass", true));
  
          infoFactory.addAttribute(new GAttributeInfo("GlobalJNDIName", true));
  
          infoFactory.addOperation(new GOperationInfo("getConnectionFactory"));
  
          infoFactory.addEndpoint(new GEndpointInfo("ResourceAdapterWrapper", ResourceAdapterWrapper.class.getName()));
          infoFactory.addEndpoint(new GEndpointInfo("ConnectionManagerFactory", ConnectionManagerFactory.class.getName()));
          infoFactory.addEndpoint(new GEndpointInfo("ManagedConnectionFactoryListener", ManagedConnectionFactoryListener.class.getName()));
          infoFactory.setConstructor(new GConstructorInfo(
                  new String[]{"ManagedConnectionFactoryClass", "ConnectionFactoryInterface", "ConnectionFactoryImplClass", "ConnectionInterface", "ConnectionImplClass",
                  "GlobalJNDIName", "ResourceAdapterWrapper", "ConnectionManagerFactory", "ManagedConnectionFactoryListener"},
                  new Class[]{Class.class, Class.class, Class.class, Class.class, Class.class,
                  String.class, ResourceAdapterWrapper.class, ConnectionManagerFactory.class, ManagedConnectionFactoryListener.class}));
  
          GBEAN_INFO = infoFactory.getBeanInfo();
      }
  
      public static GBeanInfo getGBeanInfo() {
          return GBEAN_INFO;
      }
  
  
  }
  
  
  
  1.3       +2 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialRealm.java
  
  Index: PasswordCredentialRealm.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialRealm.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PasswordCredentialRealm.java	20 Jan 2004 06:13:38 -0000	1.2
  +++ PasswordCredentialRealm.java	21 Jan 2004 22:21:26 -0000	1.3
  @@ -78,7 +78,7 @@
    * @version $Revision$ $Date$
    *
    * */
  -public class PasswordCredentialRealm implements SecurityRealm {
  +public class PasswordCredentialRealm implements SecurityRealm, ManagedConnectionFactoryListener {
   
       private static final GBeanInfo GBEAN_INFO;
   
  
  
  
  1.1                  incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/security/ManagedConnectionFactoryListener.java
  
  Index: ManagedConnectionFactoryListener.java
  ===================================================================
  package org.apache.geronimo.connector.outbound.security;
  
  import javax.resource.spi.ManagedConnectionFactory;
  
  /**
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/21 22:21:26 $
   *
   * */
  public interface ManagedConnectionFactoryListener {
      void setManagedConnectionFactory(ManagedConnectionFactory managedConnectionFactory);
  }
  
  
  
  1.54      +15 -1     incubator-geronimo/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/maven.xml,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- maven.xml	20 Jan 2004 14:59:28 -0000	1.53
  +++ maven.xml	21 Jan 2004 22:21:26 -0000	1.54
  @@ -667,6 +667,13 @@
                       <fileset dir="${maven.repo.local}/concurrent/jars">
                             <include name="concurrent-1.3.2.jar"/>
                       </fileset>
  +                    <!-- connector openjca loading test -->
  +                    <fileset dir="${maven.repo.local}/openejb-jca/jars">
  +                          <include name="openejb-jca-DEV.jar"/>
  +                    </fileset>
  +                    <fileset dir="${maven.repo.local}/hsqldb/jars">
  +                          <include name="hsqldb-1.7.1.jar"/>
  +                    </fileset>
                       <!-- WebDAV, not required for boot. To be fixed.-->
                       <fileset dir="${maven.repo.local}/tomcat/jars">
                             <include name="catalina-5.0.16.jar"/>
  @@ -754,6 +761,13 @@
                       <!-- connector work manager -->
                       <fileset dir="${maven.repo.local}/concurrent/jars">
                             <include name="concurrent-1.3.2.jar"/>
  +                    </fileset>
  +                    <!-- connector openjca loading test -->
  +                    <fileset dir="${maven.repo.local}/openejb-jca/jars">
  +                          <include name="openejb-jca-DEV.jar"/>
  +                    </fileset>
  +                    <fileset dir="${maven.repo.local}/hsqldb/jars">
  +                          <include name="hsqldb-1.7.1.jar"/>
                       </fileset>
                       <!-- WebDAV, not required for boot. To be fixed.-->
                       <fileset dir="${maven.repo.local}/tomcat/jars">
  
  
  
  1.34      +10 -1     incubator-geronimo/modules/core/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/project.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- project.xml	19 Jan 2004 06:28:04 -0000	1.33
  +++ project.xml	21 Jan 2004 22:21:26 -0000	1.34
  @@ -99,6 +99,15 @@
   
           <dependency>
               <groupId>geronimo</groupId>
  +            <artifactId>geronimo-deployment</artifactId>
  +            <version>DEV</version>
  +            <properties>
  +                <module>true</module>
  +            </properties>
  +        </dependency>
  +
  +        <dependency>
  +            <groupId>geronimo</groupId>
               <artifactId>geronimo-twiddle</artifactId>
               <version>DEV</version>
               <properties>
  
  
  
  1.5       +1 -12     incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/work/pool/AbstractWorkExecutorPool.java
  
  Index: AbstractWorkExecutorPool.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/work/pool/AbstractWorkExecutorPool.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractWorkExecutorPool.java	28 Dec 2003 19:31:16 -0000	1.4
  +++ AbstractWorkExecutorPool.java	21 Jan 2004 22:21:26 -0000	1.5
  @@ -61,8 +61,6 @@
   
   import EDU.oswego.cs.dl.util.concurrent.Channel;
   import org.apache.geronimo.connector.work.WorkerContext;
  -import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
  -import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
   
   /**
    * Based class for WorkExecutorPool. Sub-classes define the synchronization
  @@ -141,15 +139,6 @@
               wcj.setErrorCode(WorkException.INTERNAL);
               throw wcj;
           }
  -    }
  -
  -    public static GeronimoMBeanInfo getGeronimoMBeanInfo() throws Exception {
  -        GeronimoMBeanInfo rc = new GeronimoMBeanInfo();
  -        rc.setTargetClass(AbstractWorkExecutorPool.class);
  -        rc.addAttributeInfo(new GeronimoAttributeInfo("PoolSize", true, false));
  -        rc.addAttributeInfo(new GeronimoAttributeInfo("MinimumPoolSize", true, true));
  -        rc.addAttributeInfo(new GeronimoAttributeInfo("MaximumPoolSize", true, true));
  -        return rc;
       }
   
       /**
  
  
  
  1.4       +8 -8      incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/model/geronimo/connector/GeronimoConnectionManagerFactory.java
  
  Index: GeronimoConnectionManagerFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/model/geronimo/connector/GeronimoConnectionManagerFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GeronimoConnectionManagerFactory.java	14 Jan 2004 08:29:38 -0000	1.3
  +++ GeronimoConnectionManagerFactory.java	21 Jan 2004 22:21:26 -0000	1.4
  @@ -66,7 +66,7 @@
    */
   public class GeronimoConnectionManagerFactory implements Configurable {
   
  -    private String connectionManagerFactoryDescriptor;
  +    private String connectionManagerFactoryClass;
   
       private String realmBridge;
   
  @@ -101,17 +101,17 @@
       }
   
       /**
  -     * @return Returns the connectionManagerFactoryDescriptor.
  +     * @return Returns the connectionManagerFactoryClass.
        */
  -    public String getConnectionManagerFactoryDescriptor() {
  -        return connectionManagerFactoryDescriptor;
  +    public String getConnectionManagerFactoryClass() {
  +        return connectionManagerFactoryClass;
       }
   
       /**
  -     * @param connectionManagerFactoryDescriptor The connectionManagerFactoryDescriptor to set.
  +     * @param connectionManagerFactoryClass The connectionManagerFactoryClass to set.
        */
  -    public void setConnectionManagerFactoryDescriptor(String connectionManagerFactoryDescriptor) {
  -        this.connectionManagerFactoryDescriptor = connectionManagerFactoryDescriptor;
  +    public void setConnectionManagerFactoryClass(String connectionManagerFactoryClass) {
  +        this.connectionManagerFactoryClass = connectionManagerFactoryClass;
       }
   
       public String getRealmBridge() {
  
  
  
  1.4       +3 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/GeronimoConnectorLoader.java
  
  Index: GeronimoConnectorLoader.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/GeronimoConnectorLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GeronimoConnectorLoader.java	14 Jan 2004 08:29:38 -0000	1.3
  +++ GeronimoConnectorLoader.java	21 Jan 2004 22:21:26 -0000	1.4
  @@ -137,6 +137,7 @@
               Element root = roots[i];
               configProperties[i] = new ConfigProperty();
               configProperties[i].setConfigPropertyName(root.getAttribute("name"));
  +            configProperties[i].setConfigPropertyType(root.getAttribute("type"));
               configProperties[i].setConfigPropertyValue(LoaderUtil.getContent(root));
           }
           return configProperties;
  @@ -169,7 +170,7 @@
                           conDefinition[i].setGlobalJndiName(LoaderUtil.getChildContent(root, "global-jndi-name"));
                           GeronimoConnectionManagerFactory connectionManagerFactory = new GeronimoConnectionManagerFactory();
                           Element ecmf = LoaderUtil.getChild(root, "connectionmanager-factory");
  -                        connectionManagerFactory.setConnectionManagerFactoryDescriptor(LoaderUtil.getChildContent(ecmf, "connectionmanagerfactory-descriptor"));
  +                        connectionManagerFactory.setConnectionManagerFactoryClass(LoaderUtil.getChildContent(ecmf, "connectionmanagerfactory-class"));
                           connectionManagerFactory.setRealmBridge(LoaderUtil.getChildContent(ecmf, "realm-bridge"));
                           connectionManagerFactory.setConfigProperty(loadConfigPropertySettings(ecmf));
                           conDefinition[i].setGeronimoConnectionManagerFactory(connectionManagerFactory);
  
  
  
  1.4       +3 -2      incubator-geronimo/modules/core/src/schema/geronimo-connector_1_5.xsd
  
  Index: geronimo-connector_1_5.xsd
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/schema/geronimo-connector_1_5.xsd,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- geronimo-connector_1_5.xsd	15 Jan 2004 01:20:11 -0000	1.3
  +++ geronimo-connector_1_5.xsd	21 Jan 2004 22:21:26 -0000	1.4
  @@ -247,7 +247,8 @@
       <xsd:simpleContent>
         <xsd:restriction base="j2ee:xsdStringType"/>
       </xsd:simpleContent>
  -	<xsd:attribute name="name" type="j2ee:xsdStringType"/>
  +      <xsd:attribute name="name" type="j2ee:xsdStringType"/>
  +      <xsd:attribute name="type" type="j2ee:xsdStringType"/>
     </xsd:complexType>
   
   <!-- **************************************************** -->
  @@ -308,7 +309,7 @@
       </xsd:annotation>
   
       <xsd:sequence>
  -      <xsd:element name="connectionmanagerfactory-descriptor"
  +      <xsd:element name="connectionmanagerfactory-class"
   		   type="j2ee:string">
   	<xsd:annotation>
   	  <xsd:documentation>
  
  
  
  1.5       +2 -2      incubator-geronimo/modules/core/src/test/org/apache/geronimo/xml/deployment/GeronimoConnectorLoaderTest.java
  
  Index: GeronimoConnectorLoaderTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/test/org/apache/geronimo/xml/deployment/GeronimoConnectorLoaderTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GeronimoConnectorLoaderTest.java	14 Jan 2004 08:29:39 -0000	1.4
  +++ GeronimoConnectorLoaderTest.java	21 Jan 2004 22:21:27 -0000	1.5
  @@ -119,7 +119,7 @@
   
           GeronimoConnectionManagerFactory gcmf = goutboundResourceAdapter.getGeronimoConnectionDefinition()[0].getGeronimoConnectionManagerFactory();
           assertTrue("Expected a GeronimoConnectionManagerFactory", gcmf != null);
  -        assertTrue("Expected a descriptor for GeronimoConnectionManagerFactory", gcmf.getConnectionManagerFactoryDescriptor() != null);
  +        assertTrue("Expected a class for GeronimoConnectionManagerFactory", gcmf.getConnectionManagerFactoryClass() != null);
           assertNotNull("realm-bridge", gcmf.getRealmBridge());
           assertNotNull("global-jndi-name", goutboundResourceAdapter.getGeronimoConnectionDefinition()[0].getGlobalJndiName());
           assertEquals("Wrong ConfigProperty count:", 1, gcmf.getConfigProperty().length);
  
  
  
  1.3       +1 -1      incubator-geronimo/modules/core/src/test-data/xml/deployment/connector_1_5/geronimo-ra.xml
  
  Index: geronimo-ra.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/test-data/xml/deployment/connector_1_5/geronimo-ra.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- geronimo-ra.xml	14 Jan 2004 08:29:39 -0000	1.2
  +++ geronimo-ra.xml	21 Jan 2004 22:21:27 -0000	1.3
  @@ -15,7 +15,7 @@
             <config-property-setting name="OutboundStringProperty1">newvalue1</config-property-setting>
             <config-property-setting name="OutboundStringProperty3">newvalue2</config-property-setting>
           <connectionmanager-factory>
  -          <connectionmanagerfactory-descriptor>org.apache.geronimo.connector.outbound.ConnectionManagerDeployer</connectionmanagerfactory-descriptor>
  +          <connectionmanagerfactory-class>org.apache.geronimo.connector.outbound.ConnectionManagerDeployer</connectionmanagerfactory-class>
             <realm-bridge>geronimo.security:role=RealmBridge,target=TargetRealm</realm-bridge>
             <config-property-setting name="CacheByTransaction">true</config-property-setting>
           </connectionmanager-factory>
  
  
  

Mime
View raw message