geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1078407 - in /geronimo/sandbox/djencks/txmanager: geronimo-connector-builder-1_6/src/main/java/org/apache/geronimo/connector/deployment/ geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ geronimo-connec...
Date Sun, 06 Mar 2011 07:12:47 GMT
Author: djencks
Date: Sun Mar  6 07:12:46 2011
New Revision: 1078407

URL: http://svn.apache.org/viewvc?rev=1078407&view=rev
Log:
fix a few small bugs.  rar bundle with plan now deploys

Added:
    geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/resources/connector_1_6/MANIFEST.MF
Modified:
    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/connector/deployment/InfoBuilder.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/script/copy-main.xml
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/extender/Container.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/InterceptorsImpl.java
    geronimo/sandbox/djencks/txmanager/geronimo-txmanager-server/pom.xml

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=1078407&r1=1078406&r2=1078407&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
Sun Mar  6 07:12:46 2011
@@ -187,6 +187,8 @@ public class DeploymentExtender {
             log.info("deploying rar bundle");
             File planFile = bundle.getBundleContext().getDataFile(PLAN_LOCATION);
             try {
+                planFile.getParentFile().mkdirs();
+//                planFile.createNewFile();
                 ResourceAdapterModuleInfo info = new InfoBuilder().configureConnector(connector,
connectorType, bundle);
                 FileOutputStream baos = new FileOutputStream(planFile);
                 ObjectOutputStream out = new ObjectOutputStream(baos);

Modified: 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=1078407&r1=1078406&r2=1078407&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/InfoBuilder.java
Sun Mar  6 07:12:46 2011
@@ -284,7 +284,9 @@ public class InfoBuilder {
             if (configPropertyTypes.get(name) == null || !configPropertyTypes.get(name).equals(type))
{
                 throw new DeploymentException("Wrong type, expected " + configPropertyTypes.get(name)
+ " actual " + type);
             }
-            configMap.put(name, getValue(type, configProperty.getConfigPropertyValue(), bundle));
+            if (configProperty.getConfigPropertyValue() != null) {
+                configMap.put(name, getValue(type, configProperty.getConfigPropertyValue(),
bundle));
+            }
         }
     }
 
@@ -303,7 +305,11 @@ public class InfoBuilder {
                 }
             }
 
