geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r651092 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test: java/org/apache/geronimo/jee/openejb/OpenEjbJarTest.java resources/openejb/openejb-jar-expected-11.xml
Date Wed, 23 Apr 2008 22:33:04 GMT
Author: mcconne
Date: Wed Apr 23 15:32:55 2008
New Revision: 651092

URL: http://svn.apache.org/viewvc?rev=651092&view=rev
Log:
GERONIMODEVTOOLS-259 openejb-jar.xml JAXB junit testcases. Thanks to BJ Reed for this patch
!!

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/openejb/OpenEjbJarTest.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/resources/openejb/openejb-jar-expected-11.xml

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/openejb/OpenEjbJarTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/openejb/OpenEjbJarTest.java?rev=651092&r1=651091&r2=651092&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/openejb/OpenEjbJarTest.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/java/org/apache/geronimo/jee/openejb/OpenEjbJarTest.java
Wed Apr 23 15:32:55 2008
@@ -24,12 +24,38 @@
 import java.io.InputStream;
 
 import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
+import org.apache.geronimo.jee.deployment.Artifact;
+import org.apache.geronimo.jee.deployment.Dependencies;
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.deployment.Environment;
+import org.apache.geronimo.jee.deployment.Gbean;
+import org.apache.geronimo.jee.naming.EjbLocalRef;
+import org.apache.geronimo.jee.naming.EjbRef;
+import org.apache.geronimo.jee.naming.MessageDestination;
+import org.apache.geronimo.jee.naming.PersistenceUnitRef;
+import org.apache.geronimo.jee.naming.Port;
+import org.apache.geronimo.jee.naming.PortCompletion;
+import org.apache.geronimo.jee.naming.ResourceEnvRef;
+import org.apache.geronimo.jee.naming.ResourceLocator;
+import org.apache.geronimo.jee.naming.ResourceRef;
+import org.apache.geronimo.jee.naming.ServiceCompletion;
+import org.apache.geronimo.jee.naming.ServiceRef;
+import org.apache.geronimo.jee.security.Description;
+import org.apache.geronimo.jee.security.DistinguishedName;
+import org.apache.geronimo.jee.security.LoginDomainPrincipal;
+import org.apache.geronimo.jee.security.Principal;
+import org.apache.geronimo.jee.security.RealmPrincipal;
+import org.apache.geronimo.jee.security.Role;
+import org.apache.geronimo.jee.security.RoleMappings;
+import org.apache.geronimo.jee.security.Security;
+import org.apache.geronimo.jee.security.SubjectInfo;
 import org.custommonkey.xmlunit.Diff;
 import org.xml.sax.InputSource;
 
@@ -67,7 +93,7 @@
     }
 
     public void testCompleteXML() throws Exception {
-//      buildFullXMLFromScratch("openejb/openejb-jar-expected-11.xml");
+        buildFullXMLFromScratch("openejb/openejb-jar-expected-11.xml");
     }
 
 
