geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r123327 - in geronimo/trunk/modules: connector-builder/src/java/org/apache/geronimo/connector/deployment connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean connector-builder/src/schema connector-builder/src/test/org/apache/geronimo/connector/deployment connector/src/java/org/apache/geronimo/connector/outbound
Date Sat, 25 Dec 2004 07:34:42 GMT
Author: djencks
Date: Fri Dec 24 23:34:42 2004
New Revision: 123327

URL: http://svn.apache.org/viewcvs?view=rev&rev=123327
Log:
remove use of sun elements in schema, remove unused elements, and slightly simplify building
GBeanData for dynamic gbeans.
Modified:
   geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
   geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectDConfigBean.java
   geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionDConfigBean.java
   geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java
   geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd
   geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
   geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java

Modified: geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?view=diff&rev=123327&p1=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java&r1=123326&p2=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java&r2=123327
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Fri Dec 24 23:34:42 2004
@@ -36,10 +36,12 @@
 import javax.management.ObjectName;
 import javax.naming.Reference;
 
+import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.common.propertyeditor.PropertyEditors;
 import org.apache.geronimo.connector.ActivationSpecWrapper;
 import org.apache.geronimo.connector.AdminObjectWrapper;
 import org.apache.geronimo.connector.ResourceAdapterModuleImpl;
+import org.apache.geronimo.connector.ResourceAdapterWrapper;
 import org.apache.geronimo.connector.outbound.JCAConnectionFactoryImpl;
 import org.apache.geronimo.connector.outbound.ManagedConnectionFactoryWrapper;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.LocalTransactions;
@@ -52,7 +54,6 @@
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.XATransactions;
 import org.apache.geronimo.connector.outbound.security.PasswordCredentialRealm;
-import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.service.GBeanHelper;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.DynamicGAttributeInfo;
@@ -81,6 +82,7 @@
 import org.apache.geronimo.xbeans.geronimo.GerConnectionmanagerType;
 import org.apache.geronimo.xbeans.geronimo.GerConnectorDocument;
 import org.apache.geronimo.xbeans.geronimo.GerConnectorType;
+import org.apache.geronimo.xbeans.geronimo.GerCredentialInterfaceType;
 import org.apache.geronimo.xbeans.geronimo.GerDependencyType;
 import org.apache.geronimo.xbeans.geronimo.GerGbeanType;
 import org.apache.geronimo.xbeans.geronimo.GerPartitionedpoolType;
@@ -92,7 +94,6 @@
 import org.apache.geronimo.xbeans.j2ee.ConnectionDefinitionType;
 import org.apache.geronimo.xbeans.j2ee.ConnectorDocument;
 import org.apache.geronimo.xbeans.j2ee.ConnectorType;
-import org.apache.geronimo.xbeans.j2ee.FullyQualifiedClassType;
 import org.apache.geronimo.xbeans.j2ee.MessagelistenerType;
 import org.apache.geronimo.xbeans.j2ee.ResourceadapterType;
 import org.apache.xmlbeans.XmlException;
