geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r706357 [8/13] - in /geronimo/server/trunk/plugins/connector-1_6: ./ client-transaction-1_6/ client-transaction-1_6/src/ client-transaction-1_6/src/main/ client-transaction-1_6/src/main/history/ client-transaction-1_6/src/main/plan/ client-...
Date Mon, 20 Oct 2008 18:23:42 GMT
Added: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBRoot.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBRoot.java?rev=706357&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBRoot.java (added)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBRoot.java Mon Oct 20 11:23:36 2008
@@ -0,0 +1,182 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.connector.deployment.jsr88;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Arrays;
+import javax.enterprise.deploy.model.DDBeanRoot;
+import javax.enterprise.deploy.model.DDBean;
+import javax.enterprise.deploy.spi.DConfigBean;
+import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
+import org.apache.geronimo.deployment.plugin.DConfigBeanRootSupport;
+import org.apache.geronimo.xbeans.geronimo.GerConnectorDocument;
+import org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType;
+import org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType;
+import org.apache.geronimo.xbeans.geronimo.GerResourceadapterInstanceType;
+import org.apache.geronimo.xbeans.geronimo.GerConfigPropertySettingType;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlException;
+import org.apache.xmlbeans.SchemaTypeLoader;
+import org.apache.xmlbeans.XmlBeans;
+import org.apache.xmlbeans.XmlCursor;
+
+/**
+ * Represents "/" in a Geronimo Connector deployment plan (geronimo-ra.xml).
+ * The only function here is to navigate to an appropriate "Connector"
+ * DConfigBean.
+ *
+ * @version $Rev$ $Date$
+ */
+public class Connector15DCBRoot extends DConfigBeanRootSupport {
+    // This may be overcomplicated -- if we don't refer to J2EE types in our schemas
+    // then we should only need to use the GerConnectorDocument loader
+    static final SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.typeLoaderUnion(new SchemaTypeLoader[] {
+        XmlBeans.typeLoaderForClassLoader(org.apache.geronimo.xbeans.j2ee.String.class.getClassLoader()),
+        XmlBeans.typeLoaderForClassLoader(GerConnectorDocument.class.getClassLoader())
+    });
+
+    private ConnectorDCB connector;
+
+    public Connector15DCBRoot(DDBeanRoot ddBean) {
+        super(ddBean, null);
+        setXmlObject(loadDefaultData(ddBean));
+    }
+
+    private XmlObject loadDefaultData(DDBeanRoot root) {
+        InputStream in = root.getDeployableObject().getEntry("META-INF/geronimo-ra.xml");
+        if(in == null) {
+            GerConnectorDocument doc = GerConnectorDocument.Factory.newInstance();
+            DDBean[] list = root.getChildBean("connector");
+            if(list.length > 0) {
+                connector = new ConnectorDCB(list[0], doc.addNewConnector());
+            }
+            return doc;
+        } else {
+            try {
+                GerConnectorDocument result =  GerConnectorDocument.Factory.parse(in);
+                in.close();
+                DDBean[] list = root.getChildBean("connector");
+                if(list.length > 0) {
+                    connector = new ConnectorDCB(list[0], result.getConnector());
+                }
+                return result;
+            } catch (XmlException e) {
+                throw new RuntimeException("Unable to load default Geronimo RA data", e);
+            } catch (IOException e) {
+                throw new RuntimeException("Unable to load default Geronimo RA data", e);
+            }
+        }
+    }
+
+    GerConnectorDocument getConnectorDocument() {
+        return (GerConnectorDocument) getXmlObject();
+    }
+
+    public String[] getXpaths() {
+        return getXPathsForJ2ee_1_4(new String[][]{{"connector",},});
+    }
+
+    public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException {
+        if (getXpaths()[0].equals(bean.getXpath())) { // "connector"
+            return connector;
+        } else {
+            throw new ConfigurationException("No DConfigBean matching DDBean "+bean.getXpath());
+        }
+    }
+
+    protected SchemaTypeLoader getSchemaTypeLoader() {
+        return SCHEMA_TYPE_LOADER;
+    }
+
+    /**
+     * When loaded, reset the cached "connector" child
+     */
+    public void fromXML(InputStream inputStream) throws XmlException, IOException {
+        DDBean ddb = connector.getDDBean();
+        super.fromXML(inputStream);
+        if(getConnectorDocument().getConnector() != null) {
+            connector = new ConnectorDCB(ddb, getConnectorDocument().getConnector());
+        } else {
+            connector = new ConnectorDCB(ddb, getConnectorDocument().addNewConnector());
+        }
+        //todo: fire some kind of notification for the DDBeans to catch?
+    }
+
+    /**
+     * A little trickery -- on a save event, temporarily remove any config-property-setting
+     * elements with a null value, and then immediately replace them again.  This is because
+     * we don't want to write them out as null, but we also want to keep the objects in
+     * sync 1:1 with the config params declared in the J2EE deployment descriptor.
+     */
+    public void toXML(OutputStream outputStream) throws IOException {
+        List parents = new ArrayList();
+        clearNulls(parents);
+        try {
+            super.toXML(outputStream);
+        } finally {
+            for (int i = 0; i < parents.size(); i++) {
+                Object parent = parents.get(i);
+                ConfigHolder instance = (ConfigHolder) parent;
+                instance.reconfigure();
+            }
+        }
+    }
+
+    private void clearNulls(List parents) {
+        ResourceAdapter[] adapters = connector.getResourceAdapter();
+        for (int i = 0; i < adapters.length; i++) {
+            ResourceAdapter adapter = adapters[i];
+            if(adapter.getResourceAdapterInstance() != null) {
+                parents.add(adapter.getResourceAdapterInstance());
+                adapter.getResourceAdapterInstance().clearNullSettings();
+            }
+            ConnectionDefinition defs[] = adapter.getConnectionDefinition();
+            for (int j = 0; j < defs.length; j++) {
+                ConnectionDefinition def = defs[j];
+                ConnectionDefinitionInstance instances[] = def.getConnectionInstances();
+                for (int k = 0; k < instances.length; k++) {
+                    ConnectionDefinitionInstance instance = instances[k];
+                    parents.add(instance);
+                    instance.clearNullSettings();
+                }
+            }
+        }
+        try {
+            DDBean[] adminDDBs = connector.getDDBean().getChildBean(connector.getXpaths()[0]);
+            if(adminDDBs == null) adminDDBs = new DDBean[0];
+            for (int i = 0; i < adminDDBs.length; i++) {
+                DDBean ddb = adminDDBs[i];
+                AdminObjectDCB dcb = (AdminObjectDCB) connector.getDConfigBean(ddb);
+                AdminObjectInstance[] instances = dcb.getAdminObjectInstance();
+                for (int j = 0; j < instances.length; j++) {
+                    AdminObjectInstance instance = instances[j];
+                    parents.add(instance);
+                    instance.clearNullSettings();
+                }
+            }
+        } catch (ConfigurationException e) {
+            e.printStackTrace();
+        }
+    }
+}

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBRoot.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBRoot.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBRoot.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java?rev=706357&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java (added)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java Mon Oct 20 11:23:36 2008
@@ -0,0 +1,290 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.connector.deployment.jsr88;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.enterprise.deploy.model.DDBean;
+import javax.enterprise.deploy.model.XpathEvent;
+import javax.enterprise.deploy.model.XpathListener;
+import javax.enterprise.deploy.spi.DConfigBean;
+import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
+import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
+import org.apache.geronimo.deployment.service.jsr88.EnvironmentData;
+import org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType;
+import org.apache.geronimo.xbeans.geronimo.GerAdminobjectType;
+import org.apache.geronimo.xbeans.geronimo.GerConnectorType;
+import org.apache.geronimo.xbeans.geronimo.GerResourceadapterType;
+import org.apache.xmlbeans.SchemaTypeLoader;
+import org.apache.xmlbeans.XmlCursor;
+
+/**
+ * Represents /connector in a Geronimo Connector deployment plan.
+ * Corresponds to /connector in the J2EE deployment plan.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ConnectorDCB extends DConfigBeanSupport {
+    private DDBean resourceAdapterDDBean;
+    private ResourceAdapter[] resourceAdapter = new ResourceAdapter[0];
+    private AdminObjectDCB[] adminobjects = new AdminObjectDCB[0];
+    private EnvironmentData environment;
+
+    public ConnectorDCB(DDBean connectorDDBean, final GerConnectorType connector) {
+        super(connectorDDBean, connector);
+        DDBean[] list = connectorDDBean.getChildBean("resourceadapter");
+        if(list.length > 0) {
+            resourceAdapterDDBean = list[0];
+        }
+        //todo: do something if resourceAdapterDDBean is null
+        loadExistingData(connector);
+
+        // Make sure we're told if /connector/resourceadapter is replaced!
+        connectorDDBean.addXpathListener("resourceadapter", new XpathListener() {
+            public void fireXpathEvent(XpathEvent event) {
+                if(event.isRemoveEvent()) {
+                    resourceAdapterDDBean = null; //todo: all our info was just invalidated
+                } else if(event.isAddEvent()) {
+                    resourceAdapterDDBean = event.getBean(); //todo: reload defaults from DDBean
+                } else {
+                    System.out.println("Detected change to J2EE DD /connector/resourceadapter property "+event.getChangeEvent().getPropertyName());
+                }
+            }
+        });
+    }
+
+    public String[] getXpaths() {
+        return getXPathsForJ2ee_1_4(new String[][]{{"resourceadapter","adminobject",},});
+    }
+
+    public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException {
+        if (getXpaths()[0].equals(bean.getXpath())) { // "adminobject"
+            String aoInterface = bean.getText("adminobject-interface")[0];
+            String aoClass = bean.getText("adminobject-class")[0];
+            // Check whether we've seen this one before
+            for(int i=0; i<adminobjects.length; i++) {
+                if(adminobjects[i].getAdminObjectClass().equals(aoClass) &&
+                   adminobjects[i].getAdminObjectInterface().equals(aoInterface)) {
+                    return adminobjects[i];
+                }
+            }
+            // Haven't seen it; create a new DConfigBean
+            GerAdminobjectType ao = getConnector().addNewAdminobject();
+            AdminObjectDCB dcb = new AdminObjectDCB(bean, ao);
+            AdminObjectDCB[] list = new AdminObjectDCB[adminobjects.length+1];
+            System.arraycopy(adminobjects, 0, list, 0, adminobjects.length);
+            list[adminobjects.length] = dcb;
+            return dcb;
+        } else {
+            throw new ConfigurationException("No DConfigBean matching DDBean "+bean.getXpath());
+        }
+    }
+
+    private void loadExistingData(GerConnectorType connector) {
+        //todo: Handle the import children
+        //todo: Handle the hidden-classes children
+        //todo: Handle the non-overridable-classes children
+        // Handle the dependency children
+//        ArtifactType[] deps = connector.getDependencyArray();
+//        if(deps != null && deps.length > 0) {
+//            dependency = new Artifact[deps.length];
+//            for (int i = 0; i < deps.length; i++) {
+//                dependency[i] = new Artifact(deps[i]);
+//            }
+//        }
+        // Handle the resource adapter children
+        GerResourceadapterType[] adapters = connector.getResourceadapterArray();
+        if(adapters == null || adapters.length == 0) {
+            // Make sure there's at least one connector/resourceadapter element
+            if(resourceAdapterDDBean != null) {
+                resourceAdapter = new ResourceAdapter[1];
+                resourceAdapter[0] = new ResourceAdapter(resourceAdapterDDBean, connector.addNewResourceadapter());
+            }
+        } else {
+            resourceAdapter = new ResourceAdapter[adapters.length];
+            for (int i = 0; i < adapters.length; i++) {
+                GerResourceadapterType adapter = adapters[i];
+                resourceAdapter[i] = new ResourceAdapter(resourceAdapterDDBean, adapter);
+            }
+        }
+        // Handle the AdminObject children
+        GerAdminobjectType[] admins = connector.getAdminobjectArray();
+        DDBean[] data = getDDBean().getChildBean(getXpaths()[0]);
+        List ddBeans = data == null ? Collections.EMPTY_LIST : new ArrayList(Arrays.asList(data)); // resourceadapter/adminobject
+
+        Map dcbs = new LinkedHashMap();
+        if(admins == null) {
+            adminobjects = new AdminObjectDCB[0];
+        } else {
+            // Match up each Geronimo adminobject with a ra.xml adminobject and create DConfigBeans accordingly
+            for (int i = 0; i < admins.length; i++) {
+                GerAdminobjectType admin = admins[i];
+                String aoClass = admin.getAdminobjectClass();
+                String aoIface = admin.getAdminobjectInterface();
+                AdminObjectDCB dcb = (AdminObjectDCB) dcbs.get("class "+aoClass+" iface "+aoIface);
+                if(dcb != null) {
+                    // this is a second Geronimo adminobject block of the same type; there will not be a matching DDBean any more
+                    // merge the adminobject-instance entries instead!!!
+                    if(admin.getAdminobjectInstanceArray().length > 0) {
+                        GerAdminobjectType old = dcb.getAdminObject();
+                        GerAdminobjectInstanceType[] array = admin.getAdminobjectInstanceArray();
+                        int oldCount = dcb.getAdminObjectInstance().length;
+                        for (int j = 0; j < array.length; j++) {
+                            GerAdminobjectInstanceType instance = array[j];
+                            XmlCursor source = instance.newCursor();
+                            XmlCursor dest = old.newCursor();
+                            dest.toEndToken();
+                            if(!source.moveXml(dest)) {
+                                throw new RuntimeException("Unable to move admin object instance");
+                            }
+                            source.dispose();
+                            dest.dispose();
+                            dcb.addAdminObjectInstance(old.getAdminobjectInstanceArray(oldCount+j));
+                        }
+                    }
+                    continue;
+                }
+                DDBean target = null;
+                for (int j = 0; j < ddBeans.size(); j++) {
+                    DDBean ddBean = (DDBean) ddBeans.get(j);
+                    String ddClass = ddBean.getText("adminobject-class")[0];
+                    String ddIface = ddBean.getText("adminobject-interface")[0];
+                    if(ddClass.equals(aoClass) && ddIface.equals(aoIface)) {
+                        target = ddBean;
+                        ddBeans.remove(j);
+                        break;
+                    }
+                }
+                if(target == null) {
+                    System.out.println("Geronimo connector deployment plan has admin object with interface '"+aoIface+"' and class '"+aoClass+"' but the ra.xml does not have a matching adminobject declared.  Deleting this adminobject from the Geronimo plan.");
+                    continue;
+                }
+                dcb = new AdminObjectDCB(target, admin);
+                dcbs.put("class "+aoClass+" iface "+aoIface, dcb);
+            }
+        }
+        // There are some admin object types in ra.xml with no matching instances; create DConfigBeans for those
+        for (int i = 0; i < ddBeans.size(); i++) {
+            DDBean ddBean = (DDBean) ddBeans.get(i);
+            String ddClass = ddBean.getText("adminobject-class")[0];
+            String ddIface = ddBean.getText("adminobject-interface")[0];
+            GerAdminobjectType admin = connector.addNewAdminobject();
+            dcbs.put("class "+ddClass+" iface "+ddIface, new AdminObjectDCB(ddBean, admin));
+        }
+        List adminResults = new ArrayList();
+        for (Iterator it = dcbs.keySet().iterator(); it.hasNext();) {
+            String key = (String) it.next();
+            DConfigBean value = (DConfigBean) dcbs.get(key);
+            adminResults.add(value);
+        }
+        adminobjects = (AdminObjectDCB[]) adminResults.toArray(new AdminObjectDCB[adminResults.size()]);
+
+        //todo: Handle the GBean children
+    }
+
+    GerConnectorType getConnector() {
+        return (GerConnectorType) getXmlObject();
+    }
+
+
+    // ----------------------- JavaBean Properties for /connector ----------------------
+
+    //todo: the following child elements
+    // gbean*
+
+    public EnvironmentData getEnvironment() {
+        return environment;
+    }
+
+    public void setEnvironment(EnvironmentData environment) {
+        EnvironmentData old = this.environment;
+        this.environment = environment;
+        if((old == null && environment == null) || (old != null&& old == environment)) {
+            return;
+        }
+        if(old != null) {
+            getConnector().unsetEnvironment();
+        }
+        if(environment != null) {
+            environment.configure(getConnector().addNewEnvironment());
+        }
+        pcs.firePropertyChange("environment", old, environment);
+    }
+
+    public ResourceAdapter[] getResourceAdapter() {
+        return resourceAdapter;
+    }
+
+    public void setResourceAdapter(ResourceAdapter[] resourceAdapter) {
+        ResourceAdapter[] old = this.resourceAdapter;
+        Set before = new HashSet();
+        for (int i = 0; i < old.length; i++) {
+            before.add(old[i]);
+        }
+        this.resourceAdapter = resourceAdapter;
+        // Handle current or new resource adapters
+        for (int i = 0; i < resourceAdapter.length; i++) {
+            ResourceAdapter adapter = resourceAdapter[i];
+            if(adapter.getResourceAdapter() == null) {
+                adapter.configure(resourceAdapterDDBean, getConnector().addNewResourceadapter());
+            } else {
+                before.remove(adapter);
+            }
+        }
+        // Handle removed resource adapters
+        for (Iterator it = before.iterator(); it.hasNext();) {
+            ResourceAdapter adapter = (ResourceAdapter) it.next();
+            GerResourceadapterType all[] = getConnector().getResourceadapterArray();
+            for (int i = 0; i < all.length; i++) {
+                if(all[i] == adapter) {
+                    getConnector().removeResourceadapter(i);
+                    break;
+                }
+            }
+        }
+        pcs.firePropertyChange("resourceAdapter", old, resourceAdapter);
+    }
+
+    public ResourceAdapter getResourceAdapter(int index) {
+        return resourceAdapter[index];
+    }
+
+    public void setResourceAdapter(int index, ResourceAdapter ra) {
+        ResourceAdapter[] old = this.resourceAdapter;
+        resourceAdapter[index] = ra;
+        if(ra.getResourceAdapter() == null) {
+            ra.configure(resourceAdapterDDBean, getConnector().addNewResourceadapter());
+        }
+        pcs.firePropertyChange("resourceAdapter", old, resourceAdapter);
+    }
+
+
+    // ----------------------- End of JavaBean Properties ----------------------
+
+
+
+    protected SchemaTypeLoader getSchemaTypeLoader() {
+        return Connector15DCBRoot.SCHEMA_TYPE_LOADER;
+    }
+}

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ConnectorDCB.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/PartitionedPool.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/PartitionedPool.java?rev=706357&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/PartitionedPool.java (added)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/PartitionedPool.java Mon Oct 20 11:23:36 2008
@@ -0,0 +1,81 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.connector.deployment.jsr88;
+
+import org.apache.geronimo.xbeans.geronimo.GerPartitionedpoolType;
+import org.apache.geronimo.xbeans.geronimo.GerSinglepoolType;
+
+/**
+ * Settings for connectionmanager/partitioned-pool
+ *
+ * @version $Rev$ $Date$
+ */
+public class PartitionedPool extends SinglePool {
+    public PartitionedPool() {
+    }
+
+    public PartitionedPool(GerPartitionedpoolType pool) {
+        super(pool);
+    }
+
+    protected GerPartitionedpoolType getPool() {
+        return (GerPartitionedpoolType) getXmlObject();
+    }
+
+    protected void configure(GerSinglepoolType pool) {
+        super.configure(pool);
+        if(!isPartitionBySubject() && !isPartitionByRequest()) {
+            setPartitionBySubject(true);
+        }
+    }
+
+    public boolean isPartitionBySubject() {
+        return getPool().isSetPartitionBySubject();
+    }
+
+    public void setPartitionBySubject(boolean set) {
+        if(set) {
+            if(!isPartitionBySubject()) {
+                getPool().addNewPartitionBySubject();
+                pcs.firePropertyChange("partitionBySubject", !set, set);
+            }
+        } else {
+            if(isPartitionBySubject()) {
+                getPool().unsetPartitionBySubject();
+                pcs.firePropertyChange("partitionBySubject", !set, set);
+            }
+        }
+    }
+
+    public boolean isPartitionByRequest() {
+        return getPool().isSetPartitionByConnectionrequestinfo();
+    }
+
+    public void setPartitionByRequest(boolean set) {
+        if(set) {
+            if(!isPartitionBySubject()) {
+                getPool().addNewPartitionByConnectionrequestinfo();
+                pcs.firePropertyChange("partitionByRequest", !set, set);
+            }
+        } else {
+            if(isPartitionBySubject()) {
+                getPool().unsetPartitionByConnectionrequestinfo();
+                pcs.firePropertyChange("partitionByRequest", !set, set);
+            }
+        }
+    }
+}

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/PartitionedPool.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/PartitionedPool.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/PartitionedPool.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapter.java?rev=706357&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapter.java (added)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapter.java Mon Oct 20 11:23:36 2008
@@ -0,0 +1,161 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.connector.deployment.jsr88;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+import javax.enterprise.deploy.model.DDBean;
+import org.apache.geronimo.deployment.plugin.XmlBeanSupport;
+import org.apache.geronimo.xbeans.geronimo.GerResourceadapterType;
+import org.apache.geronimo.xbeans.geronimo.GerOutboundResourceadapterType;
+import org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType;
+import org.apache.xmlbeans.SchemaTypeLoader;
+
+/**
+ * Represents /connector/resourceadapter in the Geronimo Connector deployment plan.
+ * Note: is not a DConfigBean, because there may be more than one ResourceAdapter
+ * in the Geronimo plan per ResourceAdapter in the J2EE deployment descriptor.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ResourceAdapter extends XmlBeanSupport {
+    private DDBean resourceAdapter;
+    private ConnectionDefinition[] instances = new ConnectionDefinition[0];
+    private ResourceAdapterInstance resourceAdapterInstance;
+
+    public ResourceAdapter() {
+        super(null);
+    }
+
+    public ResourceAdapter(DDBean resourceAdapter, GerResourceadapterType ra) {
+        super(null);
+        configure(resourceAdapter, ra);
+    }
+
+    protected GerResourceadapterType getResourceAdapter() {
+        return (GerResourceadapterType)getXmlObject();
+    }
+
+    void configure(DDBean resourceAdapter, GerResourceadapterType ra) {
+        this.resourceAdapter = resourceAdapter;
+        setXmlObject(ra);
+        if(ra.isSetResourceadapterInstance()) {
+            resourceAdapterInstance = new ResourceAdapterInstance(resourceAdapter, ra.getResourceadapterInstance());
+        } else {
+            resourceAdapterInstance = null;
+        }
+        if(ra.isSetOutboundResourceadapter()) {
+            DDBean[] test = resourceAdapter.getChildBean("outbound-resourceadapter");
+            if(test != null && test.length > 0) {
+                GerOutboundResourceadapterType outbound = ra.getOutboundResourceadapter();
+                GerConnectionDefinitionType[] defs = outbound.getConnectionDefinitionArray();
+                if(defs != null) {
+                    instances = new ConnectionDefinition[defs.length];
+                    for (int i = 0; i < defs.length; i++) {
+                        GerConnectionDefinitionType def = defs[i];
+                        instances[i] = new ConnectionDefinition(resourceAdapter, def);
+                    }
+                }
+            } else {
+                //todo: clean up the Geronimo deployment info since there's no J2EE outbound RA
+            }
+        }
+    }
+
+    // ----------------------- JavaBean Properties for /connector/resourceadapter ----------------------
+
+    public ConnectionDefinition[] getConnectionDefinition() {
+        return instances;
+    }
+
+    public ConnectionDefinition getConnectionDefinition(int index) {
+        return instances[index];
+    }
+
+    public void setConnectionDefinition(ConnectionDefinition[] definitions) {
+        ConnectionDefinition[] old = getConnectionDefinition();
+
+        if(definitions != null && definitions.length > 0) {
+            if(!getResourceAdapter().isSetOutboundResourceadapter()) {
+                getResourceAdapter().addNewOutboundResourceadapter();
+            }
+        } else {
+            if(getResourceAdapter().isSetOutboundResourceadapter()) {
+                getResourceAdapter().unsetOutboundResourceadapter();
+            }
+        }
+        Set before = new HashSet();
+        for (int i = 0; i < old.length; i++) {
+            before.add(old[i]);
+        }
+        instances = definitions;
+        // Handle current or new definitions
+        for (int i = 0; i < definitions.length; i++) {
+            ConnectionDefinition definition = definitions[i];
+            if(definition.getConnectionDefinition() == null) {
+                definition.configure(resourceAdapter, getResourceAdapter().getOutboundResourceadapter().addNewConnectionDefinition());
+            } else {
+                before.remove(definition);
+            }
+        }
+        // Handle removed definitions
+        for (Iterator it = before.iterator(); it.hasNext();) {
+            ConnectionDefinition definition = (ConnectionDefinition) it.next();
+            GerConnectionDefinitionType all[] = getResourceAdapter().isSetOutboundResourceadapter() ? getResourceAdapter().getOutboundResourceadapter().getConnectionDefinitionArray() : new GerConnectionDefinitionType[0];
+            for (int i = 0; i < all.length; i++) {
+                if(all[i] == definition) {
+                    getResourceAdapter().getOutboundResourceadapter().removeConnectionDefinition(i);
+                    break;
+                }
+            }
+        }
+        pcs.firePropertyChange("connectionDefinition", old, instances);
+    }
+
+    public void setConnectionDefinition(int index, ConnectionDefinition definition) {
+        ConnectionDefinition[] old = instances;
+        instances[index] = definition;
+        if(definition.getConnectionDefinition() == null) {
+            definition.configure(resourceAdapter, getResourceAdapter().getOutboundResourceadapter().addNewConnectionDefinition());
+        }
+        pcs.firePropertyChange("connectionDefinition", old, instances);
+    }
+
+    public ResourceAdapterInstance getResourceAdapterInstance() {
+        return resourceAdapterInstance;
+    }
+
+    public void setResourceAdapterInstance(ResourceAdapterInstance resourceAdapterInstance) {
+        ResourceAdapterInstance old = this.resourceAdapterInstance;
+        this.resourceAdapterInstance = resourceAdapterInstance;
+        if(resourceAdapterInstance.getResourceAdapterInstance() == null) {
+            if(getResourceAdapter().isSetResourceadapterInstance()) {
+                resourceAdapterInstance.configure(resourceAdapter, getResourceAdapter().getResourceadapterInstance());
+            } else {
+                resourceAdapterInstance.configure(resourceAdapter, getResourceAdapter().addNewResourceadapterInstance());
+            }
+        }
+        pcs.firePropertyChange("resourceAdapterInstance", old, instances);
+    }
+
+    // ----------------------- End of JavaBean Properties ----------------------
+
+    protected SchemaTypeLoader getSchemaTypeLoader() {
+        return Connector15DCBRoot.SCHEMA_TYPE_LOADER;
+    }
+}

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapter.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapterInstance.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapterInstance.java?rev=706357&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapterInstance.java (added)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapterInstance.java Mon Oct 20 11:23:36 2008
@@ -0,0 +1,107 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.connector.deployment.jsr88;
+
+import org.apache.geronimo.xbeans.geronimo.GerResourceadapterInstanceType;
+import org.apache.geronimo.xbeans.geronimo.GerConfigPropertySettingType;
+import org.apache.geronimo.naming.deployment.jsr88.GBeanLocator;
+import org.apache.xmlbeans.SchemaTypeLoader;
+import javax.enterprise.deploy.model.DDBean;
+
+/**
+ * Represents /connector/resourceadapter/resourceadapter-instance in the
+ * Geronimo Connector deployment plan.  The settings here correspond to
+ * /connector/resourceadapter in the J2EE plan, but since there can be
+ * several instances per resource adapter, it's not 1:1 and this is not
+ * a DConfigBean.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ResourceAdapterInstance extends ConfigHolder {
+    private DDBean resourceAdapter;
+    private GBeanLocator workManager;
+
+    /**
+     * Present so a tool can create a new one
+     */
+    public ResourceAdapterInstance() {
+    }
+
+    public ResourceAdapterInstance(DDBean resourceAdapter, GerResourceadapterInstanceType instance) {
+        configure(resourceAdapter, instance);
+    }
+
+    protected GerResourceadapterInstanceType getResourceAdapterInstance() {
+        return (GerResourceadapterInstanceType) getXmlObject();
+    }
+
+    public void reconfigure() {
+        configure(resourceAdapter, getResourceAdapterInstance());
+    }
+
+    void configure(DDBean resourceAdapter, GerResourceadapterInstanceType xml) {
+        this.resourceAdapter = resourceAdapter;
+        super.configure(resourceAdapter, xml);
+    }
+
+    protected GerConfigPropertySettingType createConfigProperty() {
+        return getResourceAdapterInstance().addNewConfigPropertySetting();
+    }
+
+    protected GerConfigPropertySettingType[] getConfigProperties() {
+        return getResourceAdapterInstance().getConfigPropertySettingArray();
+    }
+
+    protected void removeConfigProperty(int index) {
+        getResourceAdapterInstance().removeConfigPropertySetting(index);
+    }
+
+    // ----------------------- JavaBean Properties for /resourceadapter-instance ----------------------
+
+    public String getResourceAdapterName() {
+        return getResourceAdapterInstance().getResourceadapterName();
+    }
+
+    public void setResourceAdapterName(String name) {
+        String old = getResourceAdapterName();
+        getResourceAdapterInstance().setResourceadapterName(name);
+        pcs.firePropertyChange("resourceAdapterName", old, name);
+    }
+
+    public GBeanLocator getWorkManager() {
+        return workManager;
+    }
+
+    public void setWorkManager(GBeanLocator locator) {
+        GBeanLocator old = getWorkManager();
+        if(locator != null && !locator.configured()) {
+            if(getResourceAdapterInstance().getWorkmanager() != null) {
+                locator.configure(getResourceAdapterInstance().getWorkmanager());
+            } else {
+                locator.configure(getResourceAdapterInstance().addNewWorkmanager());
+            }
+        }
+        workManager = locator;
+        pcs.firePropertyChange("workManager", old, workManager);
+    }
+
+    // ----------------------- End of JavaBean Properties ----------------------
+
+    protected SchemaTypeLoader getSchemaTypeLoader() {
+        return Connector15DCBRoot.SCHEMA_TYPE_LOADER;
+    }
+}

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapterInstance.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapterInstance.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/ResourceAdapterInstance.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/SinglePool.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/SinglePool.java?rev=706357&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/SinglePool.java (added)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/SinglePool.java Mon Oct 20 11:23:36 2008
@@ -0,0 +1,179 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.connector.deployment.jsr88;
+
+import org.apache.geronimo.deployment.plugin.XmlBeanSupport;
+import org.apache.geronimo.xbeans.geronimo.GerSinglepoolType;
+import org.apache.xmlbeans.SchemaTypeLoader;
+
+/**
+ * Settings for connectionmanager/single-pool
+ *
+ * @version $Rev$ $Date$
+ */
+public class SinglePool extends XmlBeanSupport {
+    public SinglePool() {
+        super(null);
+    }
+    public SinglePool(GerSinglepoolType pool) {
+        super(null);
+        configure(pool);
+    }
+
+    protected GerSinglepoolType getSinglePool() {
+        return (GerSinglepoolType) getXmlObject();
+    }
+
+    protected void configure(GerSinglepoolType pool) {
+        setXmlObject(pool);
+        if(!isSelectOneAssumeMatch() && !isMatchOne() && !isMatchAll()) {
+            setMatchOne(true);
+        }
+    }
+
+    // ----------------------- JavaBean Properties for single-pool ----------------------
+
+    public Integer getMinSize() {
+        return getSinglePool().isSetMinSize() ? new Integer(getSinglePool().getMinSize()) : null;
+    }
+
+    public void setMinSize(Integer value) {
+        Integer old = getMinSize();
+        if(value == null) {
+            if(getSinglePool().isSetMinSize()) {
+                getSinglePool().unsetMinSize();
+            }
+        } else {
+            getSinglePool().setMinSize(value.intValue());
+        }
+        pcs.firePropertyChange("minSize", old, value);
+    }
+
+    public Integer getMaxSize() {
+        return getSinglePool().isSetMaxSize() ? new Integer(getSinglePool().getMaxSize()) : null;
+    }
+
+    public void setMaxSize(Integer value) {
+        Integer old = getMaxSize();
+        if(value == null) {
+            if(getSinglePool().isSetMaxSize()) {
+                getSinglePool().unsetMaxSize();
+            }
+        } else {
+            getSinglePool().setMaxSize(value.intValue());
+        }
+        pcs.firePropertyChange("maxSize", old, value);
+    }
+
+    public Integer getBlockingTimeoutMillis() {
+        return getSinglePool().isSetBlockingTimeoutMilliseconds() ? new Integer(getSinglePool().getBlockingTimeoutMilliseconds()) : null;
+    }
+
+    public void setBlockingTimeoutMillis(Integer value) {
+        Integer old = getBlockingTimeoutMillis();
+        if(value == null) {
+            if(getSinglePool().isSetBlockingTimeoutMilliseconds()) {
+                getSinglePool().unsetBlockingTimeoutMilliseconds();
+            }
+        } else {
+            getSinglePool().setBlockingTimeoutMilliseconds(value.intValue());
+        }
+        pcs.firePropertyChange("blockingTimeoutMillis", old, value);
+    }
+
+    public Integer getIdleTimeoutMinutes() {
+        return getSinglePool().isSetIdleTimeoutMinutes() ? new Integer(getSinglePool().getIdleTimeoutMinutes()) : null;
+    }
+
+    public void setIdleTimeoutMinutes(Integer value) {
+        Integer old = getIdleTimeoutMinutes();
+        if(value == null) {
+            if(getSinglePool().isSetIdleTimeoutMinutes()) {
+                getSinglePool().unsetIdleTimeoutMinutes();
+            }
+        } else {
+            getSinglePool().setIdleTimeoutMinutes(value.intValue());
+        }
+        pcs.firePropertyChange("idleTimeoutMinutes", old, value);
+    }
+
+    public boolean isMatchAll() {
+        return getSinglePool().isSetMatchAll();
+    }
+
+    public void setMatchAll(boolean set) {
+        if(set) {
+            if(!isMatchAll()) {
+                getSinglePool().addNewMatchAll();
+                pcs.firePropertyChange("matchAll", !set, set);
+            }
+            if(isMatchOne()) setMatchOne(false);
+            if(isSelectOneAssumeMatch()) setSelectOneAssumeMatch(false);
+        } else {
+            if(isMatchAll()) {
+                getSinglePool().unsetMatchAll();
+                pcs.firePropertyChange("matchAll", !set, set);
+            }
+        }
+    }
+
+    public boolean isMatchOne() {
+        return getSinglePool().isSetMatchOne();
+    }
+
+    public void setMatchOne(boolean set) {
+        if(set) {
+            if(!isMatchOne()) {
+                getSinglePool().addNewMatchOne();
+                pcs.firePropertyChange("matchOne", !set, set);
+            }
+            if(isMatchAll()) setMatchAll(false);
+            if(isSelectOneAssumeMatch()) setSelectOneAssumeMatch(false);
+        } else {
+            if(isMatchOne()) {
+                getSinglePool().unsetMatchOne();
+                pcs.firePropertyChange("matchOne", !set, set);
+            }
+        }
+    }
+
+    public boolean isSelectOneAssumeMatch() {
+        return getSinglePool().isSetSelectOneAssumeMatch();
+    }
+
+    public void setSelectOneAssumeMatch(boolean set) {
+        if(set) {
+            if(!isSelectOneAssumeMatch()) {
+                getSinglePool().addNewSelectOneAssumeMatch();
+                pcs.firePropertyChange("selectOneAssumeMatch", !set, set);
+            }
+            if(isMatchAll()) setMatchAll(false);
+            if(isMatchOne()) setMatchOne(false);
+        } else {
+            if(isSelectOneAssumeMatch()) {
+                getSinglePool().unsetSelectOneAssumeMatch();
+                pcs.firePropertyChange("selectOneAssumeMatch", !set, set);
+            }
+        }
+    }
+
+    // ----------------------- End of JavaBean Properties ----------------------
+
+    protected SchemaTypeLoader getSchemaTypeLoader() {
+        return Connector15DCBRoot.SCHEMA_TYPE_LOADER;
+    }
+}

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/SinglePool.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/SinglePool.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/jsr88/SinglePool.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/xsd/geronimo-connector-1.2.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/xsd/geronimo-connector-1.2.xsd?rev=706357&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/xsd/geronimo-connector-1.2.xsd (added)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/xsd/geronimo-connector-1.2.xsd Mon Oct 20 11:23:36 2008
@@ -0,0 +1,756 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+    
+        http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
+    xmlns:ger="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
+    xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
+    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"
+    targetNamespace="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+    attributeFormDefault="unqualified">
+
+    <xs:annotation>
+        <xs:documentation>
+            This is an XML Schema Definition for Geronimo resource adapter
+            deployment plan. In case the Geronimo resource adapter deployment
+            plan is provided internally in the resource adapter archive, it
+            should be names META-INF/geronimo-ra.xml. In case the Geronimo
+            resource adapter deployment plan is provided externally, the
+            deployment descriptor can be named anything and provided to the
+            deploy tool. Alternatively it can be included in the EAR and
+            referenced by an alt-dd element of the EAR deployment plan. All the
+            Geronimo resource adapter deployment plan must specify the top level
+            element as connector with namespace specified as xmlns=
+            "http://geronimo.apache.org/xml/ns/j2ee/connector-1.2". The default
+            location for this document is
+            http://geronimo.apache.org/xml/ns/j2ee/connector-1.2
+        </xs:documentation>
+    </xs:annotation>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.2"
+        schemaLocation="geronimo-naming-1.2.xsd">
+        <xs:annotation>
+            <xs:documentation>
+                Import partial schema containing common naming elements, the
+                imported plan declares elements like ejb-ref, ejb-local-ref,
+                service-ref,resource-ref, and resource-env-ref required by this
+                plan schema.
+            </xs:documentation>
+        </xs:annotation>
+    </xs:import>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment-1.2"
+        schemaLocation="geronimo-module-1.2.xsd">
+        <xs:annotation>
+            <xs:documentation>
+                Import Geronimo Services deployment plans. The imported plan
+                includes complex types like moduleType, environmentType,
+                dependenciesType, etc. required by this plan schema.
+            </xs:documentation>
+        </xs:annotation>
+    </xs:import>
+    <xs:import namespace="http://www.w3.org/XML/1998/namespace"
+        schemaLocation="http://www.w3.org/2001/xml.xsd" />
+
+    <xs:annotation>
+        <xs:documentation>
+            <![CDATA[
+            documents using this schema should start like:
+            <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
+            version="1.5">
+
+            @(#)geronimo-connector_1_5.xsds
+            ]]>
+        </xs:documentation>
+    </xs:annotation>
+
+    <!-- **************************************************** -->
+
+    <xs:element name="connector" type="ger:connectorType">
+        <xs:annotation>
+            <xs:documentation>
+                The connector element is the root element of the deployment
+                descriptor for the resource adapter. Note that the sub-elements
+                of this element should be as in the given order in a sequence.
+                It includes geronimo specific information for the resource
+                adapter library.
+            </xs:documentation>
+        </xs:annotation>
+
+        <xs:unique name="resourceadapter-instance-name-uniqueness">
+            <xs:annotation>
+                <xs:documentation>
+                    The resourceadapter-instance element must have a unique
+                    name.
+                </xs:documentation>
+            </xs:annotation>
+            <xs:selector
+                xpath="ger:resourceadapter/ger:resourceadapter-instance" />
+            <xs:field xpath="ger:resourceadapter-name" />
+        </xs:unique>
+
+        <xs:unique name="connectiondefinition-instance-name-uniqueness">
+            <xs:annotation>
+                <xs:documentation>
+                    The connectiondefinition-instance element must have a unique
+                    name.
+                </xs:documentation>
+            </xs:annotation>
+            <xs:selector
+                xpath="ger:resourceadapter/ger:outbound-resourceadapter/ger:connection-definition/ger:connectiondefinition-instance" />
+            <xs:field xpath="ger:name" />
+        </xs:unique>
+
+        <xs:unique name="admin-object-instance-name-uniqueness">
+            <xs:annotation>
+                <xs:documentation>
+                    The admin-object-instance element must have a unique name.
+                </xs:documentation>
+            </xs:annotation>
+            <xs:selector xpath="ger:adminobject/ger:adminobject-instance" />
+            <xs:field xpath="ger:message-destination-name" />
+        </xs:unique>
+    </xs:element>
+
+    <!-- **************************************************** -->
+
+    <xs:complexType name="adminobjectType">
+        <xs:annotation>
+            <xs:documentation>
+                This complex type maps back to adminobjectType complex type in
+                connectors xsd.
+            </xs:documentation>
+        </xs:annotation>
+
+        <xs:sequence>
+            <xs:element name="adminobject-interface"
+                type="ger:fully-qualified-classType">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element adminobject-interface maps back to an
+                        adminobject-interface element in ra.xml. It specifies
+                        the fully qualified name of Java interface of the
+                        administrated object.
+                    </xs:documentation>
+                </xs:annotation>
+
+            </xs:element>
+            <xs:element name="adminobject-class"
+                type="ger:fully-qualified-classType">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element adminobject-class maps back to an
+                        adminobject-class element in ra.xml. It specifies the
+                        fully qualified name of Java class of the administrated
+                        object.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="adminobject-instance"
+                type="ger:adminobject-instanceType" minOccurs="0"
+                maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element adminobject-instance contains the
+                        configuration for this specific instance of the
+                        administered object type, with a unique name, and values
+                        for any configuration properties necessary for that
+                        administered object type.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="adminobject-instanceType">
+        <xs:sequence>
+            <xs:element name="message-destination-name" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>
+                        A unique name for admin object instance. Used in object
+                        name of gbean for it. Matches message-destination-name
+                        in ejb-jar.xml assembly descriptor.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="config-property-setting"
+                type="ger:config-property-settingType" minOccurs="0"
+                maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element config-property-setting specifies the set of
+                        properties for admin object instance.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <!-- **************************************************** -->
+
+    <xs:complexType name="config-property-settingType">
+        <xs:annotation>
+            <xs:documentation>
+                The config-property-settingType contains a name-value pair for a
+                config-property or required-config-property
+            </xs:documentation>
+        </xs:annotation>
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="name" type="xs:string" use="required">
+                    <xs:annotation>
+                        <xs:documentation>
+                            The name of the property in name-value pair. It
+                            should match the config-property-name in a
+                            config-property in the adminobject element of the
+                            ra.xml file.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+
+    <!-- **************************************************** -->
+
+    <xs:complexType name="connection-definitionType">
+        <xs:annotation>
+            <xs:documentation>
+                The connection-definitionType defines a set of connection
+                interfaces and classes pertaining to a particular connection
+                type. This also includes configurable properties for
+                ManagedConnectionFactory instances that may be produced out of
+                this set.
+
+                The name element uniquely identifies this instance
+            </xs:documentation>
+        </xs:annotation>
+
+        <xs:sequence>
+            <xs:element name="connectionfactory-interface"
+                type="ger:fully-qualified-classType">
+                <xs:annotation>
+                    <xs:documentation>
+                        The connectionfactory-interface is unique in ra.xml so
+                        is used to index into ra.xml. It provides the fully
+                        qualified name of java interface used as
+                        connectionfactory for resource adapter.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="connectiondefinition-instance"
+                type="ger:connectiondefinition-instanceType" minOccurs="0"
+                maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The connectiondefinition-instance provides the
+                        configuration for a specific connection.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="connectiondefinition-instanceType">
+        <xs:sequence>
+            <xs:element name="name" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>
+                        The unique name of the connection definition instance
+                        used to identify the connection configuration specified
+                        here.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
+            <xs:element name="implemented-interface"
+                type="ger:fully-qualified-classType" minOccurs="0"
+                maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        Additional fully qualified name of java interfaces
+                        implemented by the connectionfactory used by the
+                        application apart from the connectionfactory-interface
+                        specified before.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
+            <xs:element name="config-property-setting"
+                type="ger:config-property-settingType" minOccurs="0"
+                maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element config-property-setting specifies the set of
+                        properties for connection instance.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
+            <!--<xs:choice>-->
+
+            <xs:element name="connectionmanager"
+                type="ger:connectionmanagerType">
+                <xs:annotation>
+                    <xs:documentation>
+                        The connectionmanager element specifies the connection
+                        specific settings like transaction, security, and
+                        connection pool.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
+            <!--<xs:element name="connectionmanager-ref" type="xs:string"/>-->
+            <!--</xs:choice>-->
+
+        </xs:sequence>
+    </xs:complexType>
+
+    <!-- **************************************************** -->
+
+    <xs:complexType name="connectionmanagerType">
+        <xs:annotation>
+            <xs:documentation>
+                The connectionmanager element specifies the connection specific
+                settings like transaction, security, and connection pool.
+            </xs:documentation>
+        </xs:annotation>
+
+        <xs:sequence>
+            <xs:element name="container-managed-security" type="ger:emptyType"
+                minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        This empty element indicates that the connection is
+                        authenticated by container and no user authentication is
+                        required. This setting is ignored if res-auth is
+                        provided inr resource-ref.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:choice minOccurs="0">
+                <xs:element name="no-transaction" type="ger:emptyType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            This empty element indicates no participation of
+                            connection in any transactions.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="local-transaction" type="ger:emptyType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            This empty element indicates participation of
+                            connection in only local transactions involving only
+                            this connection.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="xa-transaction"
+                    type="ger:xatransactionType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            The xa-transaction element indicates participation
+                            of connection in multi resource transactions. This
+                            element provides caching information for XA
+                            transaction.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="transaction-log" type="ger:emptyType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            This empty element indicates participation JDBC
+                            resource of local transaction type in XA
+                            transactions.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+            </xs:choice>
+            <xs:choice>
+                <xs:element name="no-pool" type="ger:emptyType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            This empty element indicates connection will not be
+                            pooled at all, which mean every connection request
+                            will open a connection for its own purpose.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="single-pool" type="ger:singlepoolType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            This element indicates connection will pooled in
+                            only one connection pool. This element provides
+                            information about single connection pool being
+                            deployed.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="partitioned-pool"
+                    type="ger:partitionedpoolType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            This element indicates connection will pooled in
+                            multiple connection pools. This element provides
+                            information about multiple connection pools being
+                            deployed.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="xatransactionType">
+        <xs:sequence>
+            <xs:element name="transaction-caching" type="ger:emptyType"
+                minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        This empty element indicates the sharing of same
+                        connection in same transaction if multiple connections
+                        are requested in same transaction.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="thread-caching" type="ger:emptyType"
+                minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        This empty element indicates the sharing of same
+                        connection in same thread if multiple connections are
+                        requested in same thread.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="singlepoolType">
+        <xs:sequence>
+            <xs:element name="max-size" type="xs:int" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        The maximum number of connection in a connection pool
+                        being deployed. The connection pool will stop filling
+                        once reached this value.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="min-size" type="xs:int" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        The minimum number of connection in a connection pool
+                        being deployed. The connection pool will try to fill
+                        itself if the number of connections fall below this
+                        value.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="blocking-timeout-milliseconds" type="xs:int"
+                minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        The time after which timeout will be thrown if no
+                        connections are available to be loaned in a connection
+                        pool.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="idle-timeout-minutes" type="xs:int"
+                minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        The time after which connection will be automatically
+                        considered released.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:choice>
+                <xs:element name="match-one" type="ger:emptyType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            This element indicates that only one connection
+                            needs to be checked for matching the connection
+                            request. If the connection does not match, it throws
+                            an error to the effect of "please adjust your
+                            configuration and try again".
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="match-all" type="ger:emptyType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            This element indicates that all the connections need
+                            to be checked for matching the connection request.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="select-one-assume-match"
+                    type="ger:emptyType">
+                    <xs:annotation>
+                        <xs:documentation>
+                            This empty field indicated that no connection
+                            settings need to checked and matched, and assumes
+                            that all connections are same and one of them will
+                            be returned back to client.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="partitionedpoolType">
+        <complexContent>
+            <extension base="ger:singlepoolType">
+                <xs:sequence>
+                    <xs:element name="partition-by-subject" type="ger:emptyType"
+                        minOccurs="0">
+                        <xs:annotation>
+                            <xs:documentation>
+                                This empty partition-by-subject field indicates
+                                that connection pool has to be partitioned by
+                                subject field.
+                            </xs:documentation>
+                        </xs:annotation>
+                    </xs:element>
+                    <xs:element name="partition-by-connectionrequestinfo"
+                        type="ger:emptyType" minOccurs="0">
+                        <xs:annotation>
+                            <xs:documentation>
+                                This empty partition-by-connectionrequestinfo
+                                field indicates that connection pool has to be
+                                partitioned by connection request information.
+                            </xs:documentation>
+                        </xs:annotation>
+                    </xs:element>
+                </xs:sequence>
+            </extension>
+        </complexContent>
+    </xs:complexType>
+
+    <!-- **************************************************** -->
+
+    <xs:complexType name="connectorType">
+        <xs:annotation>
+            <xs:documentation>
+                The connector element is the root element of the deployment
+                descriptor for the resource adapter. Note that the sub-elements
+                of this element should be as in the given order in a sequence.
+                It includes geronimo specific information for the resource
+                adapter library.
+            </xs:documentation>
+        </xs:annotation>
+
+        <xs:sequence>
+            <xs:element ref="sys:environment" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        Reference to environment element defined in imported
+                        "geronimo-module-1.2.xsd"
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
+            <xs:element name="resourceadapter" type="ger:resourceadapterType"
+                maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element resourceadapter defines the resource
+                        adapters for the connector defined in the document.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
+            <xs:element name="adminobject" type="ger:adminobjectType"
+                minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element adminobject maps back to adminobject defined
+                        in ra.xml. It provides specific instance information for
+                        administer object defined in ra.xml. For example, if
+                        topic is declared in the ra.xml this could provide topic
+                        instance information.
+                        An admin object configured here cannot implement ResourceAdapterAssociation.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
+            <xs:element ref="sys:service" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        Reference to service element defined in imported
+                        "geronimo-module-1.2.xsd".
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+
+    </xs:complexType>
+
+    <!-- **************************************************** -->
+
+    <xs:complexType name="emptyType" />
+
+    <!-- **************************************************** -->
+
+    <xs:complexType name="outbound-resourceadapterType">
+        <xs:annotation>
+            <xs:documentation>
+                The outbound-resourceadapterType specifies information about an
+                outbound resource adapter. The information includes fully
+                qualified names of classes/interfaces required as part of the
+                connector architecture specified contracts for connection
+                management, level of transaction support provided, one or more
+                authentication mechanisms supported and additional required
+                security permissions.
+
+                If there is no authentication-mechanism specified as part of
+                resource adapter element then the resource adapter does not
+                support any standard security authentication mechanisms as part
+                of security contract. The application server ignores the
+                security part of the system contracts in this case.
+            </xs:documentation>
+        </xs:annotation>
+
+        <xs:sequence>
+            <xs:element name="connection-definition"
+                type="ger:connection-definitionType" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The connection-definitionType defines a set of
+                        connection interfaces and classes pertaining to a
+                        particular connection type. This also includes
+                        configurable properties for ManagedConnectionFactory
+                        instances that may be produced out of this set.
+
+                        The name element uniquely identifies this instance.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <!-- **************************************************** -->
+
+    <xs:complexType name="resourceadapterType">
+        <xs:sequence>
+            <xs:element name="resourceadapter-instance"
+                type="ger:resourceadapter-instanceType" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        The resourceadapter instance provide resource adapter
+                        instance specific information like configuration
+                        properties and workmanager implementation.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="outbound-resourceadapter"
+                type="ger:outbound-resourceadapterType" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        The outbound-resourceadapterType specifies information
+                        about an outbound resource adapter. The information
+                        includes fully qualified names of classes/interfaces
+                        required as part of the connector architecture specified
+                        contracts for connection management, level of
+                        transaction support provided, one or more authentication
+                        mechanisms supported and additional required security
+                        permissions.
+
+                        If there is no authentication-mechanism specified as
+                        part of resource adapter element then the resource
+                        adapter does not support any standard security
+                        authentication mechanisms as part of security contract.
+                        The application server ignores the security part of the
+                        system contracts in this case.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="adminobject" type="ger:adminobjectType"
+                minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element adminobject maps back to adminobject defined
+                        in ra.xml. It provides specific instance information for
+                        administer object defined in ra.xml. For example, if
+                        topic is declared in the ra.xml this could provide topic
+                        instance information.
+                        An admin object configured here can implement ResourceAdapterAssociation.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="resourceadapter-instanceType">
+        <xs:annotation>
+            <xs:documentation>
+                The resourceadapter instance info is put in a separate optional
+                element to provide easier more consistent support for 1.0
+                adapters. The resourceadapter instance provide resource adapter
+                instance specific information like configuration properties and
+                workmanager implementation.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="resourceadapter-name" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element resourceadapter-name provides a name for
+                        this resource adapter, and it is used to index back to
+                        the resourceadapter-name specified in ra.xml.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="config-property-setting"
+                type="ger:config-property-settingType" minOccurs="0"
+                maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        The element config-property-setting specifies the set of
+                        properties for resource adapter instance.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element ref="naming:workmanager">
+                <xs:annotation>
+                    <xs:documentation>
+                        Reference to workmanager element defined in imported
+                        "geronimo-naming-1.2.xsd"
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <!-- types borrowed from the j2ee schema.  We might want to centralize  these -->
+
+    <xs:simpleType name="fully-qualified-classType">
+        <xs:restriction base="xs:string" />
+    </xs:simpleType>
+
+    <xs:complexType name="descriptionType">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute ref="xml:lang" />
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+
+</xs:schema>

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/xsd/geronimo-connector-1.2.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/xsd/geronimo-connector-1.2.xsd
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/src/main/xsd/geronimo-connector-1.2.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message