geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1078418 - in /geronimo/sandbox/djencks/txmanager: ./ geronimo-connector-builder-1_6/src/test/java/org/apache/geronimo/connector/deployment/ geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/ geronimo-connector/src/ma...
Date Sun, 06 Mar 2011 08:07:42 GMT
Author: djencks
Date: Sun Mar  6 08:07:41 2011
New Revision: 1078418

URL: http://svn.apache.org/viewvc?rev=1078418&view=rev
Log:
introcude common info object superclass with service properties, use some newer snapshots
(not yet available) to import javax.xml.namespace without a version

Added:
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/BaseInfo.java
Modified:
    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/src/main/java/org/apache/geronimo/connector/assembler/AssemblyListener.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/impl/AssemblerImpl.java
    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/model/AdminObjectInfo.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ManagedConnectionFactoryInfo.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ResourceAdapterInfo.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/AssemblerTest.java
    geronimo/sandbox/djencks/txmanager/pom.xml

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=1078418&r1=1078417&r2=1078418&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 08:07:41 2011
@@ -35,6 +35,7 @@ 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;
@@ -48,6 +49,7 @@ import static org.ops4j.pax.exam.CoreOpt
 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:$
@@ -89,19 +91,18 @@ public class InfoBuilderTest {
                 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.openejb", "openejb-jee"),
                 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
 //                    public InputStream customizeTestProbe(InputStream testProbe) throws
Exception {
 //                        return modifyBundle(testProbe)
 //                                .build();
-////                                .add(ConnectorExtender.PLAN_LOCATION, new Hide().raInputStream()).build();
 //                    }
 //                },
                 equinox()//.version("3.5.0")

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/AssemblyListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/AssemblyListener.java?rev=1078418&r1=1078417&r2=1078418&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/AssemblyListener.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/AssemblyListener.java
Sun Mar  6 08:07:41 2011
@@ -20,10 +20,11 @@
 
 package org.apache.geronimo.connector.assembler;
 
+import java.util.Dictionary;
+
 import javax.resource.spi.ManagedConnectionFactory;
 import javax.resource.spi.ResourceAdapter;
 import org.apache.geronimo.connector.outbound.BaseConnectionManager;
-import org.apache.geronimo.connector.outbound.GenericConnectionManager;
 
 /**
  * notified when a new object is created so it can be bound appropriately.
@@ -31,10 +32,10 @@ import org.apache.geronimo.connector.out
  */
 public interface AssemblyListener {
 
-    void newResourceAdapter(String name, ResourceAdapter resourceAdapter);
+    void newResourceAdapter(String name, ResourceAdapter resourceAdapter, Dictionary<String,
Object> serviceProperties);
 
-    void newAdminObject(String name, String adminObjectInterface, Object adminObject);
+    void newAdminObject(String name, String adminObjectInterface, Object adminObject, Dictionary<String,
Object> serviceProperties);
 
-    void newManagedConnectionFactory(String name, ManagedConnectionFactory managedConnectionFactory,
BaseConnectionManager.Interceptors interceptors);
+    void newManagedConnectionFactory(String name, ManagedConnectionFactory managedConnectionFactory,
BaseConnectionManager.Interceptors interceptors, Dictionary<String, Object> serviceProperties);
 
 }

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/impl/AssemblerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/impl/AssemblerImpl.java?rev=1078418&r1=1078417&r2=1078418&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/impl/AssemblerImpl.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/assembler/impl/AssemblerImpl.java
Sun Mar  6 08:07:41 2011
@@ -31,6 +31,7 @@ import javax.resource.spi.ManagedConnect
 import javax.resource.spi.ResourceAdapter;
 import javax.resource.spi.ResourceAdapterAssociation;
 import org.apache.geronimo.connector.ConnectionTracker;
+import org.apache.geronimo.connector.SubjectSource;
 import org.apache.geronimo.connector.assembler.Assembler;
 import org.apache.geronimo.connector.assembler.AssemblyListener;
 import org.apache.geronimo.connector.model.AdminObjectInfo;
@@ -39,7 +40,6 @@ import org.apache.geronimo.connector.mod
 import org.apache.geronimo.connector.model.ResourceAdapterModuleInfo;
 import org.apache.geronimo.connector.outbound.BaseConnectionManager;
 import org.apache.geronimo.connector.outbound.InterceptorsImpl;
-import org.apache.geronimo.connector.SubjectSource;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.LocalTransactions;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.NoPool;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.NoTransactions;
@@ -93,7 +93,7 @@ public class AssemblerImpl implements As
             assembleAdminObject(adminObjectInfo, bundle, resourceAdapter);
         }
         for (AssemblyListener listener: listeners) {
-            listener.newResourceAdapter(resourceAdapterInfo.name, resourceAdapter);
+            listener.newResourceAdapter(resourceAdapterInfo.name, resourceAdapter, resourceAdapterInfo.serviceProperties);
         }
     }
 
