geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1078888 - in /geronimo/sandbox/djencks/txmanager: ./ connector-itests/ connector-itests/src/test/java/org/apache/geronimo/components/connector/itests/ geronimo-connector-builder-1_6/ geronimo-connector-builder-1_6/src/main/java/org/apache/...
Date Mon, 07 Mar 2011 18:47:01 GMT
Author: djencks
Date: Mon Mar  7 18:47:00 2011
New Revision: 1078888

URL: http://svn.apache.org/viewvc?rev=1078888&view=rev
Log:
Configure InfoBuilder using configadmin, make it a service, more cleanup

Added:
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilder.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilderImpl.java
      - copied, changed from r1078407, geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilder.java
Removed:
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/MockRARDeployable.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/RAR_1_0DConfigBeanTest.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/RAR_1_5DConfigBeanTest.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/SchemaConversionTest.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/jsr88/
Modified:
    geronimo/sandbox/djencks/txmanager/connector-itests/pom.xml
    geronimo/sandbox/djencks/txmanager/connector-itests/src/test/java/org/apache/geronimo/components/connector/itests/DeployerTest.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/pom.xml
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/DeploymentExtender.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/InfoBuilderTest.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/PlanParsingTest.java
    geronimo/sandbox/djencks/txmanager/pom.xml

Modified: geronimo/sandbox/djencks/txmanager/connector-itests/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/connector-itests/pom.xml?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/connector-itests/pom.xml (original)
+++ geronimo/sandbox/djencks/txmanager/connector-itests/pom.xml Mon Mar  7 18:47:00 2011
@@ -27,6 +27,7 @@
     <name>connector-itests</name>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <geronimoVersion>3.0-SNAPSHOT</geronimoVersion>
     </properties>
     <dependencies>
         <dependency>
@@ -137,6 +138,11 @@
          </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-annotation_1.1_spec</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-activation_1.1_spec</artifactId>
             <scope>test</scope>
         </dependency>
@@ -174,6 +180,12 @@
             <scope>test</scope>
             <version>3.2</version>
         </dependency>
+        <!--<dependency>-->
+        <!--<groupId>org.apache.geronimo.modules</groupId>-->
+        <!--<artifactId>geronimo-j2ee-builder</artifactId>-->
+        <!--<version>${geronimoVersion}</version>-->
+            <!--<scope>test</scope>-->
+        <!--</dependency>-->
      </dependencies>
 
     <build>

Modified: geronimo/sandbox/djencks/txmanager/connector-itests/src/test/java/org/apache/geronimo/components/connector/itests/DeployerTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/connector-itests/src/test/java/org/apache/geronimo/components/connector/itests/DeployerTest.java?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/connector-itests/src/test/java/org/apache/geronimo/components/connector/itests/DeployerTest.java (original)
+++ geronimo/sandbox/djencks/txmanager/connector-itests/src/test/java/org/apache/geronimo/components/connector/itests/DeployerTest.java Mon Mar  7 18:47:00 2011
@@ -13,6 +13,7 @@ import javax.resource.spi.BootstrapConte
 import javax.resource.spi.ResourceAdapter;
 import org.apache.geronimo.connector.ConnectionManagerContainer;
 import org.apache.geronimo.connector.ConnectionTracker;
+import org.apache.geronimo.connector.deployment.InfoBuilder;
 import org.apache.geronimo.connector.extender.ConnectorExtender;
 import org.apache.geronimo.connector.mock.MockAdminObject;
 import org.apache.geronimo.connector.mock.MockAdminObjectImpl;
@@ -23,6 +24,7 @@ import org.apache.geronimo.connector.mod
 import org.apache.geronimo.connector.model.ManagedConnectionFactoryInfo;
 import org.apache.geronimo.connector.model.ResourceAdapterInfo;
 import org.apache.geronimo.connector.model.ResourceAdapterModuleInfo;
+import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
 import org.apache.geronimo.transaction.RecoverableTransactionManager;
 import org.junit.Assert;
 import org.junit.Test;