@@ -132,13 +158,17 @@
     }
 
     private void buildFullXMLFromScratch (String fileExpected) throws Exception {
-/*
+
         org.apache.geronimo.jee.openejb.ObjectFactory openejbFactory = new org.apache.geronimo.jee.openejb.ObjectFactory();
         org.apache.geronimo.jee.deployment.ObjectFactory deploymentFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
         org.apache.geronimo.jee.naming.ObjectFactory namingFactory = new org.apache.geronimo.jee.naming.ObjectFactory();
-        org.apache.geronimo.jee.persistence.ObjectFactory persistenceFactory = new org.apache.geronimo.jee.persistence.ObjectFactory();
         org.apache.geronimo.jee.security.ObjectFactory securityFactory = new org.apache.geronimo.jee.security.ObjectFactory();
-        GeronimoEjbJar geronimoEjbJar = openejbFactory.createGeronimoEjbJar();
+        OpenejbJar openEjbJar = openejbFactory.createOpenejbJar();
+
+        openEjbJar.setDbSyntaxFactory("dbsyntaxfactory");
+        openEjbJar.setEjbQlCompilerFactory("ejbqlcompilerfactory");
+        Empty empty = openejbFactory.createEmpty();
+        openEjbJar.setEnforceForeignKeyConstraints(empty);
 
         // set the Environment
         Environment environment = deploymentFactory.createEnvironment();
@@ -156,25 +186,163 @@
         dependency.setType("car");
         dependencies.getDependency().add(dependency);
         environment.setDependencies(dependencies);
-        geronimoEjbJar.setEnvironment (environment);
-        
-        // set the Open EJB Jar TODO
-        //OpenejbJar openejbJar = openejbFactory.createOpenejbJar();
-        //openejbJar.setAny("openejbjar-any");
-        //geronimoEjbJar.setOpenejbJar(openejbJar);
+        openEjbJar.setEnvironment (environment);
 
-        // set the JNDI Environment Refs Group
-        PersistenceUnitRef persistenceUnitRef = namingFactory.createPersistenceUnitRef();
-        persistenceUnitRef.setPersistenceUnitName("jndienvironmentrefsgroup-persistenceunitref-unitname");
-        persistenceUnitRef.setPersistenceUnitRefName("jndienvironmentrefsgroup-persistenceunitref-unitrefname");
+        // set the Cmp Connection Factory
+        ResourceLocator resourceLocator = namingFactory.createResourceLocator();
+        resourceLocator.setUrl("resourcelocator-url");
+        resourceLocator.setResourceLink("resourcelocator-resourcelink");
         org.apache.geronimo.jee.naming.Pattern namingPattern = namingFactory.createPattern();
-        namingPattern.setArtifactId("jndienvironmentrefsgroup-persistenceunitref-pattern-artifactid");
-        namingPattern.setGroupId("jndienvironmentrefsgroup-persistenceunitref-pattern-groupid");
-        namingPattern.setModule("jndienvironmentrefsgroup-persistenceunitref-pattern-module");
-        namingPattern.setName("jndienvironmentrefsgroup-persistenceunitref-pattern-name");
-        namingPattern.setVersion("jndienvironmentrefsgroup-persistenceunitref-pattern-version");
+        namingPattern.setArtifactId("resourcelocator-pattern-artifactid");
+        namingPattern.setGroupId("resourcelocator-pattern-groupid");
+        namingPattern.setModule("resourcelocator-pattern-module");
+        namingPattern.setName("resourcelocator-pattern-name");
+        namingPattern.setVersion("resourcelocator-pattern-version");
+        resourceLocator.setPattern(namingPattern);
+        openEjbJar.setCmpConnectionFactory(resourceLocator);
+
+        // set the  Enterprise Bean 
+        OpenejbJar.EnterpriseBeans enterpriseBeans = openejbFactory.createOpenejbJarEnterpriseBeans();
+        MessageDrivenBean messageDrivenBean = openejbFactory.createMessageDrivenBean();
+        messageDrivenBean.setEjbName("messagedrivenbean-ejbname");
+        messageDrivenBean.setId("messagedrivenbean-id");
+        PersistenceUnitRef persistenceUnitRef = namingFactory.createPersistenceUnitRef();
+        persistenceUnitRef.setPersistenceUnitName("messagedrivenbean-persistenceunitref-unitname");
+        persistenceUnitRef.setPersistenceUnitRefName("messagedrivenbean-persistenceunitref-unitrefname");
+        namingPattern = namingFactory.createPattern();
+        namingPattern.setArtifactId("messagedrivenbean-persistenceunitref-pattern-artifactid");
+        namingPattern.setGroupId("messagedrivenbean-persistenceunitref-pattern-groupid");
+        namingPattern.setModule("messagedrivenbean-persistenceunitref-pattern-module");
+        namingPattern.setName("messagedrivenbean-persistenceunitref-pattern-name");
+        namingPattern.setVersion("messagedrivenbean-persistenceunitref-pattern-version");
         persistenceUnitRef.setPattern(namingPattern);
-        geronimoEjbJar.getJndiEnvironmentRefsGroup().add(namingFactory.createAbstractNamingEntry(persistenceUnitRef));
+        messageDrivenBean.getAbstractNamingEntry().add(namingFactory.createAbstractNamingEntry(persistenceUnitRef));
+        ActivationConfig activationConfig = openejbFactory.createActivationConfig();
+        ActivationConfigProperty activationConfigProperty = openejbFactory.createActivationConfigProperty();
+        activationConfigProperty.setActivationConfigPropertyName("messagedrivenbean-activationconfigproperty-name");
+        activationConfigProperty.setActivationConfigPropertyValue("messagedrivenbean-activationconfigproperty-value");
+        activationConfig.getActivationConfigProperty().add(activationConfigProperty);
+        activationConfig.getDescription().add("messagedrivenbean-activationconfig-description");
+        messageDrivenBean.setActivationConfig(activationConfig);
+        EjbLocalRef ejbLocalRef = namingFactory.createEjbLocalRef();
+        ejbLocalRef.setRefName("messagedrivenbean-ejblocalref-refname");
+        ejbLocalRef.setEjbLink("messagedrivenbean-ejblocalref-ejblink");
+        namingPattern = namingFactory.createPattern();
+        namingPattern.setArtifactId("messagedrivenbean-ejblocalref-pattern-artifactid");
+        namingPattern.setGroupId("messagedrivenbean-ejblocalref-pattern-groupid");
+        namingPattern.setModule("messagedrivenbean-ejblocalref-pattern-module");
+        namingPattern.setName("messagedrivenbean-ejblocalref-pattern-name");
+        namingPattern.setVersion("messagedrivenbean-ejblocalref-pattern-version");
+        ejbLocalRef.setPattern(namingPattern);
+        messageDrivenBean.getEjbLocalRef().add(ejbLocalRef);
+        EjbRef ejbRef = namingFactory.createEjbRef();
+        ejbRef.setName("messagedrivenbean-ejbref-name");
+        ejbRef.setRefName("messagedrivenbean-ejbref-refname");
+        ejbRef.setCssLink("messagedrivenbean-ejbref-csslink");
+        ejbRef.setEjbLink("messagedrivenbean-ejbref-ejblink");
+        ejbRef.setNsCorbaloc("messagedrivenbean-ejbref-nscorbaloc");
+        namingPattern = namingFactory.createPattern();
+        namingPattern.setArtifactId("messagedrivenbean-ejbref-css-artifactid");
+        namingPattern.setGroupId("messagedrivenbean-ejbref-css-groupid");
+        namingPattern.setModule("messagedrivenbean-ejbref-css-module");
+        namingPattern.setName("messagedrivenbean-ejbref-css-name");
+        namingPattern.setVersion("messagedrivenbean-ejbref-css-version");
+        ejbRef.setCss(namingPattern);
+        namingPattern = namingFactory.createPattern();
+        namingPattern.setArtifactId("messagedrivenbean-ejbref-pattern-artifactid");
+        namingPattern.setGroupId("messagedrivenbean-ejbref-pattern-groupid");
+        namingPattern.setModule("messagedrivenbean-ejbref-pattern-module");
+        namingPattern.setName("messagedrivenbean-ejbref-pattern-name");
+        namingPattern.setVersion("messagedrivenbean-ejbref-pattern-version");
+        ejbRef.setPattern(namingPattern);
+        messageDrivenBean.getEjbRef().add(ejbRef);
+        resourceLocator = namingFactory.createResourceLocator();
+        resourceLocator.setUrl("messagedrivenbean-resourcelocator-url");
+        resourceLocator.setResourceLink("messagedrivenbean-resourcelocator-resourcelink");
+        namingPattern = namingFactory.createPattern();
+        namingPattern.setArtifactId("messagedrivenbean-resourcelocator-pattern-artifactid");
+        namingPattern.setGroupId("messagedrivenbean-resourcelocator-pattern-groupid");
+        namingPattern.setModule("messagedrivenbean-resourcelocator-pattern-module");
+        namingPattern.setName("messagedrivenbean-resourcelocator-pattern-name");
+        namingPattern.setVersion("messagedrivenbean-resourcelocator-pattern-version");
+        resourceLocator.setPattern(namingPattern);
+        messageDrivenBean.setResourceAdapter(resourceLocator);
+        ResourceEnvRef resourceEnvRef = namingFactory.createResourceEnvRef();
+        resourceEnvRef.setAdminObjectLink("messagedrivenbean-resourceenvref-adminobjectlink");
+        resourceEnvRef.setAdminObjectModule("messagedrivenbean-resourceenvref-adminobjectmodule");
+        resourceEnvRef.setMessageDestinationLink("messagedrivenbean-resourceenvref-messagedestinationlink");
+        resourceEnvRef.setRefName("messagedrivenbean-resourceenvref-refname");
+        namingPattern = namingFactory.createPattern();
+        namingPattern.setArtifactId("messagedrivenbean-resourceenvref-pattern-artifactid");
+        namingPattern.setGroupId("messagedrivenbean-resourceenvref-pattern-groupid");
+        namingPattern.setModule("messagedrivenbean-resourceenvref-pattern-module");
+        namingPattern.setName("messagedrivenbean-resourceenvref-pattern-name");
+        namingPattern.setVersion("messagedrivenbean-resourceenvref-pattern-version");
+        resourceEnvRef.setPattern(namingPattern);
+        messageDrivenBean.getResourceEnvRef().add(resourceEnvRef);
+        ResourceRef resourceRef = namingFactory.createResourceRef();
+        resourceRef.setRefName("messagedrivenbean-resourceref-refname");
+        resourceRef.setResourceLink("messagedrivenbean-resourceref-resourcelink");
+        resourceRef.setUrl("messagedrivenbean-resourceref-url");
+        namingPattern = namingFactory.createPattern();
+        namingPattern.setArtifactId("messagedrivenbean-resourceref-pattern-artifactid");
+        namingPattern.setGroupId("messagedrivenbean-resourceref-pattern-groupid");
+        namingPattern.setModule("messagedrivenbean-resourcref-pattern-module");
+        namingPattern.setName("messagedrivenbean-resourceref-pattern-name");
+        namingPattern.setVersion("messagedrivenbean-resourceref-pattern-version");
+        resourceRef.setPattern(namingPattern);
+        messageDrivenBean.getResourceRef().add(resourceRef);
+        ServiceRef serviceRef = namingFactory.createServiceRef();
+        serviceRef.setServiceRefName("messagedrivenbean-serviceref-refname");
+        ServiceCompletion serviceCompletion = namingFactory.createServiceCompletion();
+        serviceCompletion.setServiceName("messagedrivenbean-serviceref-servicecompletion-servicename");
+        PortCompletion portCompletion = namingFactory.createPortCompletion();
+        portCompletion.setBindingName("messagedrivenbean-serviceref-servicecompletion-portcompletion-bindingname");
+        Port port = namingFactory.createPort();
+        port.setCredentialsName("messagedrivenbean-serviceref-servicecompletion-portcompletion-port-credentialsname");
+        port.setHost("messagedrivenbean-serviceref-servicecompletion-portcompletion-port-host");
+        port.setPort(new Integer(0));
+        port.setPortName("messagedrivenbean-serviceref-servicecompletion-portcompletion-port-portname");
+        port.setProtocol("messagedrivenbean-serviceref-servicecompletion-portcompletion-port-protocol");
+        port.setUri("messagedrivenbean-serviceref-servicecompletion-portcompletion-port-uri");
+        portCompletion.setPort(port);
+        serviceCompletion.getPortCompletion().add(portCompletion);
+        serviceRef.setServiceCompletion(serviceCompletion);
+        port = namingFactory.createPort();
+        port.setCredentialsName("messagedrivenbean-serviceref-port-credentialsname");
+        port.setHost("messagedrivenbean-serviceref-port-host");
+        port.setPort(new Integer(0));
+        port.setPortName("messagedrivenbean-serviceref-port-portname");
+        port.setProtocol("messagedrivenbean-serviceref-port-protocol");
+        port.setUri("messagedrivenbean-serviceref-port-uri");
+        serviceRef.getPort().add(port);
+        messageDrivenBean.getServiceRef().add(serviceRef);
+        enterpriseBeans.getSessionOrEntityOrMessageDriven().add(messageDrivenBean);
+        openEjbJar.setEnterpriseBeans(enterpriseBeans);
+
+        // set the Relationships
+        Relationships relationships = openejbFactory.createRelationships();
+        EjbRelation ejbRelation = openejbFactory.createEjbRelation();
+        ejbRelation.setEjbRelationName("ejbrelation-ejbrelationname");
+        ejbRelation.setManyToManyTableName("ejbrelation-manytomanytablename");
+        EjbRelationshipRole ejbRelationshipRole = openejbFactory.createEjbRelationshipRole();
+        ejbRelationshipRole.setEjbRelationshipRoleName("ejbrelation-role-name");
+        EjbRelationshipRole.CmrField cmrField = openejbFactory.createEjbRelationshipRoleCmrField();
+        cmrField.setCmrFieldName("ejbrelation-role-cmrfieldname");
+        ejbRelationshipRole.setCmrField(cmrField);
+        //TODO ejbRelationshipRole.setForeignKeyColumnOnSource(value);
+        EjbRelationshipRole.RelationshipRoleSource relationshipRoleSource = openejbFactory.createEjbRelationshipRoleRelationshipRoleSource();
+        relationshipRoleSource.setEjbName("ejbrelation-role-ejbname");
+        ejbRelationshipRole.setRelationshipRoleSource(relationshipRoleSource);
+        EjbRelationshipRole.RoleMapping roleMapping = openejbFactory.createEjbRelationshipRoleRoleMapping();
+        EjbRelationshipRole.RoleMapping.CmrFieldMapping cmrFieldMapping = openejbFactory.createEjbRelationshipRoleRoleMappingCmrFieldMapping();
+        cmrFieldMapping.setKeyColumn("ejbrelation-role-mapping-keycolumn");
+        cmrFieldMapping.setForeignKeyColumn("ejbrelation-role-mapping-foreignkeycolumn");
+        roleMapping.getCmrFieldMapping().add(cmrFieldMapping);
+        ejbRelationshipRole.setRoleMapping(roleMapping);
+        ejbRelation.getEjbRelationshipRole().add(ejbRelationshipRole);
+        relationships.getEjbRelation().add(ejbRelation);
+        openEjbJar.setRelationships(relationships);
 
         // set the Message Destination
         MessageDestination messageDestination = namingFactory.createMessageDestination();
@@ -188,50 +356,13 @@
         namingPattern.setName("messagedestination-pattern-name");
         namingPattern.setVersion("messagedestination-pattern-version");
         messageDestination.setPattern(namingPattern);
-        geronimoEjbJar.getMessageDestination().add(messageDestination);
+        openEjbJar.getMessageDestination().add(messageDestination);
 
-        // set the Service or Persistence
-        Persistence persistence = persistenceFactory.createPersistence();
-        persistence.setVersion("persistence-version");
-        Persistence.PersistenceUnit persistenceUnit = persistenceFactory.createPersistencePersistenceUnit();
-        persistenceUnit.setName("persistence-name");
-        persistenceUnit.setDescription("persistence-description");
-        persistenceUnit.setExcludeUnlistedClasses(true);
-        persistenceUnit.setJtaDataSource("persistence-jtadatasource");
-        persistenceUnit.setNonJtaDataSource("persistence-nonjtadatasource");
-        persistenceUnit.setProvider("persistence-provider");
-        Persistence.PersistenceUnit.Properties properties = persistenceFactory.createPersistencePersistenceUnitProperties();
-        Persistence.PersistenceUnit.Properties.Property property = persistenceFactory.createPersistencePersistenceUnitPropertiesProperty();
-        property.setName("persistence-property-name");
-        property.setValue("persistence-property-value");
-        properties.getProperty().add(property);
-        persistenceUnit.setProperties(properties);
-        persistenceUnit.setTransactionType(PersistenceUnitTransaction.RESOURCE_LOCAL);
-        persistenceUnit.getClazz().add("persistence-clazz");
-        persistenceUnit.getJarFile().add("persistence-jarfile");
-        persistenceUnit.getMappingFile().add("persistence-mappingfile");
-        persistence.getPersistenceUnit().add(persistenceUnit);
-        geronimoEjbJar.getServiceOrPersistence().add(persistence);
-
-        // set the TSS Link
-        TssLink tssLink = openejbFactory.createTssLink();
-        tssLink.setEjbName("tsslink-ejbname");
-        tssLink.setTssName("tsslink-tssname");
-        tssLink.getJndiName().add("tssname-jndiname");
-        geronimoEjbJar.getTssLink().add(tssLink);
-
-        // set the Web Service Binding
-        WebServiceBinding webServiceBinding = openejbFactory.createWebServiceBinding();
-        webServiceBinding.setEjbName("webservicebinding-ejbname");
-        webServiceBinding.setWebServiceAddress("webservicebinding-webserviceaddress");
-        webServiceBinding.getWebServiceVirtualHost().add("webservicebinding-webservicevirtualhost");
-        WebServiceSecurity webServiceSecurity = openejbFactory.createWebServiceSecurity();
-        webServiceSecurity.setRealmName("webservicebinding-webservicesecurity-realmname");
-        webServiceSecurity.setSecurityRealmName("webservicebinding-webservicesecurity-securityrealmname");
-        webServiceSecurity.setAuthMethod(AuthMethod.BASIC);
-        webServiceSecurity.setTransportGuarantee(TransportGuarantee.INTEGRAL);
-        webServiceBinding.setWebServiceSecurity(webServiceSecurity);
-        geronimoEjbJar.getWebServiceBinding().add(webServiceBinding);
+        // set the Service
+        Gbean gbean = deploymentFactory.createGbean();
+        gbean.setClazz("gbean-class");
+        gbean.setName("gbean-name");
+        openEjbJar.getService().add(deploymentFactory.createGbean(gbean));
 
         // set the Security
         Security security = securityFactory.createSecurity();
@@ -296,9 +427,9 @@
         role.getRealmPrincipal().add(realmPrincipal);
         roleMappings.getRole().add(role);
         security.setRoleMappings(roleMappings);
-        geronimoEjbJar.setSecurity(securityFactory.createSecurity(security));
+        openEjbJar.setSecurity(securityFactory.createSecurity(security));
 
-        JAXBElement<GeronimoEjbJar> jaxbElement = openejbFactory.createEjbJar(geronimoEjbJar);
+        JAXBElement<OpenejbJar> jaxbElement = openejbFactory.createOpenejbJar(openEjbJar);
         
         // 
         // Marshall the output of the unmarshall
@@ -328,7 +459,6 @@
             System.out.println("[Expected XML: " + fileExpected + "]\n" + expected + '\n');
             throw e;            
         }
-*/
     }
 
     private String readContent(InputStream in) throws IOException {

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/resources/openejb/openejb-jar-expected-11.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/resources/openejb/openejb-jar-expected-11.xml?rev=651092&r1=651091&r2=651092&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/resources/openejb/openejb-jar-expected-11.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/test/resources/openejb/openejb-jar-expected-11.xml
Wed Apr 23 15:32:55 2008
@@ -18,7 +18,7 @@
 
 <!-- @version $Rev$ $Date$ -->
            
-<ns2:openejb-jar xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ns2="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
xmlns:ns3="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:ns5="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:ns6="http://java.sun.com/xml/ns/persistence">
+<ns3:openejb-jar xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ns2="http://geronimo.apache.org/xml/ns/naming-1.2"
xmlns:ns3="http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:ns4="http://openejb.apache.org/xml/ns/pkgen-2.1"
xmlns:ns5="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:ns6="http://geronimo.apache.org/xml/ns/security-2.0">
     <environment>
         <moduleId>
             <groupId>org.apache.geronimo.testsuite</groupId>
@@ -35,95 +35,205 @@
             </dependency>
         </dependencies>
     </environment>
-    <ns3:abstract-naming-entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns3:persistence-unit-refType">
-        <ns3:persistence-unit-ref-name>jndienvironmentrefsgroup-persistenceunitref-unitrefname</ns3:persistence-unit-ref-name>
-        <ns3:persistence-unit-name>jndienvironmentrefsgroup-persistenceunitref-unitname</ns3:persistence-unit-name>
-        <ns3:pattern>
-            <ns3:groupId>jndienvironmentrefsgroup-persistenceunitref-pattern-groupid</ns3:groupId>
-            <ns3:artifactId>jndienvironmentrefsgroup-persistenceunitref-pattern-artifactid</ns3:artifactId>
-            <ns3:version>jndienvironmentrefsgroup-persistenceunitref-pattern-version</ns3:version>
-            <ns3:module>jndienvironmentrefsgroup-persistenceunitref-pattern-module</ns3:module>
-            <ns3:name>jndienvironmentrefsgroup-persistenceunitref-pattern-name</ns3:name>
-        </ns3:pattern>
-    </ns3:abstract-naming-entry>
-    <ns3:message-destination>
-        <ns3:message-destination-name>messagedestination-name</ns3:message-destination-name>
-        <ns3:pattern>
-            <ns3:groupId>messagedestination-pattern-groupid</ns3:groupId>
-            <ns3:artifactId>messagedestination-pattern-artifactid</ns3:artifactId>
-            <ns3:version>messagedestination-pattern-version</ns3:version>
-            <ns3:module>messagedestination-pattern-module</ns3:module>
-            <ns3:name>messagedestination-pattern-name</ns3:name>
-        </ns3:pattern>
-        <ns3:admin-object-module>messagedestination-adminobjectmodule</ns3:admin-object-module>
-        <ns3:admin-object-link>messagedestination-adminobjectlink</ns3:admin-object-link>
-    </ns3:message-destination>
-    <ns2:tss-link>
-        <ns2:ejb-name>tsslink-ejbname</ns2:ejb-name>
-        <ns2:tss-name>tsslink-tssname</ns2:tss-name>
-        <ns2:jndi-name>tssname-jndiname</ns2:jndi-name>
-    </ns2:tss-link>
-    <ns2:web-service-binding>
-        <ns2:ejb-name>webservicebinding-ejbname</ns2:ejb-name>
-        <ns2:web-service-address>webservicebinding-webserviceaddress</ns2:web-service-address>
-        <ns2:web-service-virtual-host>webservicebinding-webservicevirtualhost</ns2:web-service-virtual-host>
-        <ns2:web-service-security>
-            <ns2:security-realm-name>webservicebinding-webservicesecurity-securityrealmname</ns2:security-realm-name>
-            <ns2:realm-name>webservicebinding-webservicesecurity-realmname</ns2:realm-name>
-            <ns2:transport-guarantee>INTEGRAL</ns2:transport-guarantee>
-            <ns2:auth-method>BASIC</ns2:auth-method>
-        </ns2:web-service-security>
-    </ns2:web-service-binding>
-    <ns5:security use-context-handler="true" doas-current-caller="true" default-role="security-role">
-        <ns5:credential-store-ref>
+    <ns2:cmp-connection-factory>
+        <ns2:pattern>
+            <ns2:groupId>resourcelocator-pattern-groupid</ns2:groupId>
+            <ns2:artifactId>resourcelocator-pattern-artifactid</ns2:artifactId>
+            <ns2:version>resourcelocator-pattern-version</ns2:version>
+            <ns2:module>resourcelocator-pattern-module</ns2:module>
+            <ns2:name>resourcelocator-pattern-name</ns2:name>
+        </ns2:pattern>
+        <ns2:resource-link>resourcelocator-resourcelink</ns2:resource-link>
+        <ns2:url>resourcelocator-url</ns2:url>
+    </ns2:cmp-connection-factory>
+    <ns3:ejb-ql-compiler-factory>ejbqlcompilerfactory</ns3:ejb-ql-compiler-factory>
+    <ns3:db-syntax-factory>dbsyntaxfactory</ns3:db-syntax-factory>
+    <ns3:enforce-foreign-key-constraints/>
+    <ns3:enterprise-beans>
+        <ns3:message-driven id="messagedrivenbean-id">
+            <ns3:ejb-name>messagedrivenbean-ejbname</ns3:ejb-name>
+            <ns2:resource-adapter>
+                <ns2:pattern>
+                    <ns2:groupId>messagedrivenbean-resourcelocator-pattern-groupid</ns2:groupId>
+                    <ns2:artifactId>messagedrivenbean-resourcelocator-pattern-artifactid</ns2:artifactId>
+                    <ns2:version>messagedrivenbean-resourcelocator-pattern-version</ns2:version>
+                    <ns2:module>messagedrivenbean-resourcelocator-pattern-module</ns2:module>
+                    <ns2:name>messagedrivenbean-resourcelocator-pattern-name</ns2:name>
+                </ns2:pattern>
+                <ns2:resource-link>messagedrivenbean-resourcelocator-resourcelink</ns2:resource-link>
+                <ns2:url>messagedrivenbean-resourcelocator-url</ns2:url>
+            </ns2:resource-adapter>
+            <ns3:activation-config>
+                <ns3:description>messagedrivenbean-activationconfig-description</ns3:description>
+                <ns3:activation-config-property>
+                    <ns3:activation-config-property-name>messagedrivenbean-activationconfigproperty-name</ns3:activation-config-property-name>
+                    <ns3:activation-config-property-value>messagedrivenbean-activationconfigproperty-value</ns3:activation-config-property-value>
+                </ns3:activation-config-property>
+            </ns3:activation-config>
+            <ns2:abstract-naming-entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns2:persistence-unit-refType">
+                <ns2:persistence-unit-ref-name>messagedrivenbean-persistenceunitref-unitrefname</ns2:persistence-unit-ref-name>
+                <ns2:persistence-unit-name>messagedrivenbean-persistenceunitref-unitname</ns2:persistence-unit-name>
+                <ns2:pattern>
+                    <ns2:groupId>messagedrivenbean-persistenceunitref-pattern-groupid</ns2:groupId>
+                    <ns2:artifactId>messagedrivenbean-persistenceunitref-pattern-artifactid</ns2:artifactId>
+                    <ns2:version>messagedrivenbean-persistenceunitref-pattern-version</ns2:version>
+                    <ns2:module>messagedrivenbean-persistenceunitref-pattern-module</ns2:module>
+                    <ns2:name>messagedrivenbean-persistenceunitref-pattern-name</ns2:name>
+                </ns2:pattern>
+            </ns2:abstract-naming-entry>
+            <ns2:ejb-ref>
+                <ns2:ref-name>messagedrivenbean-ejbref-refname</ns2:ref-name>
+                <ns2:pattern>
+                    <ns2:groupId>messagedrivenbean-ejbref-pattern-groupid</ns2:groupId>
+                    <ns2:artifactId>messagedrivenbean-ejbref-pattern-artifactid</ns2:artifactId>
+                    <ns2:version>messagedrivenbean-ejbref-pattern-version</ns2:version>
+                    <ns2:module>messagedrivenbean-ejbref-pattern-module</ns2:module>
+                    <ns2:name>messagedrivenbean-ejbref-pattern-name</ns2:name>
+                </ns2:pattern>
+                <ns2:ns-corbaloc>messagedrivenbean-ejbref-nscorbaloc</ns2:ns-corbaloc>
+                <ns2:name>messagedrivenbean-ejbref-name</ns2:name>
+                <ns2:css>
+                    <ns2:groupId>messagedrivenbean-ejbref-css-groupid</ns2:groupId>
+                    <ns2:artifactId>messagedrivenbean-ejbref-css-artifactid</ns2:artifactId>
+                    <ns2:version>messagedrivenbean-ejbref-css-version</ns2:version>
+                    <ns2:module>messagedrivenbean-ejbref-css-module</ns2:module>
+                    <ns2:name>messagedrivenbean-ejbref-css-name</ns2:name>
+                </ns2:css>
+                <ns2:css-link>messagedrivenbean-ejbref-csslink</ns2:css-link>
+                <ns2:ejb-link>messagedrivenbean-ejbref-ejblink</ns2:ejb-link>
+            </ns2:ejb-ref>
+            <ns2:ejb-local-ref>
+                <ns2:ref-name>messagedrivenbean-ejblocalref-refname</ns2:ref-name>
+                <ns2:pattern>
+                    <ns2:groupId>messagedrivenbean-ejblocalref-pattern-groupid</ns2:groupId>
+                    <ns2:artifactId>messagedrivenbean-ejblocalref-pattern-artifactid</ns2:artifactId>
+                    <ns2:version>messagedrivenbean-ejblocalref-pattern-version</ns2:version>
+                    <ns2:module>messagedrivenbean-ejblocalref-pattern-module</ns2:module>
+                    <ns2:name>messagedrivenbean-ejblocalref-pattern-name</ns2:name>
+                </ns2:pattern>
+                <ns2:ejb-link>messagedrivenbean-ejblocalref-ejblink</ns2:ejb-link>
+            </ns2:ejb-local-ref>
+            <ns2:service-ref>
+                <ns2:service-ref-name>messagedrivenbean-serviceref-refname</ns2:service-ref-name>
+                <ns2:service-completion>
+                    <ns2:service-name>messagedrivenbean-serviceref-servicecompletion-servicename</ns2:service-name>
+                    <ns2:port-completion>
+                        <ns2:port>
+                            <ns2:port-name>messagedrivenbean-serviceref-servicecompletion-portcompletion-port-portname</ns2:port-name>
+                            <ns2:protocol>messagedrivenbean-serviceref-servicecompletion-portcompletion-port-protocol</ns2:protocol>
+                            <ns2:host>messagedrivenbean-serviceref-servicecompletion-portcompletion-port-host</ns2:host>
+                            <ns2:port>0</ns2:port>
+                            <ns2:uri>messagedrivenbean-serviceref-servicecompletion-portcompletion-port-uri</ns2:uri>
+                            <ns2:credentials-name>messagedrivenbean-serviceref-servicecompletion-portcompletion-port-credentialsname</ns2:credentials-name>
+                        </ns2:port>
+                        <ns2:binding-name>messagedrivenbean-serviceref-servicecompletion-portcompletion-bindingname</ns2:binding-name>
+                    </ns2:port-completion>
+                </ns2:service-completion>
+                <ns2:port>
+                    <ns2:port-name>messagedrivenbean-serviceref-port-portname</ns2:port-name>
+                    <ns2:protocol>messagedrivenbean-serviceref-port-protocol</ns2:protocol>
+                    <ns2:host>messagedrivenbean-serviceref-port-host</ns2:host>
+                    <ns2:port>0</ns2:port>
+                    <ns2:uri>messagedrivenbean-serviceref-port-uri</ns2:uri>
+                    <ns2:credentials-name>messagedrivenbean-serviceref-port-credentialsname</ns2:credentials-name>
+                </ns2:port>
+            </ns2:service-ref>
+            <ns2:resource-ref>
+                <ns2:ref-name>messagedrivenbean-resourceref-refname</ns2:ref-name>
+                <ns2:pattern>
+                    <ns2:groupId>messagedrivenbean-resourceref-pattern-groupid</ns2:groupId>
+                    <ns2:artifactId>messagedrivenbean-resourceref-pattern-artifactid</ns2:artifactId>
+                    <ns2:version>messagedrivenbean-resourceref-pattern-version</ns2:version>
+                    <ns2:module>messagedrivenbean-resourcref-pattern-module</ns2:module>
+                    <ns2:name>messagedrivenbean-resourceref-pattern-name</ns2:name>
+                </ns2:pattern>
+                <ns2:resource-link>messagedrivenbean-resourceref-resourcelink</ns2:resource-link>
+                <ns2:url>messagedrivenbean-resourceref-url</ns2:url>
+            </ns2:resource-ref>
+            <ns2:resource-env-ref>
+                <ns2:ref-name>messagedrivenbean-resourceenvref-refname</ns2:ref-name>
+                <ns2:pattern>
+                    <ns2:groupId>messagedrivenbean-resourceenvref-pattern-groupid</ns2:groupId>
+                    <ns2:artifactId>messagedrivenbean-resourceenvref-pattern-artifactid</ns2:artifactId>
+                    <ns2:version>messagedrivenbean-resourceenvref-pattern-version</ns2:version>
+                    <ns2:module>messagedrivenbean-resourceenvref-pattern-module</ns2:module>
+                    <ns2:name>messagedrivenbean-resourceenvref-pattern-name</ns2:name>
+                </ns2:pattern>
+                <ns2:message-destination-link>messagedrivenbean-resourceenvref-messagedestinationlink</ns2:message-destination-link>
+                <ns2:admin-object-module>messagedrivenbean-resourceenvref-adminobjectmodule</ns2:admin-object-module>
+                <ns2:admin-object-link>messagedrivenbean-resourceenvref-adminobjectlink</ns2:admin-object-link>
+            </ns2:resource-env-ref>
+        </ns3:message-driven>
+    </ns3:enterprise-beans>
+    <ns3:relationships>
+        <ns3:ejb-relation>
+            <ns3:ejb-relation-name>ejbrelation-ejbrelationname</ns3:ejb-relation-name>
+            <ns3:many-to-many-table-name>ejbrelation-manytomanytablename</ns3:many-to-many-table-name>
+            <ns3:ejb-relationship-role>
+                <ns3:ejb-relationship-role-name>ejbrelation-role-name</ns3:ejb-relationship-role-name>
+                <ns3:relationship-role-source>
+                    <ns3:ejb-name>ejbrelation-role-ejbname</ns3:ejb-name>
+                </ns3:relationship-role-source>
+                <ns3:cmr-field>
+                    <ns3:cmr-field-name>ejbrelation-role-cmrfieldname</ns3:cmr-field-name>
+                </ns3:cmr-field>
+                <ns3:role-mapping>
+                    <ns3:cmr-field-mapping>
+                        <ns3:key-column>ejbrelation-role-mapping-keycolumn</ns3:key-column>
+                        <ns3:foreign-key-column>ejbrelation-role-mapping-foreignkeycolumn</ns3:foreign-key-column>
+                    </ns3:cmr-field-mapping>
+                </ns3:role-mapping>
+            </ns3:ejb-relationship-role>
+        </ns3:ejb-relation>
+    </ns3:relationships>
+    <ns2:message-destination>
+        <ns2:message-destination-name>messagedestination-name</ns2:message-destination-name>
+        <ns2:pattern>
+            <ns2:groupId>messagedestination-pattern-groupid</ns2:groupId>
+            <ns2:artifactId>messagedestination-pattern-artifactid</ns2:artifactId>
+            <ns2:version>messagedestination-pattern-version</ns2:version>
+            <ns2:module>messagedestination-pattern-module</ns2:module>
+            <ns2:name>messagedestination-pattern-name</ns2:name>
+        </ns2:pattern>
+        <ns2:admin-object-module>messagedestination-adminobjectmodule</ns2:admin-object-module>
+        <ns2:admin-object-link>messagedestination-adminobjectlink</ns2:admin-object-link>
+    </ns2:message-destination>
+    <ns6:security use-context-handler="true" doas-current-caller="true" default-role="security-role">
+        <ns6:credential-store-ref>
             <groupId>security-credentialstoreref-groupid</groupId>
             <artifactId>security-credentialstoreref-artifactid</artifactId>
             <version>security-credentialstoreref-version</version>
             <module>security-credentialstoreref-module</module>
             <type>security-credentialstoreref-type</type>
             <name>security-credentialstoreref-customfoo</name>
-        </ns5:credential-store-ref>
-        <ns5:default-subject>
-            <ns5:description>security-subjectinfo-description</ns5:description>
-            <ns5:realm>security-subjectinfo-realm</ns5:realm>
-            <ns5:id>security-subjectinfo-id</ns5:id>
-        </ns5:default-subject>
-        <ns5:role-mappings>
-            <ns5:role role-name="security-role">
-                <ns5:description>security-role-description</ns5:description>
-                <ns5:run-as-subject>
-                    <ns5:description>security-role-subjectinfo-description</ns5:description>
-                    <ns5:realm>security-role-subjectinfo-realm</ns5:realm>
-                    <ns5:id>security-role-subjectinfo-id</ns5:id>
-                </ns5:run-as-subject>
-                <ns5:realm-principal name="security-role-realmprincipal-name" class="security-role-realmprincipal-class">
-                    <ns5:description>security-role-realmprincipal-description</ns5:description>
-                </ns5:realm-principal>
-                <ns5:login-domain-principal domain-name="security-role-logindomainprincipal-domainname"
name="security-role-logindomainprincipal-name" class="security-role-logindomainprincipal-class">
-                    <ns5:description>security-role-logindomainprincipal-description</ns5:description>
-                </ns5:login-domain-principal>
-                <ns5:principal name="security-role-principal-name" class="security-role-principal-class">
-                    <ns5:description>security-role-principal-description</ns5:description>
-                </ns5:principal>
-                <ns5:distinguished-name name="security-role-distinguishedname">
-                    <ns5:description>security-role-distinguished-name-description</ns5:description>
-                </ns5:distinguished-name>
-            </ns5:role>
-        </ns5:role-mappings>
-    </ns5:security>
-    <ns6:persistence version="persistence-version">
-        <ns6:persistence-unit transaction-type="RESOURCE_LOCAL" name="persistence-name">
-            <ns6:description>persistence-description</ns6:description>
-            <ns6:provider>persistence-provider</ns6:provider>
-            <ns6:jta-data-source>persistence-jtadatasource</ns6:jta-data-source>
-            <ns6:non-jta-data-source>persistence-nonjtadatasource</ns6:non-jta-data-source>
-            <ns6:mapping-file>persistence-mappingfile</ns6:mapping-file>
-            <ns6:jar-file>persistence-jarfile</ns6:jar-file>
-            <ns6:class>persistence-clazz</ns6:class>
-            <ns6:exclude-unlisted-classes>true</ns6:exclude-unlisted-classes>
-            <ns6:properties>
-                <ns6:property value="persistence-property-value" name="persistence-property-name"/>
-            </ns6:properties>
-        </ns6:persistence-unit>
-    </ns6:persistence>
-</ns2:openejb-jar>
+        </ns6:credential-store-ref>
+        <ns6:default-subject>
+            <ns6:description>security-subjectinfo-description</ns6:description>
+            <ns6:realm>security-subjectinfo-realm</ns6:realm>
+            <ns6:id>security-subjectinfo-id</ns6:id>
+        </ns6:default-subject>
+        <ns6:role-mappings>
+            <ns6:role role-name="security-role">
+                <ns6:description>security-role-description</ns6:description>
+                <ns6:run-as-subject>
+                    <ns6:description>security-role-subjectinfo-description</ns6:description>
+                    <ns6:realm>security-role-subjectinfo-realm</ns6:realm>
+                    <ns6:id>security-role-subjectinfo-id</ns6:id>
+                </ns6:run-as-subject>
+                <ns6:realm-principal name="security-role-realmprincipal-name" class="security-role-realmprincipal-class">
+                    <ns6:description>security-role-realmprincipal-description</ns6:description>
+                </ns6:realm-principal>
+                <ns6:login-domain-principal domain-name="security-role-logindomainprincipal-domainname"
name="security-role-logindomainprincipal-name" class="security-role-logindomainprincipal-class">
+                    <ns6:description>security-role-logindomainprincipal-description</ns6:description>
+                </ns6:login-domain-principal>
+                <ns6:principal name="security-role-principal-name" class="security-role-principal-class">
+                    <ns6:description>security-role-principal-description</ns6:description>
+                </ns6:principal>
+                <ns6:distinguished-name name="security-role-distinguishedname">
+                    <ns6:description>security-role-distinguished-name-description</ns6:description>
+                </ns6:distinguished-name>
+            </ns6:role>
+        </ns6:role-mappings>
+    </ns6:security>
+    <gbean name="gbean-name" class="gbean-class"/>
+</ns3:openejb-jar>



Mime
View raw message