@@ -114,7 +114,7 @@ public class AssemblerImpl implements As
                 threadClassLoader);
 
         for (AssemblyListener listener: listeners) {
-            listener.newManagedConnectionFactory(managedConnectionFactoryInfo.name, managedConnectionFactory,
interceptors);
+            listener.newManagedConnectionFactory(managedConnectionFactoryInfo.name, managedConnectionFactory,
interceptors, managedConnectionFactoryInfo.serviceProperties);
         }
     }
 
@@ -182,7 +182,7 @@ public class AssemblerImpl implements As
             ((ResourceAdapterAssociation)adminObject).setResourceAdapter(resourceAdapter);
         }
         for (AssemblyListener listener: listeners) {
-            listener.newAdminObject(adminObjectInfo.name, adminObjectInfo.adminObjectInterface,
adminObject);
+            listener.newAdminObject(adminObjectInfo.name, adminObjectInfo.adminObjectInterface,
adminObject, adminObjectInfo.serviceProperties);
         }
     }
 

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=1078418&r1=1078417&r2=1078418&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 08:07:41 2011
@@ -78,29 +78,27 @@ public class Container implements Assemb
     }
 
     @Override
-    public void newResourceAdapter(String name, ResourceAdapter resourceAdapter) {
+    public void newResourceAdapter(String name, ResourceAdapter resourceAdapter, Dictionary<String,
Object> serviceProperties) {
         String[] interfaceNames = new String[] {ResourceAdapter.class.getName(), resourceAdapter.getClass().getName()};
-        registerService(interfaceNames, resourceAdapter);
+        registerService(interfaceNames, resourceAdapter, serviceProperties);
     }
 
     @Override
-    public void newAdminObject(String name, String adminObjectInterface, Object adminObject)
{
+    public void newAdminObject(String name, String adminObjectInterface, Object adminObject,
Dictionary<String, Object> serviceProperties) {
         String[] interfaceNames = new String[] {adminObjectInterface};
-        registerService(interfaceNames, adminObject);
+        registerService(interfaceNames, adminObject, serviceProperties);
     }
 
     @Override
-    public void newManagedConnectionFactory(String name, ManagedConnectionFactory managedConnectionFactory,
BaseConnectionManager.Interceptors interceptors) {
-        Dictionary properties = new Hashtable();
-        properties.put(DSFactoryConnectionManager.INTERCEPTORS, interceptors);
-        properties.put(DSFactoryConnectionManager.MCF, managedConnectionFactory);
-        properties.put(DSFactoryConnectionManager.NAME, name);
-        componentInstances.add(cmFactory.newInstance(properties));
+    public void newManagedConnectionFactory(String name, ManagedConnectionFactory managedConnectionFactory,
BaseConnectionManager.Interceptors interceptors, Dictionary<String, Object> serviceProperties)
{
+        serviceProperties.put(DSFactoryConnectionManager.INTERCEPTORS, interceptors);
+        serviceProperties.put(DSFactoryConnectionManager.MCF, managedConnectionFactory);
+        serviceProperties.put(DSFactoryConnectionManager.NAME, name);
+        componentInstances.add(cmFactory.newInstance(serviceProperties));
     }
 
-    private void registerService(String[] interfaceNames, Object service) {
-        Dictionary properties = new Hashtable();
-        ServiceRegistration sr = bundle.getBundleContext().registerService(interfaceNames,
service, properties);
+    private void registerService(String[] interfaceNames, Object service, Dictionary<String,
Object> serviceProperties) {
+        ServiceRegistration sr = bundle.getBundleContext().registerService(interfaceNames,
service, serviceProperties);
         serviceRegistrations.add(sr);
     }
 

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/AdminObjectInfo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/AdminObjectInfo.java?rev=1078418&r1=1078417&r2=1078418&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/AdminObjectInfo.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/AdminObjectInfo.java
Sun Mar  6 08:07:41 2011
@@ -27,11 +27,9 @@ import java.util.Map;
 /**
  * @version $Rev:$ $Date:$
  */
-public class AdminObjectInfo implements Serializable {
+public class AdminObjectInfo extends BaseInfo {
 
-    public String name;
     public String adminObjectInterface;
     public String adminObjectClass;
-    public final Map<String, Object> configProperties = new HashMap<String, Object>();
 
 }

Added: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/BaseInfo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/BaseInfo.java?rev=1078418&view=auto
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/BaseInfo.java
(added)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/BaseInfo.java
Sun Mar  6 08:07:41 2011
@@ -0,0 +1,37 @@
+/*
+ * 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.model;
+
+import java.io.Serializable;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class BaseInfo implements Serializable {
+    public String name;
+    public final Map<String, Object> configProperties = new HashMap<String, Object>();
+
+    public final Dictionary<String, Object> serviceProperties = new Hashtable<String,
Object>();
+}

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ManagedConnectionFactoryInfo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ManagedConnectionFactoryInfo.java?rev=1078418&r1=1078417&r2=1078418&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ManagedConnectionFactoryInfo.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ManagedConnectionFactoryInfo.java
Sun Mar  6 08:07:41 2011
@@ -27,7 +27,7 @@ import java.util.Map;
 /**
  * @version $Rev:$ $Date:$
  */
-public class ManagedConnectionFactoryInfo implements Serializable {
+public class ManagedConnectionFactoryInfo extends BaseInfo {
 
     public static enum TransactionSupport {
         none,
@@ -52,9 +52,7 @@ public class ManagedConnectionFactoryInf
         partitionedBySubjectAndConnectionRequestInfo;
     }
 
-    public String name;
     public String managedConnectionFactoryClass;
-    public final Map<String, Object> configProperties = new HashMap<String, Object>();
 
     public int minPoolSize;
     public int maxPoolSize;

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ResourceAdapterInfo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ResourceAdapterInfo.java?rev=1078418&r1=1078417&r2=1078418&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ResourceAdapterInfo.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/model/ResourceAdapterInfo.java
Sun Mar  6 08:07:41 2011
@@ -30,11 +30,9 @@ import java.util.Map;
 /**
  * @version $Rev:$ $Date:$
  */
-public class ResourceAdapterInfo implements Serializable {
+public class ResourceAdapterInfo extends BaseInfo {
 
-    public String name;
     public String resourceAdapterClass;
-    public final Map<String, Object> configProperties = new HashMap<String, Object>();
     public final List<ManagedConnectionFactoryInfo> managedConnectionFactoryInfos =
new ArrayList<ManagedConnectionFactoryInfo>();
     public final List<AdminObjectInfo> adminObjectInfos = new ArrayList<AdminObjectInfo>();
 

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/AssemblerTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/AssemblerTest.java?rev=1078418&r1=1078417&r2=1078418&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/AssemblerTest.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/AssemblerTest.java
Sun Mar  6 08:07:41 2011
@@ -118,7 +118,7 @@ public class AssemblerTest {
         int aoCount;
         int mcfCount;
 
-        public void newResourceAdapter(String name, ResourceAdapter resourceAdapter) {
+        public void newResourceAdapter(String name, ResourceAdapter resourceAdapter, Dictionary<String,
Object> serviceProperties) {
             raCount++;
             assertEquals("ra1", name);
             assertNotNull(resourceAdapter);
@@ -126,11 +126,11 @@ public class AssemblerTest {
             assertEquals("value1", ((MockResourceAdapter)resourceAdapter).getRAStringProperty());
         }
 
-        public void newAdminObject(String name, String adminObjectInterface, Object adminObject)
{
+        public void newAdminObject(String name, String adminObjectInterface, Object adminObject,
Dictionary<String, Object> serviceProperties) {
             aoCount++;
         }
 
-        public void newManagedConnectionFactory(String name, ManagedConnectionFactory managedConnectionFactory,
BaseConnectionManager.Interceptors interceptors) {
+        public void newManagedConnectionFactory(String name, ManagedConnectionFactory managedConnectionFactory,
BaseConnectionManager.Interceptors interceptors, Dictionary<String, Object> serviceProperties)
{
             mcfCount++;
             assertTrue(name.startsWith("mcf"));
             assertNotNull(managedConnectionFactory);

Modified: geronimo/sandbox/djencks/txmanager/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/pom.xml?rev=1078418&r1=1078417&r2=1078418&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/pom.xml (original)
+++ geronimo/sandbox/djencks/txmanager/pom.xml Sun Mar  6 08:07:41 2011
@@ -45,7 +45,7 @@
         <siteId>components/${project.artifactId}</siteId>
         <karafVersion>2.99.99-SNAPSHOT</karafVersion>
         <jaxbImplVersion>2.2.3_1-SNAPSHOT</jaxbImplVersion>
-        <woodstoxVersion>3.2.9_1</woodstoxVersion>
+        <woodstoxVersion>4.0.6_2-SNAPSHOT</woodstoxVersion>
     </properties>
 
     <dependencyManagement>
@@ -244,12 +244,12 @@
             <dependency>
                 <groupId>org.apache.geronimo.specs</groupId>
                 <artifactId>geronimo-jaxb_2.2_spec</artifactId>
-                <version>1.0.1</version>
+                <version>1.1-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.geronimo.specs</groupId>
                 <artifactId>geronimo-stax-api_1.2_spec</artifactId>
-                <version>1.0</version>
+                <version>1.1-SNAPSHOT</version>
             </dependency>
         </dependencies>
     </dependencyManagement>



Mime
View raw message