@@ -33,7 +35,9 @@ import org.ops4j.pax.exam.Inject;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.component.ComponentFactory;
@@ -79,12 +83,14 @@ public class DeployerTest {
                 mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec").startLevel(1),
                 mavenBundle("org.apache.geronimo.specs", "geronimo-j2ee-connector_1.6_spec").startLevel(1),
                 mavenBundle("org.apache.geronimo.specs", "geronimo-validation_1.0_spec").startLevel(1),
+                mavenBundle("org.apache.geronimo.specs", "geronimo-annotation_1.1_spec").startLevel(1),
                 mavenBundle("org.apache.geronimo.specs", "geronimo-activation_1.1_spec").startLevel(1),
                 mavenBundle("org.apache.geronimo.specs", "geronimo-jaxb_2.2_spec").startLevel(1),
                 mavenBundle("org.apache.geronimo.specs", "geronimo-stax-api_1.2_spec").startLevel(1),
                 mavenBundle("org.apache.geronimo.bundles", "woodstox").startLevel(1),
                 mavenBundle("org.apache.geronimo.bundles", "jaxb-impl").startLevel(2),
                 mavenBundle("org.apache.geronimo.framework", "geronimo-common").startLevel(2),
+//                mavenBundle("org.apache.geronimo.modules", "geronimo-j2ee-builder").startLevel(2),
                 mavenBundle("org.apache.openejb", "openejb-jee").startLevel(2),
                 mavenBundle("asm", "asm-all").startLevel(2),
                 mavenBundle("org.apache.xbean", "xbean-finder").startLevel(2),
@@ -121,6 +127,21 @@ public class DeployerTest {
 
     @Test
     public void testServicesStart() throws Exception {
+        Bundle bundle = bundleContext.getBundle();
+        long id = bundle.getBundleId();
+        for (long l = 0; l <= id; l++) {
+
+            Bundle b = bundleContext.getBundle(l);
+            System.out.println("Bundle: " + b);
+            System.out.println("state: " + b.getState());
+            System.out.println("location: " + b.getLocation());
+            try {
+                b.start();
+            } catch (BundleException e) {
+                System.out.println(e.getMessage());
+            }
+        }
+
         //TODO figure out how to wait for services to start
         Thread.sleep(5000);
         Assert.assertNotNull(bundleContext.getServiceReference(RecoverableTransactionManager.class.getName()));
@@ -130,6 +151,8 @@ public class DeployerTest {
         //connectionmanager factory component
         Assert.assertNotNull(bundleContext.getServiceReference(ComponentFactory.class.getName()));
 
+        Assert.assertNotNull(bundleContext.getServiceReference(InfoBuilder.class.getName()));
+//        Assert.assertNotNull(bundleContext.getServiceReference(ModuleBuilder.class.getName()));
 
         Thread.sleep(5000);
         //mock connector services

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/pom.xml?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/pom.xml (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/pom.xml Mon Mar  7 18:47:00 2011
@@ -32,6 +32,10 @@
     <packaging>bundle</packaging>
     <name>Geronimo Plugins, Connector 1.6 :: Builder</name>
 
+    <properties>
+        <geronimoVersion>3.0-SNAPSHOT</geronimoVersion>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.components</groupId>
@@ -46,34 +50,34 @@
         <dependency>
         <groupId>org.apache.geronimo.modules</groupId>
         <artifactId>geronimo-naming-builder</artifactId>
-        <version>3.0-SNAPSHOT</version>
+        <version>${geronimoVersion}</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.framework</groupId>
             <artifactId>geronimo-common</artifactId>
-            <version>3.0-SNAPSHOT</version>
+            <version>${geronimoVersion}</version>
+        </dependency>
+        <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-management</artifactId>
+        <version>${geronimoVersion}</version>
         </dependency>
-        <!--<dependency>-->
-        <!--<groupId>org.apache.geronimo.framework</groupId>-->
-        <!--<artifactId>geronimo-management</artifactId>-->
-        <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.geronimo.framework</groupId>
             <artifactId>geronimo-naming</artifactId>
-            <version>3.0-SNAPSHOT</version>
+            <version>${geronimoVersion}</version>
         </dependency>
         <!--<dependency>-->
         <!--<groupId>org.apache.geronimo.framework</groupId>-->
         <!--<artifactId>geronimo-service-builder</artifactId>-->
         <!--<version>${project.version}</version>-->
         <!--</dependency>-->
-        <!--<dependency>-->
-        <!--<groupId>org.apache.geronimo.framework</groupId>-->
-        <!--<artifactId>geronimo-system</artifactId>-->
-        <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
+        <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-system</artifactId>
+        <version>${geronimoVersion}</version>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.openejb</groupId>
@@ -84,12 +88,12 @@
         <dependency>
         <groupId>org.apache.geronimo.modules</groupId>
         <artifactId>geronimo-j2ee</artifactId>
-        <version>3.0-SNAPSHOT</version>
+        <version>${geronimoVersion}</version>
         </dependency>
         <dependency>
         <groupId>org.apache.geronimo.modules</groupId>
         <artifactId>geronimo-j2ee-builder</artifactId>
-        <version>3.0-SNAPSHOT</version>
+        <version>${geronimoVersion}</version>
         </dependency>
         <!--<dependency>-->
         <!--<groupId>org.apache.geronimo.modules</groupId>-->
@@ -108,13 +112,13 @@
         <!--<scope>test</scope>-->
         <!--</dependency>-->
 
-        <!--<dependency>-->
-        <!--<groupId>org.apache.geronimo.framework</groupId>-->
-        <!--<artifactId>geronimo-kernel</artifactId>-->
-        <!--<version>${project.version}</version>-->
-        <!--<classifier>tests</classifier>-->
-        <!--<scope>test</scope>-->
-        <!--</dependency>-->
+        <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-kernel</artifactId>
+        <version>${geronimoVersion}</version>
+        <classifier>tests</classifier>
+        <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jms_1.1_spec</artifactId>
@@ -151,7 +155,7 @@
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-simple</artifactId>
-            <scope>test</scope>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>
@@ -207,7 +211,6 @@
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jta_1.1_spec</artifactId>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.ops4j.pax.swissbox</groupId>
@@ -242,11 +245,55 @@
                     </execution>
                 </executions>
             </plugin>
+            <!--
+                 geronimo-property-plugin sets bootClassPath property
+                 which is used by maven-compiler-plugin and
+                 maven-surefire-plugin.
+            -->
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>geronimo-property-plugin</artifactId>
+                <version>${geronimoVersion}</version>
+                <extensions>true</extensions>
+                <executions>
+                    <execution>
+                        <id>set-property</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>set-property</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <propertyName>bootClassPath</propertyName>
+                    <propertyValuePrefix>-Xbootclasspath/p:</propertyValuePrefix>
+                    <classpath>
+                        <dependency>
+                            <groupId>org.apache.geronimo.specs</groupId>
+                            <artifactId>geronimo-annotation_1.1_spec</artifactId>
+                            <version>1.0.1</version>
+                        </dependency>
+                        <dependency>
+                            <groupId>org.apache.geronimo.specs</groupId>
+                            <artifactId>geronimo-jaxws_2.2_spec</artifactId>
+                            <version>1.0</version>
+                        </dependency>
+                    </classpath>
+                </configuration>
+            </plugin>
+            <!--<plugin>-->
+                <!--<groupId>org.apache.maven.plugins</groupId>-->
+                <!--<artifactId>maven-compiler-plugin</artifactId>-->
+                <!--<configuration>-->
+                    <!--<compilerArgument>${bootClassPath}</compilerArgument>-->
+                <!--</configuration>-->
+            <!--</plugin>-->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>2.3.2</version>
                 <configuration>
+                    <compilerArgument>${bootClassPath}</compilerArgument>
                     <includes>
                         <include>org/apache/geronimo/connector/deployment/plan/*</include>
                         <include>org/apache/geronimo/connector/deployment/*.java</include>
@@ -255,17 +302,18 @@
                         <!--<include>org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java</include>-->
                     </includes>
                     <excludes>
-                        <exclude>org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java</exclude>
+                        <!--<exclude>org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java</exclude>-->
                         <exclude>org/apache/geronimo/connector/deployment/RARConfiguration.java</exclude>
                         <exclude>org/apache/geronimo/connector/deployment/RARConfigurer.java</exclude>
-                        <exclude>org/apache/geronimo/connector/deployment/ResourceRefBuilder.java</exclude>
+                        <!--<exclude>org/apache/geronimo/connector/deployment/ResourceRefBuilder.java</exclude>-->
                     </excludes>
                     <testIncludes>
-                        <include>org/apache/geronimo/connector/deployment/InfoBuilderTest.java</include>
+                        <!--<include>org/apache/geronimo/connector/deployment/InfoBuilderTest.java</include>-->
                     </testIncludes>
-                    <!--<testExcludes>-->
-                        <!--<exclude>*</exclude>-->
-                    <!--</testExcludes>-->
+                    <testExcludes>
+                        <exclude>org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java</exclude>
+                        <exclude>org/apache/geronimo/connector/deployment/annotation/AnnotationHelperTest.java</exclude>
+                    </testExcludes>
                 </configuration>
             </plugin>
             <plugin>
@@ -275,19 +323,20 @@
                     <instructions>
                         <!--packages containing "impl" or "internal" are excluded by default -->
                         <Import-Package>
+                            !org.apache.xmlbeans.*,
                             org.apache.geronimo.deployment.*;resolution:=optional,
                             org.apache.geronimo.gbean.*;resolution:=optional,
                             org.apache.geronimo.j2ee.*;resolution:=optional,
                             org.apache.geronimo.kernel.*;resolution:=optional,
+                            org.apache.geronimo.naming.*;resolution:=optional,
+                            org.apache.geronimo.xbeans.*;resolution:=optional,
                             *
                         </Import-Package>
                         <Export-Package>
                             org.apache.geronimo.connector.deployment,
-                            org.apache.geronimo.connector.deployment.dconfigbean,
-                            org.apache.geronimo.connector.deployment.jsr88,
                             org.apache.geronimo.datasource.deployment,
                         </Export-Package>
-                        <DynamicImport-Package>schemaorg_apache_xmlbeans.*,
+                        <DynamicImport-Package>
                             org.omg.CORBA
                         </DynamicImport-Package>
                         <!--<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>-->
@@ -342,12 +391,8 @@
 
                     <excludes>
                         <exclude>**/Abstract*.java</exclude>
+                        <exclude>**/MessageDestinationTest.java</exclude>
 
-                        <!--
-                        FIXME: This test was disabled because it is failing in non-obvious ways
-                               and requires someone with more insight to resolve
-                        -->
-                        <exclude>**/Connector15DCBTest.java</exclude>
                     </excludes>
                 </configuration>
             </plugin>

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java Mon Mar  7 18:47:00 2011
@@ -26,13 +26,13 @@ import java.net.URI;
 import java.net.URL;
 import java.util.Collection;
 import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 
 import javax.xml.bind.JAXBException;
 import javax.xml.stream.XMLStreamException;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.connector.deployment.plan.ArtifactType;
 import org.apache.geronimo.connector.deployment.plan.ConnectorType;
@@ -40,17 +40,11 @@ import org.apache.geronimo.connector.dep
 import org.apache.geronimo.connector.deployment.plan.JaxbUtil;
 import org.apache.geronimo.connector.model.ResourceAdapterModuleInfo;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.gbean.annotation.ParamAttribute;
-import org.apache.geronimo.gbean.annotation.ParamReference;
-import org.apache.geronimo.gbean.annotation.ParamSpecial;
-import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
 import org.apache.geronimo.j2ee.deployment.ConnectorModule;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
-import org.apache.geronimo.j2ee.deployment.ModuleBuilderExtension;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
@@ -66,8 +60,6 @@ import org.apache.openejb.jee.JaxbJavaee
 import org.apache.openejb.jee.MessageListener;
 import org.apache.xbean.finder.BundleAnnotationFinder;
 import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
 import org.osgi.service.packageadmin.PackageAdmin;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -83,53 +75,32 @@ public class ConnectorModuleBuilder impl
     //Also in ConnectorExtender
     public final static URI PLAN_LOCATION = URI.create("OSGI-INF/connector/plan.ser");
 
-    //    static final String GERCONNECTOR_NAMESPACE = CONNECTOR_QNAME.getNamespaceURI();
-    private static final Map<String, String> NAMESPACE_UPDATES = new HashMap<String, String>();
     public static final String OSGI_JNDI_SERVICE_NAME = "osgi.jndi.service.name";
 
-    static {
-        NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/j2ee/connector", "http://geronimo.apache.org/xml/ns/j2ee/connector-1.2");
-        NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/j2ee/connector-1.1", "http://geronimo.apache.org/xml/ns/j2ee/connector-1.2");
-//        NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/j2ee/connector-1.2", "http://geronimo.apache.org/xml/ns/j2ee/connector-1.3");
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    private InfoBuilder infoBuilder;
+
+    @Reference(cardinality = ReferenceCardinality.OPTIONAL_UNARY)
+    private PackageAdmin packageAdmin;
+
+    public void bindInfoBuilder(InfoBuilder infoBuilder) {
+        this.infoBuilder = infoBuilder;
     }
 
+    public void unbindeInfoBuilder(InfoBuilder infoBuilder) {
+        if (infoBuilder == this.infoBuilder) {
+            this.infoBuilder = null;
+        }
+    }
 
-    private final int defaultMaxSize;
-    private final int defaultMinSize;
-    private final int defaultBlockingTimeoutMilliseconds;
-    private final int defaultIdleTimeoutMinutes;
-    private final boolean defaultXATransactionCaching;
-    private final boolean defaultXAThreadCaching;
-    private final Environment defaultEnvironment;
-    private final String defaultWorkManagerName;
-
-    private final PackageAdmin packageAdmin;
-//    private final Collection<ModuleBuilderExtension> moduleBuilderExtensions;
-
-    public ConnectorModuleBuilder(@ParamAttribute(name = "defaultEnvironment") Environment defaultEnvironment,
-                                  @ParamAttribute(name = "defaultMaxSize") int defaultMaxSize,
-                                  @ParamAttribute(name = "defaultMinSize") int defaultMinSize,
-                                  @ParamAttribute(name = "defaultBlockingTimeoutMilliseconds") int defaultBlockingTimeoutMilliseconds,
-                                  @ParamAttribute(name = "defaultIdleTimeoutMinutes") int defaultIdleTimeoutMinutes,
-                                  @ParamAttribute(name = "defaultXATransactionCaching") boolean defaultXATransactionCaching,
-                                  @ParamAttribute(name = "defaultXAThreadCaching") boolean defaultXAThreadCaching,
-                                  @ParamAttribute(name = "defaultWorkManagerName") String defaultWorkManagerName,
-                                  @ParamReference(name = "ServiceBuilders", namingType = NameFactory.MODULE_BUILDER) Collection<NamespaceDrivenBuilder> serviceBuilders,
-                                  @ParamReference(name = "ModuleBuilderExtensions", namingType = NameFactory.MODULE_BUILDER) Collection<ModuleBuilderExtension> moduleBuilderExtensions,
-                                  @ParamSpecial(type = SpecialAttributeType.bundleContext) BundleContext bundleContext) {
-        this.defaultEnvironment = defaultEnvironment;
-
-        this.defaultMaxSize = defaultMaxSize;
-        this.defaultMinSize = defaultMinSize;
-        this.defaultBlockingTimeoutMilliseconds = defaultBlockingTimeoutMilliseconds;
-        this.defaultIdleTimeoutMinutes = defaultIdleTimeoutMinutes;
-        this.defaultXATransactionCaching = defaultXATransactionCaching;
-        this.defaultXAThreadCaching = defaultXAThreadCaching;
-        this.defaultWorkManagerName = defaultWorkManagerName;
-//        this.moduleBuilderExtensions = moduleBuilderExtensions == null ? new ArrayList<ModuleBuilderExtension>() : moduleBuilderExtensions;
-//        this.serviceBuilders = new NamespaceDrivenBuilderCollection(serviceBuilders);
-        ServiceReference sr = bundleContext.getServiceReference(PackageAdmin.class.getName());
-        packageAdmin = (PackageAdmin) bundleContext.getService(sr);
+    public void bindPackageAdmin(PackageAdmin packageAdmin) {
+        this.packageAdmin = packageAdmin;
+    }
+
+    public void unbindPackageAdmin(PackageAdmin packageAdmin) {
+        if (packageAdmin == this.packageAdmin) {
+            this.packageAdmin = null;
+        }
     }
 
     @Override
@@ -442,7 +413,7 @@ public class ConnectorModuleBuilder impl
         ConnectorType geronimoConnector = (ConnectorType) module.getVendorDD();
 
         try {
-            ResourceAdapterModuleInfo info = new InfoBuilder().configureConnector(connector, geronimoConnector, bundle);
+            ResourceAdapterModuleInfo info = infoBuilder.configureConnector(connector, geronimoConnector, bundle);
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             ObjectOutputStream out = new ObjectOutputStream(baos);
             out.writeObject(info);

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/DeploymentExtender.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/DeploymentExtender.java?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/DeploymentExtender.java (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/DeploymentExtender.java Mon Mar  7 18:47:00 2011
@@ -20,13 +20,10 @@
 
 package org.apache.geronimo.connector.deployment;
 
-import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -41,9 +38,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.connector.deployment.plan.ConnectorType;
 import org.apache.geronimo.connector.deployment.plan.JaxbUtil;
-import org.apache.geronimo.connector.extender.Container;
 import org.apache.geronimo.connector.model.ResourceAdapterModuleInfo;
-import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.openejb.jee.Connector;
 import org.apache.openejb.jee.Connector10;
 import org.apache.openejb.jee.JaxbJavaee;
@@ -51,7 +46,6 @@ import org.apache.xbean.finder.BundleAnn
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
-import org.osgi.framework.Constants;
 import org.osgi.service.packageadmin.PackageAdmin;
 import org.osgi.util.tracker.BundleTracker;
 import org.osgi.util.tracker.BundleTrackerCustomizer;
@@ -68,8 +62,31 @@ public class DeploymentExtender {
 
     public final static String PLAN_LOCATION = "OSGI-INF/connector/plan.ser";
 
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    private InfoBuilder infoBuilder;
+
     @Reference(cardinality = ReferenceCardinality.OPTIONAL_UNARY)
-    private volatile PackageAdmin packageAdmin;
+    private PackageAdmin packageAdmin;
+
+    public void bindInfoBuilder(InfoBuilder infoBuilder) {
+        this.infoBuilder = infoBuilder;
+    }
+
+    public void unbindeInfoBuilder(InfoBuilder infoBuilder) {
+        if (infoBuilder == this.infoBuilder) {
+            this.infoBuilder = null;
+        }
+    }
+
+    public void bindPackageAdmin(PackageAdmin packageAdmin) {
+        this.packageAdmin = packageAdmin;
+    }
+
+    public void unbindPackageAdmin(PackageAdmin packageAdmin) {
+        if (this.packageAdmin == packageAdmin) {
+            this.packageAdmin = null;
+        }
+    }
 
     private BundleTracker bt;
 
@@ -189,7 +206,7 @@ public class DeploymentExtender {
             try {
                 planFile.getParentFile().mkdirs();
 //                planFile.createNewFile();
-                ResourceAdapterModuleInfo info = new InfoBuilder().configureConnector(connector, connectorType, bundle);
+                ResourceAdapterModuleInfo info = infoBuilder.configureConnector(connector, connectorType, bundle);
                 FileOutputStream baos = new FileOutputStream(planFile);
                 ObjectOutputStream out = new ObjectOutputStream(baos);
                 out.writeObject(info);
@@ -203,13 +220,4 @@ public class DeploymentExtender {
         }
     }
 
-    public void bindPackageAdmin(PackageAdmin packageAdmin) {
-        this.packageAdmin = packageAdmin;
-    }
-    public void unbindPackageAdmin(PackageAdmin packageAdmin) {
-        if (this.packageAdmin == packageAdmin) {
-            this.packageAdmin = null;
-        }
-    }
-
 }

Added: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilder.java?rev=1078888&view=auto
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilder.java (added)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilder.java Mon Mar  7 18:47:00 2011
@@ -0,0 +1,34 @@
+/*
+ * 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;
+
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.connector.deployment.plan.ConnectorType;
+import org.apache.geronimo.connector.model.ResourceAdapterModuleInfo;
+import org.apache.openejb.jee.Connector;
+import org.osgi.framework.Bundle;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public interface InfoBuilder {
+    ResourceAdapterModuleInfo configureConnector(Connector connector, ConnectorType geronimoConnector, Bundle bundle) throws DeploymentException;
+}

Copied: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilderImpl.java (from r1078407, geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilder.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilderImpl.java?p2=geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilderImpl.java&p1=geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilder.java&r1=1078407&r2=1078888&rev=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilder.java (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/InfoBuilderImpl.java Mon Mar  7 18:47:00 2011
@@ -32,6 +32,10 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.common.propertyeditor.PropertyEditors;
 import org.apache.geronimo.connector.deployment.plan.AdminobjectInstanceType;
@@ -55,15 +59,18 @@ import org.apache.openejb.jee.Connection
 import org.apache.openejb.jee.Connector;
 import org.apache.openejb.jee.OutboundResourceAdapter;
 import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev:$ $Date:$
  */
-public class InfoBuilder {
+@Component(metatype = true)
+@Service
+public class InfoBuilderImpl implements InfoBuilder {
 
-    private static final Logger log = LoggerFactory.getLogger(InfoBuilder.class);
+    private static final Logger log = LoggerFactory.getLogger(InfoBuilderImpl.class);
     private static final Map<String, Class> TYPE_LOOKUP = new HashMap<String, Class>();
 
     static {
@@ -86,14 +93,61 @@ public class InfoBuilder {
         TYPE_LOOKUP.put(String.class.getName(), String.class);
     }
 
+    @Property(value = "(service.ranking>=0)")
+    public static final String DEFAULT_WORK_MANAGER_TARGET = "defaultWorkManagerTarget";
     private String defaultWorkManagerTarget = "(service.ranking>=0)";
+
+    @Property(boolValue = true)
+    public static final String DEFAULT_XA_TRANSACTION_CACHING = "defaultXATransactionCaching";
     private boolean defaultXATransactionCaching = true;
+
+    @Property(boolValue = false)
+    public static final String DEFAULT_XA_THREAD_CACHING = "defaultXAThreadCaching";
     private boolean defaultXAThreadCaching = false;
+
+    @Property(intValue = 10)
+    public static final String DEFAULT_MAX_SINZE = "defaultMaxSize";
     private int defaultMaxSize = 10;
+
+    @Property(intValue = 0)
+    public static final String DEFAULT_MIN_SIZE = "defaultMinSize";
     private int defaultMinSize = 0;
+
+    @Property(intValue = 5000)
+    public static final String DEFAULT_BLOCKING_TIMEOUT_MILLISECONDS = "defaultBlockingTimeoutMilliseconds";
     private int defaultBlockingTimeoutMilliseconds = 5000;
+
+    @Property(intValue = 5)
+    public static final String DEFAULT_IDLE_TIMEOUT_MINUTES = "defaultIdleTimeoutMinutes";
     private int defaultIdleTimeoutMinutes = 5;
 
+    @Activate
+    void activate(BundleContext bundleContext, Map properties) {
+        if (properties.containsKey(DEFAULT_WORK_MANAGER_TARGET)) {
+            defaultWorkManagerTarget = (String) properties.get(DEFAULT_WORK_MANAGER_TARGET);
+        }
+        if (properties.containsKey(DEFAULT_XA_TRANSACTION_CACHING)) {
+            defaultXATransactionCaching = (Boolean)properties.get(DEFAULT_XA_TRANSACTION_CACHING);
+        }
+        if (properties.containsKey(DEFAULT_XA_THREAD_CACHING)) {
+            defaultXAThreadCaching = (Boolean)properties.get(DEFAULT_XA_THREAD_CACHING);
+        }
+        if (properties.containsKey(DEFAULT_MAX_SINZE)) {
+            defaultMaxSize = (Integer)properties.get(DEFAULT_MAX_SINZE);
+        }
+        if (properties.containsKey(DEFAULT_MIN_SIZE)) {
+            defaultMinSize = (Integer)properties.get(DEFAULT_MIN_SIZE);
+        }
+        if (properties.containsKey(DEFAULT_BLOCKING_TIMEOUT_MILLISECONDS)) {
+            defaultBlockingTimeoutMilliseconds = (Integer)properties.get(DEFAULT_BLOCKING_TIMEOUT_MILLISECONDS);
+        }
+        if (properties.containsKey(DEFAULT_IDLE_TIMEOUT_MINUTES)) {
+            defaultIdleTimeoutMinutes = (Integer)properties.get(DEFAULT_IDLE_TIMEOUT_MINUTES);
+        }
+    }
+
+
+    @Override
     public ResourceAdapterModuleInfo configureConnector(Connector connector, ConnectorType geronimoConnector, Bundle bundle) throws DeploymentException {
 
         //TODO set filters for workmanager and tx manager
@@ -182,6 +236,7 @@ public class InfoBuilder {
             for (AdminobjectInstanceType instance : typeInstance.getAdminobjectInstance()) {
                 AdminObjectInfo info = new AdminObjectInfo();
                 info.name = instance.getMessageDestinationName();
+                info.serviceProperties.put(ConnectorModuleBuilder.OSGI_JNDI_SERVICE_NAME, instance.getMessageDestinationName());
                 info.adminObjectInterface = adminObjectType.getAdminObjectInterface();
                 info.adminObjectClass = adminObjectType.getAdminObjectClass();
                 setConfigProperties(info.configProperties, info.adminObjectClass, adminObjectType.getConfigProperty(), instance.getConfigPropertySetting(), bundle);
@@ -496,6 +551,7 @@ public class InfoBuilder {
 //        }
 
         mcfInfo.name = connectiondefinitionInstance.getName();
+        mcfInfo.serviceProperties.put(ConnectorModuleBuilder.OSGI_JNDI_SERVICE_NAME, connectiondefinitionInstance.getName());
         // ConnectionManager
         configureConnectionManager(mcfInfo, transactionSupport, connectiondefinitionInstance, connectionTrackerName, transactionManagerName);
 

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/datasource/deployment/DataSourceBuilder.java Mon Mar  7 18:47:00 2011
@@ -28,8 +28,6 @@ import javax.annotation.sql.DataSourceDe
 import javax.annotation.sql.DataSourceDefinitions;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.connector.deployment.ConnectorModuleBuilder;
-import org.apache.geronimo.datasource.DataSourceDescription;
-import org.apache.geronimo.datasource.DataSourceGBean;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.annotation.GBean;

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java Mon Mar  7 18:47:00 2011
@@ -91,7 +91,7 @@ import org.osgi.service.packageadmin.Req
 /**
  * @version $Rev:385232 $ $Date$
  */
-public class ConnectorModuleBuilderTest extends TestSupport {
+public class ConnectorModuleBuilderTest {
 
     private boolean defaultXATransactionCaching = true;
     private boolean defaultXAThreadCaching = false;

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/InfoBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/InfoBuilderTest.java?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/InfoBuilderTest.java (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/InfoBuilderTest.java Mon Mar  7 18:47:00 2011
@@ -35,7 +35,6 @@ import org.apache.openejb.jee.JaxbJavaee
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.CoreOptions;
-import org.ops4j.pax.exam.Customizer;
 import org.ops4j.pax.exam.Inject;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
@@ -43,15 +42,12 @@ import org.ops4j.pax.exam.options.MavenA
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
 
-import static org.ops4j.pax.exam.CoreOptions.equinox;
 import static org.ops4j.pax.exam.CoreOptions.felix;
 import static org.ops4j.pax.exam.CoreOptions.options;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
 import static org.junit.Assert.*;
-import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.*;
 
 /**
  * @version $Rev:$ $Date:$
@@ -154,7 +150,7 @@ public class InfoBuilderTest {
             planIn.close();
         }
 
-        InfoBuilder infoBuilder = new InfoBuilder();
+        InfoBuilder infoBuilder = new InfoBuilderImpl();
         ResourceAdapterModuleInfo info = infoBuilder.configureConnector(connector, connectorType, bundle);
         assertEquals(1, info.resourceAdapterInfos.size());
         ResourceAdapterInfo raInfo = info.resourceAdapterInfos.get(0);

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/MessageDestinationTest.java Mon Mar  7 18:47:00 2011
@@ -23,9 +23,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.connector.wrapper.AdminObjectWrapperGBean;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.j2ee.deployment.ConnectorModule;
@@ -52,11 +50,12 @@ import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.osgi.framework.BundleContext;
+import static org.junit.Assert.*;
 
 /**
  * @version $Rev:390932 $ $Date$
  */
-public class MessageDestinationTest extends TestCase {
+public class MessageDestinationTest {
 
     private final ClassLoader classLoader = getClass().getClassLoader();
 
@@ -73,7 +72,6 @@ public class MessageDestinationTest exte
     Map componentContext = new HashMap();
 
     protected void setUp() throws Exception {
-        super.setUp();
         Artifact artifact = new Artifact("foo", "bar", "1.0", "car");
         Map<String, Artifact> locations = new HashMap<String, Artifact>();
         locations.put(null, artifact);
@@ -102,7 +100,6 @@ public class MessageDestinationTest exte
 
     protected void tearDown() throws Exception {
         configStore.cleanup(); 
-        super.tearDown();
     }
 
     private static final String SPECDD1 = "<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\">" +
@@ -139,8 +136,8 @@ public class MessageDestinationTest exte
         adminObjectRefBuilder.initContext(specDD, plan, module);
         AbstractName n1 = naming.createChildName(baseName, "l1", NameFactory.JCA_ADMIN_OBJECT);
         AbstractName n2 = naming.createChildName(baseName, "l2", NameFactory.JCA_ADMIN_OBJECT);
-        configuration.addGBean(new GBeanData(n1, AdminObjectWrapperGBean.class));
-        configuration.addGBean(new GBeanData(n2, AdminObjectWrapperGBean.class));
+//        configuration.addGBean(new GBeanData(n1, AdminObjectWrapperGBean.class));
+//        configuration.addGBean(new GBeanData(n2, AdminObjectWrapperGBean.class));
         adminObjectRefBuilder.buildNaming(specDD, plan, module, componentContext);
         assertTrue(module.getJndiScope(JndiScope.comp).containsKey("comp/env/n1"));
         assertTrue(module.getJndiScope(JndiScope.comp).containsKey("comp/env/n2"));
@@ -164,8 +161,8 @@ public class MessageDestinationTest exte
         adminObjectRefBuilder.initContext(specDD, plan, module);
         AbstractName n1 = naming.createChildName(baseName, "l1", NameFactory.JCA_ADMIN_OBJECT);
         AbstractName n2 = naming.createChildName(baseName, "l2", NameFactory.JCA_ADMIN_OBJECT);
-        configuration.addGBean(new GBeanData(n1, AdminObjectWrapperGBean.class));
-        configuration.addGBean(new GBeanData(n2, AdminObjectWrapperGBean.class));
+//        configuration.addGBean(new GBeanData(n1, AdminObjectWrapperGBean.class));
+//        configuration.addGBean(new GBeanData(n2, AdminObjectWrapperGBean.class));
         adminObjectRefBuilder.buildNaming(specDD, plan, module, componentContext);
         assertTrue(module.getJndiScope(JndiScope.comp).containsKey("comp/env/n1"));
         assertTrue(module.getJndiScope(JndiScope.comp).containsKey("comp/env/n2"));

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/PlanParsingTest.java?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/PlanParsingTest.java (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/PlanParsingTest.java Mon Mar  7 18:47:00 2011
@@ -16,31 +16,27 @@
  */
 package org.apache.geronimo.connector.deployment;
 
+import java.io.InputStream;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
 
-import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
-import org.apache.geronimo.schema.SchemaConversionUtils;
-import org.apache.geronimo.testsupport.TestSupport;
-import org.apache.geronimo.xbeans.connector.GerConnectorDocument;
-import org.apache.geronimo.xbeans.connector.GerConnectorType;
-import org.apache.xmlbeans.XmlException;
-import org.apache.xmlbeans.XmlObject;
+import org.apache.geronimo.connector.deployment.plan.ConnectorType;
+import org.apache.geronimo.connector.deployment.plan.JaxbUtil;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
 
 /**
  */
-public class PlanParsingTest extends TestSupport {
-    private final static QName CONNECTOR_QNAME = GerConnectorDocument.type.getDocumentElementName();
+public class PlanParsingTest {
     private ClassLoader classLoader = this.getClass().getClassLoader();
 
+    @Test
     public void testLoadGeronimoDeploymentDescriptor10() throws Exception {
-        URL srcXml = classLoader.getResource("connector_1_0/geronimo-ra.xml");
-        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
-        GerConnectorDocument connectorDocument = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
-        GerConnectorType connector = (GerConnectorType) SchemaConversionUtils.fixGeronimoSchema(connectorDocument, CONNECTOR_QNAME, GerConnectorType.type);
-        XmlBeansUtil.validateDD(connector);
-        assertEquals(1, connectorDocument.getConnector().getResourceadapterArray().length);
+        InputStream in = classLoader.getResourceAsStream("connector_1_0/geronimo-ra.xml");
+        ConnectorType connector = JaxbUtil.unmarshal(in, false);
+        assertEquals(1, connector.getResourceadapter().size());
     }
     //TODO move to openejb-jee
 //    public void testLoadJavaEEDeploymentDescriptor() throws Exception {
@@ -51,55 +47,42 @@ public class PlanParsingTest extends Tes
 //        XmlBeansUtil.validateDD(connectorDocument);
 //    }
 
+    @Test
     public void testLoadGeronimoDeploymentDescriptor15() throws Exception {
-        URL srcXml = classLoader.getResource("src/test/resources/deployertest/geronimo-ra.xml");
-        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
-        GerConnectorDocument connectorDocument = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
-        GerConnectorType connector = (GerConnectorType) SchemaConversionUtils.fixGeronimoSchema(connectorDocument, CONNECTOR_QNAME, GerConnectorType.type);
-        assertEquals(1, connector.getResourceadapterArray().length);
+        InputStream in = classLoader.getResourceAsStream("connector_1_5/geronimo-ra.xml");
+        ConnectorType connector = JaxbUtil.unmarshal(in, false);
+        assertEquals(1, connector.getResourceadapter().size());
     }
 
+//    @Test
     public void testResourceAdapterNameUniqueness() throws Exception {
-        URL srcXml = classLoader.getResource("data/dup-resourceadapter-name.xml");
-        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
-        GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
-        if (doc == null) {
-            doc = (GerConnectorDocument) plan;
-        }
+        InputStream in = classLoader.getResourceAsStream("data/dup-resourceadapter-name.xml");
         try {
-            XmlBeansUtil.validateDD(doc);
+            ConnectorType connector = JaxbUtil.unmarshal(in, true);
             fail("dup resource adapter name is invalid");
-        } catch (XmlException e) {
+        } catch (Exception e) {
             //expected
         }
     }
 
+//    @Test
     public void testConnectionFactoryNameUniqueness() throws Exception {
-        URL srcXml = classLoader.getResource("data/dup-connectionfactoryinstance-name.xml");
-        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
-        GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
-        if (doc == null) {
-            doc = (GerConnectorDocument) plan;
-        }
+        InputStream in = classLoader.getResourceAsStream("data/dup-connectionfactoryinstance-name.xml");
         try {
-            XmlBeansUtil.validateDD(doc);
+            ConnectorType connector = JaxbUtil.unmarshal(in, true);
             fail("dup connection factory name is invalid");
-        } catch (XmlException e) {
+        } catch (Exception e) {
             //expected
         }
     }
 
+//    @Test
     public void testAdminObjectNameUniqueness() throws Exception {
-        URL srcXml = classLoader.getResource("data/dup-admin-object-name.xml");
-        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
-        GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
-        if (doc == null) {
-            doc = (GerConnectorDocument) plan;
-        }
+        InputStream in = classLoader.getResourceAsStream("data/dup-admin-object-name.xml");
         try {
-            XmlBeansUtil.validateDD(doc);
+            ConnectorType connector = JaxbUtil.unmarshal(in, true);
             fail("dup admin object name is invalid");
-        } catch (XmlException e) {
+        } catch (Exception e) {
             //expected
         }
     }

Modified: geronimo/sandbox/djencks/txmanager/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/pom.xml?rev=1078888&r1=1078887&r2=1078888&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/pom.xml (original)
+++ geronimo/sandbox/djencks/txmanager/pom.xml Mon Mar  7 18:47:00 2011
@@ -107,6 +107,12 @@
             </dependency>
 
             <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-annotation_1.1_spec</artifactId>
+                <version>1.0.1</version>
+            </dependency>
+
+            <dependency>
                 <groupId>org.objectweb.howl</groupId>
                 <artifactId>howl</artifactId>
                 <version>1.0.1-1</version>



Mime
View raw message