-            configMap.put(name, getValue(type, configProperty.getValue().trim(), bundle));
+            if (configProperty.getValue() != null) {
+                configMap.put(name, getValue(type, configProperty.getValue(), bundle));
+            } else {
+                configMap.remove(name);
+            }
         }
         if (unknownNames.size() > 0) {
             StringBuffer buf = new StringBuffer("The plan is trying to set attributes: ").append(unknownNames).append("\n");

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=1078407&r1=1078406&r2=1078407&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
Sun Mar  6 07:12:46 2011
@@ -84,17 +84,17 @@ public class InfoBuilderTest {
                 mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
                 mavenBundle("org.apache.geronimo.specs", "geronimo-j2ee-connector_1.6_spec"),
                 mavenBundle("org.apache.geronimo.specs", "geronimo-validation_1.0_spec"),
-                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.specs", "geronimo-activation_1.1_spec"),
+                mavenBundle("org.apache.geronimo.specs", "geronimo-jaxb_2.2_spec"),
+                mavenBundle("org.apache.geronimo.specs", "geronimo-stax-api_1.2_spec"),
+                mavenBundle("org.apache.geronimo.bundles", "woodstox"),
+                mavenBundle("org.apache.geronimo.bundles", "jaxb-impl"),
                 mavenBundle("org.apache.geronimo.components", "geronimo-mock-ra"),
                 mavenBundle("org.apache.geronimo.framework", "geronimo-common"),
                 mavenBundle("org.apache.openejb", "openejb-jee"),
 
 
-                //org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
+                org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
 
 //                new Customizer() {
 //                    @Override
@@ -104,7 +104,7 @@ public class InfoBuilderTest {
 ////                                .add(ConnectorExtender.PLAN_LOCATION, new Hide().raInputStream()).build();
 //                    }
 //                },
-                equinox().version("3.5.0")
+                equinox()//.version("3.5.0")
         );
 //        options = updateOptions(options);
         return options;

Added: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/resources/connector_1_6/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/resources/connector_1_6/MANIFEST.MF?rev=1078407&view=auto
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/resources/connector_1_6/MANIFEST.MF
(added)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/resources/connector_1_6/MANIFEST.MF
Sun Mar  6 07:12:46 2011
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-Name: geronimo-mock-ra-rar
+Bundle-Vendor: The Apache Software Foundation
+Build-Jdk: 1.6.0_22
+Bundle-Version: 3.99.99.SNAPSHOT
+Bundle-ManifestVersion: 2
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Bundle-Description: Geronimo Transaction Manager
+Import-Package: javax.naming,javax.resource;version="[1.6,2)",javax.re
+ source.cci;version="[1.6,2)",javax.resource.spi;version="[1.6,2)",jav
+ ax.resource.spi.endpoint;version="[1.6,2)",javax.security.auth,javax.
+ transaction.xa,org.apache.geronimo.connector.mock;version="3.0"
+Bundle-SymbolicName: org.apache.geronimo.components.geronimo-mock-ra-r
+ ar
+

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/script/copy-main.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/script/copy-main.xml?rev=1078407&r1=1078406&r2=1078407&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/script/copy-main.xml
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector-builder-1_6/src/test/script/copy-main.xml
Sun Mar  6 07:12:46 2011
@@ -25,5 +25,12 @@
             <fileset dir="${basedir}/target/classes"/>
         </copy>
     </target>
-    
+
+    <!-- Build test-rar-16 -->
+    <mkdir dir="${basedir}/target/test-rar-16/META-INF"/>
+    <copy todir="${basedir}/target/test-rar-16/META-INF">
+        <fileset dir="${basedir}/src/test/resources/connector_1_6"/>
+    </copy>
+    <jar destfile="${basedir}/target/test-rar-16.rar" basedir="${basedir}/target/test-rar-16"
manifest="${basedir}/target/test-rar-16/META-INF/MANIFEST.MF"/>
+
 </project>

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/extender/Container.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/extender/Container.java?rev=1078407&r1=1078406&r2=1078407&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/extender/Container.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/extender/Container.java
Sun Mar  6 07:12:46 2011
@@ -36,6 +36,7 @@ import org.apache.geronimo.connector.out
 import org.osgi.framework.Bundle;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.component.ComponentFactory;
+import org.osgi.service.component.ComponentInstance;
 
 /**
  * @version $Rev:$ $Date:$
@@ -46,6 +47,7 @@ public class Container implements Assemb
     private final ResourceAdapterModuleInfo moduleInfo;
     private final ComponentFactory cmFactory;
     private final List<ServiceRegistration> serviceRegistrations = new ArrayList<ServiceRegistration>();
+    private final List<ComponentInstance> componentInstances = new ArrayList<ComponentInstance>();
 
 
     public Container(Bundle bundle, ResourceAdapterModuleInfo moduleInfo, ComponentFactory
cmFactory) {
@@ -70,6 +72,9 @@ public class Container implements Assemb
         for (ServiceRegistration sr: serviceRegistrations) {
             sr.unregister();
         }
+        for (ComponentInstance componentInstance: componentInstances) {
+            componentInstance.dispose();
+        }
     }
 
     @Override
@@ -90,7 +95,7 @@ public class Container implements Assemb
         properties.put(DSFactoryConnectionManager.INTERCEPTORS, interceptors);
         properties.put(DSFactoryConnectionManager.MCF, managedConnectionFactory);
         properties.put(DSFactoryConnectionManager.NAME, name);
-        cmFactory.newInstance(properties);
+        componentInstances.add(cmFactory.newInstance(properties));
     }
 
     private void registerService(String[] interfaceNames, Object service) {

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/InterceptorsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/InterceptorsImpl.java?rev=1078407&r1=1078406&r2=1078407&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/InterceptorsImpl.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/InterceptorsImpl.java
Sun Mar  6 07:12:46 2011
@@ -61,9 +61,9 @@ public class InterceptorsImpl implements
                             TransactionManager transactionManager,
                             ManagedConnectionFactory mcf, ClassLoader classLoader) {
         //check for consistency between attributes
-        if (subjectSource == null && pooling instanceof PartitionedPool &&
((PartitionedPool) pooling).isPartitionBySubject()) {
-            throw new IllegalStateException("To use Subject in pooling, you need a SecurityDomain");
-        }
+//        if (subjectSource == null && pooling instanceof PartitionedPool &&
((PartitionedPool) pooling).isPartitionBySubject()) {
+//            throw new IllegalStateException("To use Subject in pooling, you need a SecurityDomain");
+//        }
 
         if (mcf == null) {
             throw new NullPointerException("No ManagedConnectionFactory supplied for " +
name);

Modified: geronimo/sandbox/djencks/txmanager/geronimo-txmanager-server/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-txmanager-server/pom.xml?rev=1078407&r1=1078406&r2=1078407&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-txmanager-server/pom.xml (original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-txmanager-server/pom.xml Sun Mar  6 07:12:46
2011
@@ -29,7 +29,7 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.karaf.features.assembly</groupId>
+            <groupId>org.apache.karaf.assemblies.features</groupId>
             <artifactId>karaf-framework</artifactId>
             <version>${karafVersion}</version>
             <type>kar</type>



Mime
View raw message