@@ -271,7 +272,7 @@
         ResourceadapterType resourceadapter = ((ConnectorType) specDD).getResourceadapter();
         // Create the resource adapter gbean
         if (resourceadapter.isSetResourceadapterClass()) {
-            GBeanInfoBuilder resourceAdapterInfoBuilder = new GBeanInfoBuilder("org.apache.geronimo.connector.ResourceAdapterWrapper",
cl);
+            GBeanInfoBuilder resourceAdapterInfoBuilder = new GBeanInfoBuilder(ResourceAdapterWrapper.class,
ResourceAdapterWrapper.GBEAN_INFO);
             GBeanData resourceAdapterGBeanData = setUpDynamicGBean(resourceAdapterInfoBuilder,
resourceadapter.getConfigPropertyArray(), cl);
 
             resourceAdapterGBeanData.setAttribute("resourceAdapterClass", resourceadapter.getResourceadapterClass().getStringValue().trim());
@@ -417,7 +418,7 @@
                     GerConnectionDefinitionType geronimoConnectionDefinition = geronimoResourceAdapter.getOutboundResourceadapter().getConnectionDefinitionArray(i);
                     assert geronimoConnectionDefinition != null: "Null GeronimoConnectionDefinition";
 
-                    String connectionFactoryInterfaceName = geronimoConnectionDefinition.getConnectionfactoryInterface().getStringValue().trim();
+                    String connectionFactoryInterfaceName = geronimoConnectionDefinition.getConnectionfactoryInterface().trim();
                     GBeanData connectionFactoryGBeanData = earContext.getRefContext().getConnectionFactoryInfo(resourceAdapterModuleObjectName,
connectionFactoryInterfaceName);
 
                     if (connectionFactoryGBeanData == null) {
@@ -438,7 +439,7 @@
         for (int i = 0; i < geronimoConnector.getAdminobjectArray().length; i++) {
             GerAdminobjectType gerAdminObject = geronimoConnector.getAdminobjectArray()[i];
 
-            String adminObjectInterface = gerAdminObject.getAdminobjectInterface().getStringValue();
+            String adminObjectInterface = gerAdminObject.getAdminobjectInterface().trim();
             GBeanData adminObjectGBeanData = earContext.getRefContext().getAdminObjectInfo(resourceAdapterModuleObjectName,
adminObjectInterface);
 
             if (adminObjectGBeanData == null) {
@@ -468,8 +469,8 @@
             MessagelistenerType messagelistenerType = messagelistenerArray[i];
             String messageListenerInterface = messagelistenerType.getMessagelistenerType().getStringValue().trim();
             ActivationspecType activationspec = messagelistenerType.getActivationspec();
-            String activationSpecClassName = activationspec.getActivationspecClass().getStringValue();
-            GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(ActivationSpecWrapper.class.getName(),
cl);
+            String activationSpecClassName = activationspec.getActivationspecClass().getStringValue().trim();
+            GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(ActivationSpecWrapper.class,
ActivationSpecWrapper.GBEAN_INFO);
 
             //add all javabean properties that have both getter and setter.  Ignore the "required"
flag from the dd.
             Map getters = new HashMap();
@@ -518,8 +519,8 @@
         for (int i = 0; i < connectionDefinitionArray.length; i++) {
             ConnectionDefinitionType connectionDefinition = connectionDefinitionArray[i];
 
-            GBeanInfoBuilder adminObjectInfoFactory = new GBeanInfoBuilder(ManagedConnectionFactoryWrapper.class.getName(),
cl);
-            GBeanData managedConnectionFactoryGBeanData = setUpDynamicGBean(adminObjectInfoFactory,
connectionDefinition.getConfigPropertyArray(), cl);
+            GBeanInfoBuilder managedConnectionFactoryInfoBuilder = new GBeanInfoBuilder(ManagedConnectionFactoryWrapper.class,
ManagedConnectionFactoryWrapper.GBEAN_INFO);
+            GBeanData managedConnectionFactoryGBeanData = setUpDynamicGBean(managedConnectionFactoryInfoBuilder,
connectionDefinition.getConfigPropertyArray(), cl);
 
             // set the standard properties
             String connectionfactoryInterface = connectionDefinition.getConnectionfactoryInterface().getStringValue().trim();
@@ -538,8 +539,8 @@
         for (int i = 0; i < adminobjectArray.length; i++) {
             AdminobjectType adminObject = adminobjectArray[i];
 
-            GBeanInfoBuilder adminObjectInfoFactory = new GBeanInfoBuilder(AdminObjectWrapper.class.getName(),
cl);
-            GBeanData adminObjectGBeanData = setUpDynamicGBean(adminObjectInfoFactory, adminObject.getConfigPropertyArray(),
cl);
+            GBeanInfoBuilder adminObjectInfoBuilder = new GBeanInfoBuilder(AdminObjectWrapper.class,
AdminObjectWrapper.GBEAN_INFO);
+            GBeanData adminObjectGBeanData = setUpDynamicGBean(adminObjectInfoBuilder, adminObject.getConfigPropertyArray(),
cl);
 
             // set the standard properties
             String adminObjectInterface = adminObject.getAdminobjectInterface().getStringValue().trim();
@@ -720,7 +721,7 @@
                 managedConnectionFactoryInstanceGBeanData.setReferencePattern("ResourceAdapterWrapper",
resourceAdapterObjectName);
             }
             managedConnectionFactoryInstanceGBeanData.setReferencePattern("ConnectionManagerFactory",
connectionManagerObjectName);
-            if (connectiondefinitionInstance.getCredentialInterface() != null &&
"javax.resource.spi.security.PasswordCredential".equals(connectiondefinitionInstance.getCredentialInterface().getStringValue()))
{
+            if (connectiondefinitionInstance.getCredentialInterface() != null &&
GerCredentialInterfaceType.Enum.forString("javax.resource.spi.security.PasswordCredential").equals(connectiondefinitionInstance.getCredentialInterface()))
{
                 ObjectName realmObjectName = ObjectName.getInstance(BASE_PASSWORD_CREDENTIAL_LOGIN_MODULE_NAME
+ connectiondefinitionInstance.getName());
                 GBeanData realmGBean = new GBeanData(realmObjectName, PasswordCredentialRealm.getGBeanInfo());
                 realmGBean.setAttribute("realmName", BASE_PASSWORD_CREDENTIAL_LOGIN_MODULE_NAME
+ connectiondefinitionInstance.getName());
@@ -728,11 +729,13 @@
                 managedConnectionFactoryInstanceGBeanData.setReferencePattern("ManagedConnectionFactoryListener",
realmObjectName);
             }
             //additional interfaces implemented by connection factory
-            FullyQualifiedClassType[] implementedInterfaceElements = connectiondefinitionInstance.getImplementedInterfaceArray();
-            String[] implementedInterfaces = new String[implementedInterfaceElements == null
? 0 : implementedInterfaceElements.length];
-            for (int i = 0; i < implementedInterfaceElements.length; i++) {
-                FullyQualifiedClassType additionalInterfaceType = implementedInterfaceElements[i];
-                implementedInterfaces[i] = additionalInterfaceType.getStringValue().trim();
+            String[] implementedInterfaces = connectiondefinitionInstance.getImplementedInterfaceArray();
+            if (implementedInterfaces != null) {
+                for (int i = 0; i < implementedInterfaces.length; i++) {
+                    implementedInterfaces[i] = implementedInterfaces[i].trim();
+                }
+            } else {
+                implementedInterfaces = new String[0];
             }
             managedConnectionFactoryInstanceGBeanData.setAttribute("implementedInterfaces",
implementedInterfaces);
 

Modified: geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectDConfigBean.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectDConfigBean.java?view=diff&rev=123327&p1=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectDConfigBean.java&r1=123326&p2=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectDConfigBean.java&r2=123327
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectDConfigBean.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectDConfigBean.java
Fri Dec 24 23:34:42 2004
@@ -37,15 +37,15 @@
         super(ddBean, adminObject);
         String adminObjectInterface = ddBean.getText("adminobject-interface")[0];
         if (adminObject.getAdminobjectInterface() == null) {
-            adminObject.addNewAdminobjectInterface().setStringValue(adminObjectInterface);
+            adminObject.setAdminobjectInterface(adminObjectInterface);
         } else {
-            assert adminObjectInterface.equals(adminObject.getAdminobjectInterface().getStringValue());
+            assert adminObjectInterface.equals(adminObject.getAdminobjectInterface());
         }
         String adminObjectClass = ddBean.getText("adminobject-class")[0];
         if (adminObject.getAdminobjectClass() == null) {
-            adminObject.addNewAdminobjectClass().setStringValue(adminObjectClass);
+            adminObject.setAdminobjectClass(adminObjectClass);
         } else {
-            assert adminObjectClass.equals(adminObject.getAdminobjectClass().getStringValue());
+            assert adminObjectClass.equals(adminObject.getAdminobjectClass());
         }
         // Get initial list of instances
         GerAdminobjectInstanceType[] xmlInstances = getAdminObject().getAdminobjectInstanceArray();

Modified: geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionDConfigBean.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionDConfigBean.java?view=diff&rev=123327&p1=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionDConfigBean.java&r1=123326&p2=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionDConfigBean.java&r2=123327
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionDConfigBean.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionDConfigBean.java
Fri Dec 24 23:34:42 2004
@@ -39,9 +39,9 @@
         super(ddBean, connectionDefinition);
         String connectionfactoryInterface = ddBean.getText("connectionfactory-interface")[0];
         if (connectionDefinition.getConnectionfactoryInterface() == null) {
-            connectionDefinition.addNewConnectionfactoryInterface().setStringValue(connectionfactoryInterface);
+            connectionDefinition.setConnectionfactoryInterface(connectionfactoryInterface);
         } else {
-            assert connectionfactoryInterface.equals(connectionDefinition.getConnectionfactoryInterface().getStringValue());
+            assert connectionfactoryInterface.equals(connectionDefinition.getConnectionfactoryInterface());
         }
         // Get initial list of instances
         instances = new ConnectionDefinitionInstance[getConnectionDefinition().getConnectiondefinitionInstanceArray().length];

Modified: geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java?view=diff&rev=123327&p1=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java&r1=123326&p2=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java&r2=123327
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java
Fri Dec 24 23:34:42 2004
@@ -19,13 +19,11 @@
 
 import java.util.HashMap;
 import java.util.Map;
-
 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.DConfigBeanSupport;
-import org.apache.geronimo.xbeans.geronimo.GerAdminobjectType;
 import org.apache.geronimo.xbeans.geronimo.GerConfigPropertySettingType;
 import org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType;
 import org.apache.geronimo.xbeans.geronimo.GerOutboundResourceadapterType;
@@ -98,7 +96,7 @@
                 DDBean connectionDefinitionDdBean = connectionDefinitionDDBeans[i];
                 GerConnectionDefinitionType connectionDefinition = connectionDefinitions[i];
                 String connectionfactoryInterface = connectionDefinitionDdBean.getText("connectionfactory-interface")[0];
-                assert connectionfactoryInterface.equals(connectionDefinition.getConnectionfactoryInterface().getStringValue());
+                assert connectionfactoryInterface.equals(connectionDefinition.getConnectionfactoryInterface());
                 ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean = new ConnectionDefinitionDConfigBean(connectionDefinitionDdBean,
connectionDefinition);
                 connectionDefinitionsMap.put(connectionfactoryInterface, connectionDefinitionDConfigBean);
             }

Modified: geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd?view=diff&rev=123327&p1=geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd&r1=123326&p2=geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd&r2=123327
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd	(original)
+++ geronimo/trunk/modules/connector-builder/src/schema/geronimo-connector_1_5.xsd	Fri Dec
24 23:34:42 2004
@@ -25,7 +25,6 @@
     attributeFormDefault="unqualified"
     version="1.5">
 
-    <xsd:import namespace="http://java.sun.com/xml/ns/j2ee" schemaLocation="j2ee_1_4.xsd"/>
     <xsd:include schemaLocation="../../../service-builder/src/schema/geronimo-common.xsd"/>
 
     <xsd:annotation>
@@ -55,39 +54,39 @@
         </xsd:annotation>
 
         <xsd:unique name="resourceadapter-instance-name-uniqueness">
-          <xsd:annotation>
-            <xsd:documentation>
+            <xsd:annotation>
+                <xsd:documentation>
 
               The resourceadapter-instance element must have a unique name.
 
-            </xsd:documentation>
-          </xsd:annotation>
-          <xsd:selector xpath="ger:resourceadapter/ger:resourceadapter-instance"/>
-          <xsd:field    xpath="ger:resourceadapter-name"/>
+                </xsd:documentation>
+            </xsd:annotation>
+            <xsd:selector xpath="ger:resourceadapter/ger:resourceadapter-instance"/>
+            <xsd:field xpath="ger:resourceadapter-name"/>
         </xsd:unique>
 
         <xsd:unique name="connectiondefinition-instance-name-uniqueness">
-          <xsd:annotation>
-            <xsd:documentation>
+            <xsd:annotation>
+                <xsd:documentation>
 
               The connectiondefinition-instance element must have a unique name.
 
-            </xsd:documentation>
-          </xsd:annotation>
-          <xsd:selector xpath="ger:resourceadapter/ger:outbound-resourceadapter/ger:connection-definition/ger:connectiondefinition-instance"/>
-          <xsd:field    xpath="ger:name"/>
+                </xsd:documentation>
+            </xsd:annotation>
+            <xsd:selector xpath="ger:resourceadapter/ger:outbound-resourceadapter/ger:connection-definition/ger:connectiondefinition-instance"/>
+            <xsd:field xpath="ger:name"/>
         </xsd:unique>
 
         <xsd:unique name="admin-object-instance-name-uniqueness">
-          <xsd:annotation>
-            <xsd:documentation>
+            <xsd:annotation>
+                <xsd:documentation>
 
               The admin-object-instance element must have a unique name.
 
-            </xsd:documentation>
-          </xsd:annotation>
-          <xsd:selector xpath="ger:adminobject/ger:adminobject-instance"/>
-          <xsd:field    xpath="ger:message-destination-name"/>
+                </xsd:documentation>
+            </xsd:annotation>
+            <xsd:selector xpath="ger:adminobject/ger:adminobject-instance"/>
+            <xsd:field xpath="ger:message-destination-name"/>
         </xsd:unique>
 
     </xsd:element>
@@ -104,7 +103,7 @@
 
         <xsd:sequence>
             <xsd:element name="adminobject-interface"
-                type="j2ee:fully-qualified-classType">
+                type="ger:fully-qualified-classType">
                 <xsd:annotation>
                     <xsd:documentation>
                         believe it or not, there are no uniqueness constraints on admin object
intf or class
@@ -113,7 +112,7 @@
 
             </xsd:element>
             <xsd:element name="adminobject-class"
-                type="j2ee:fully-qualified-classType">
+                type="ger:fully-qualified-classType">
                 <xsd:annotation>
                     <xsd:documentation>reference back into the standard dd</xsd:documentation>
                 </xsd:annotation>
@@ -141,62 +140,6 @@
         </xsd:sequence>
     </xsd:complexType>
 
-    <!-- **************************************************** -->
-
-    <xsd:complexType name="authentication-mechanismType">
-        <xsd:annotation>
-            <xsd:documentation>
-
-                The authentication-mechanismType specifies an authentication
-                mechanism supported by the resource adapter. Note that this
-                support is for the resource adapter and not for the
-                underlying EIS instance. The optional description specifies
-                any resource adapter specific requirement for the support of
-                security contract and authentication mechanism.
-
-                Note that BasicPassword mechanism type should support the
-                javax.resource.spi.security.PasswordCredential interface.
-                The Kerbv5 mechanism type should support the
-                org.ietf.jgss.GSSCredential interface or the deprecated
-                javax.resource.spi.security.GenericCredential interface.
-
-            </xsd:documentation>
-        </xsd:annotation>
-
-        <xsd:sequence>
-            <xsd:element name="description"
-                type="j2ee:descriptionType"
-                minOccurs="0"
-                maxOccurs="unbounded"/>
-            <xsd:element name="authentication-mechanism-type"
-                type="xsd:string">
-                <xsd:annotation>
-                    <xsd:documentation>
-                        <![CDATA[
-
-                        The element authentication-mechanism-type specifies
-                        type of an authentication mechanism.
-
-                        The example values are:
-
-                        <authentication-mechanism-type>BasicPassword
-                        </authentication-mechanism-type>
-
-                        <authentication-mechanism-type>Kerbv5
-                        </authentication-mechanism-type>
-
-                        Any additional security mechanisms are outside the
-                        scope of the Connector architecture specification.
-
-                        ]]>
-                    </xsd:documentation>
-                </xsd:annotation>
-
-            </xsd:element>
-            <xsd:element name="credential-interface"
-                type="ger:credential-interfaceType"/>
-        </xsd:sequence>
-    </xsd:complexType>
 
     <!-- **************************************************** -->
 
@@ -235,7 +178,7 @@
 
         <xsd:sequence>
             <xsd:element name="connectionfactory-interface"
-                type="j2ee:fully-qualified-classType">
+                type="ger:fully-qualified-classType">
                 <xsd:annotation>
                     <xsd:documentation>
                         connectionfactory-interface is unique in ra.xml so is used to index
into ra.xml
@@ -255,7 +198,7 @@
                 type="xsd:string"/>
 
             <xsd:element name="implemented-interface"
-                type="j2ee:fully-qualified-classType"
+                type="ger:fully-qualified-classType"
                 minOccurs="0"
                 maxOccurs="unbounded">
                 <xsd:annotation>
@@ -361,7 +304,7 @@
             <xsd:element name="resourceadapter" type="ger:resourceadapterType" maxOccurs="unbounded"/>
 
             <xsd:element name="adminobject" type="ger:adminobjectType" minOccurs="0" maxOccurs="unbounded"/>
-            
+
             <xsd:element name="gbean" type="ger:gbeanType" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
 
@@ -379,7 +322,7 @@
     </xsd:simpleType>
     <!-- **************************************************** -->
 
-    <xsd:complexType name="credential-interfaceType">
+    <xsd:simpleType name="credential-interfaceType">
         <xsd:annotation>
             <xsd:documentation>
 
@@ -400,17 +343,15 @@
 
             </xsd:documentation>
         </xsd:annotation>
-        <xsd:simpleContent>
-            <xsd:restriction base="j2ee:fully-qualified-classType">
-                <xsd:enumeration
-                    value="javax.resource.spi.security.PasswordCredential"/>
-                <xsd:enumeration
-                    value="org.ietf.jgss.GSSCredential"/>
-                <xsd:enumeration
-                    value="javax.resource.spi.security.GenericCredential"/>
-            </xsd:restriction>
-        </xsd:simpleContent>
-    </xsd:complexType>
+        <xsd:restriction base="ger:fully-qualified-classType">
+            <xsd:enumeration
+                value="javax.resource.spi.security.PasswordCredential"/>
+            <xsd:enumeration
+                value="org.ietf.jgss.GSSCredential"/>
+            <xsd:enumeration
+                value="javax.resource.spi.security.GenericCredential"/>
+        </xsd:restriction>
+    </xsd:simpleType>
 
     <!-- **************************************************** -->
 
@@ -451,7 +392,7 @@
             <xsd:element name="resourceadapter-instance"
                 type="ger:resourceadapter-instanceType"
                 minOccurs="0">
-                </xsd:element>
+            </xsd:element>
             <xsd:element name="outbound-resourceadapter"
                 type="ger:outbound-resourceadapterType"
                 minOccurs="0">
@@ -478,32 +419,21 @@
     </xsd:complexType>
 
 
-    <!-- **************************************************** -->
 
-    <xsd:complexType name="transaction-supportType">
-        <xsd:annotation>
-            <xsd:documentation>
+    <!-- types borrowed from the j2ee schema.  We might want to centralize  these -->
 
-                The transaction-supportType specifies the level of
-                transaction support provided by the resource adapter. It is
-                used by transaction-support elements.
-
-                The value must be one of the following:
-
-                NoTransaction
-                LocalTransaction
-                XATransaction
+    <xsd:simpleType name="fully-qualified-classType">
+        <xsd:restriction base="xsd:string"/>
+    </xsd:simpleType>
 
-            </xsd:documentation>
-        </xsd:annotation>
+    <xsd:complexType name="descriptionType">
         <xsd:simpleContent>
-            <xsd:restriction base="j2ee:string">
-                <xsd:enumeration value="NoTransaction"/>
-                <xsd:enumeration value="LocalTransaction"/>
-                <xsd:enumeration value="XATransaction"/>
-            </xsd:restriction>
+            <xsd:extension base="xsd:string">
+                <xsd:attribute ref="xml:lang"/>
+            </xsd:extension>
         </xsd:simpleContent>
     </xsd:complexType>
+
 
 </xsd:schema>
 

Modified: geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java?view=diff&rev=123327&p1=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java&r1=123326&p2=geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java&r2=123327
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
Fri Dec 24 23:34:42 2004
@@ -39,7 +39,6 @@
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
@@ -173,28 +172,29 @@
         DataSource ds = null;
         Kernel kernel = null;
         try {
-            GBeanMBean config = loadConfig(unpackedDir, cl);
+            GBeanData config = loadConfig(unpackedDir);
+            ObjectName objectName = ObjectName.getInstance("test:configuration=test-ejb-jar");
+            config.setName(objectName);
 
             kernel = new Kernel("blah");
             kernel.boot();
 
-            GBeanMBean serverInfoGBean = new GBeanMBean(ServerInfo.GBEAN_INFO);
-            serverInfoGBean.setAttribute("baseDirectory", ".");
             ObjectName serverInfoObjectName = ObjectName.getInstance(j2eeContext.getJ2eeDomainName()
+ ":type=ServerInfo");
-            kernel.loadGBean(serverInfoObjectName, serverInfoGBean);
+            GBeanData serverInfoGBean = new GBeanData(serverInfoObjectName, ServerInfo.GBEAN_INFO);
+            serverInfoGBean.setAttribute("baseDirectory", ".");
+            kernel.loadGBean(serverInfoGBean, cl);
             kernel.startGBean(serverInfoObjectName);
             assertRunning(kernel, serverInfoObjectName);
 
-            GBeanMBean j2eeServerGBean = new GBeanMBean(J2EEServerImpl.GBEAN_INFO);
-            j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfoObjectName));
             ObjectName j2eeServerObjectName = NameFactory.getServerName(null, null, j2eeContext);
-            kernel.loadGBean(j2eeServerObjectName, j2eeServerGBean);
+            GBeanData j2eeServerGBean = new GBeanData(j2eeServerObjectName, J2EEServerImpl.GBEAN_INFO);
+            j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfoObjectName));
+            kernel.loadGBean(j2eeServerGBean, cl);
             kernel.startGBean(j2eeServerObjectName);
             assertRunning(kernel, j2eeServerObjectName);
 
             // load the configuration
-            ObjectName objectName = ObjectName.getInstance("test:configuration=test-ejb-jar");
-            kernel.loadGBean(objectName, config);
+            kernel.loadGBean(config, cl);
             config.setAttribute("baseURL", unpackedDir.toURL());
 
             //start configuration to load but not start gbeans.
@@ -329,13 +329,13 @@
         assertEquals(State.RUNNING_INDEX, state);
     }
 
-    private GBeanMBean loadConfig(File unpackedCar, ClassLoader classLoader) throws Exception
{
+    private GBeanData loadConfig(File unpackedCar) throws Exception {
         InputStream in = new FileInputStream(new File(unpackedCar, "META-INF/config.ser"));
         try {
             ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(in));
             GBeanData config = new GBeanData();
             config.readExternal(ois);
-            return new GBeanMBean(config, classLoader);
+            return config;
         } finally {
             in.close();
         }

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java?view=diff&rev=123327&p1=geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java&r1=123326&p2=geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java&r2=123327
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
Fri Dec 24 23:34:42 2004
@@ -47,7 +47,6 @@
  */
 public class ManagedConnectionFactoryWrapper implements GBeanLifecycle, DynamicGBean, ResourceManager
{
 
-    private static final GBeanInfo GBEAN_INFO;
     private static final Log log = LogFactory.getLog(ManagedConnectionFactoryWrapper.class);
 
     private final String managedConnectionFactoryClass;
@@ -289,6 +288,7 @@
         ((ConnectionManagerFactory.ReturnableXAResource) xaResource).returnConnection();
     }
 
+    public static final GBeanInfo GBEAN_INFO;
 
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(ManagedConnectionFactoryWrapper.class);

Mime
View raw message