geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1060086 - in /geronimo/sandbox/djencks/txmanager/geronimo-connector/src: main/java/org/apache/geronimo/connector/ main/java/org/apache/geronimo/connector/work/ test/java/org/apache/geronimo/connector/ test/java/org/apache/geronimo/connecto...
Date Mon, 17 Jan 2011 20:42:01 GMT
Author: djencks
Date: Mon Jan 17 20:42:01 2011
New Revision: 1060086

URL: http://svn.apache.org/viewvc?rev=1060086&view=rev
Log:
add an interface.  All scr components are now satisfied

Added:
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/ContextAwareWorkManager.java
Modified:
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContext.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java
    geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContext.java?rev=1060086&r1=1060085&r2=1060086&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContext.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContext.java
Mon Jan 17 20:42:01 2011
@@ -26,7 +26,7 @@ import javax.transaction.TransactionSync
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
-import org.apache.geronimo.connector.work.GeronimoWorkManager;
+import org.apache.geronimo.connector.work.ContextAwareWorkManager;
 
 /**
  * GBean BootstrapContext implementation that refers to externally configured WorkManager
@@ -39,7 +39,7 @@ import org.apache.geronimo.connector.wor
 public class GeronimoBootstrapContext implements javax.resource.spi.BootstrapContext {
 
     @Reference
-    private GeronimoWorkManager workManager;
+    private ContextAwareWorkManager workManager;
 
     @Reference
     private XATerminator xATerminator;
@@ -61,7 +61,7 @@ public class GeronimoBootstrapContext im
      * @param transactionSynchronizationRegistry
      *
      */
-    public GeronimoBootstrapContext(GeronimoWorkManager workManager, XATerminator xaTerminator,
TransactionSynchronizationRegistry transactionSynchronizationRegistry) {
+    public GeronimoBootstrapContext(ContextAwareWorkManager workManager, XATerminator xaTerminator,
TransactionSynchronizationRegistry transactionSynchronizationRegistry) {
         this.workManager = workManager;
         this.xATerminator = xaTerminator;
         this.transactionSynchronizationRegistry = transactionSynchronizationRegistry;
@@ -75,11 +75,11 @@ public class GeronimoBootstrapContext im
         this.transactionSynchronizationRegistry = null;
     }
 
-    public void bindWorkManager(GeronimoWorkManager workManager) {
+    public void bindWorkManager(ContextAwareWorkManager workManager) {
         this.workManager = workManager;
     }
 
-    public void unbindWorkManager(GeronimoWorkManager workManager) {
+    public void unbindWorkManager(ContextAwareWorkManager workManager) {
         this.workManager = null;
     }
 

Added: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/ContextAwareWorkManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/ContextAwareWorkManager.java?rev=1060086&view=auto
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/ContextAwareWorkManager.java
(added)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/ContextAwareWorkManager.java
Mon Jan 17 20:42:01 2011
@@ -0,0 +1,31 @@
+/*
+ * 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.work;
+
+import javax.resource.spi.work.WorkContext;
+import javax.resource.spi.work.WorkManager;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public interface ContextAwareWorkManager extends WorkManager {
+    boolean isContextSupported(Class<? extends WorkContext> aClass);
+}

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java?rev=1060086&r1=1060085&r2=1060086&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java
Mon Jan 17 20:42:01 2011
@@ -59,7 +59,7 @@ import org.apache.geronimo.connector.wor
                 value = "(service.ranking>=0)"),
         @Property(name = "scheduleExecutor.target",
                 value = "(service.ranking>=0)")})
-public class GeronimoWorkManager implements WorkManager {
+public class GeronimoWorkManager implements ContextAwareWorkManager {
 
     /**
      * Pool of threads used by this WorkManager in order to process

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java?rev=1060086&r1=1060085&r2=1060086&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java
Mon Jan 17 20:42:01 2011
@@ -31,6 +31,7 @@ import javax.resource.spi.work.WorkConte
 import javax.resource.spi.work.WorkManager;
 
 import junit.framework.TestCase;
+import org.apache.geronimo.connector.work.ContextAwareWorkManager;
 import org.apache.geronimo.connector.work.GeronimoWorkManager;
 import org.apache.geronimo.connector.work.TransactionContextHandler;
 import org.apache.geronimo.connector.work.WorkContextHandler;
@@ -99,7 +100,7 @@ public class BootstrapContextTest extend
     public void testGetSetWorkManager() throws Exception {
         GeronimoTransactionManager transactionManager = new GeronimoTransactionManager();
         TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(transactionManager);
-        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, Collections.<WorkContextHandler<?
extends WorkContext>>singletonList(txWorkContextHandler));
+        ContextAwareWorkManager manager = new GeronimoWorkManager(pool, pool, pool, Collections.<WorkContextHandler<?
extends WorkContext>>singletonList(txWorkContextHandler));
         GeronimoBootstrapContext context = new GeronimoBootstrapContext(manager, transactionManager,
transactionManager);
         WorkManager wm = context.getWorkManager();
 
@@ -112,7 +113,7 @@ public class BootstrapContextTest extend
     public void testGetSetXATerminator() throws Exception {
         GeronimoTransactionManager transactionManager = new GeronimoTransactionManager();
         TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(transactionManager);
-        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, Collections.<WorkContextHandler<?
extends WorkContext>>singletonList(txWorkContextHandler));
+        ContextAwareWorkManager manager = new GeronimoWorkManager(pool, pool, pool, Collections.<WorkContextHandler<?
extends WorkContext>>singletonList(txWorkContextHandler));
         GeronimoBootstrapContext context = new GeronimoBootstrapContext(manager, transactionManager,
transactionManager);
         XATerminator xat = context.getXATerminator();
 

Modified: geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java?rev=1060086&r1=1060085&r2=1060086&view=diff
==============================================================================
--- geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
(original)
+++ geronimo/sandbox/djencks/txmanager/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
Mon Jan 17 20:42:01 2011
@@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
  */
 public class PooledWorkManagerTest extends TestCase {
 
-    private GeronimoWorkManager workManager;
+    private ContextAwareWorkManager workManager;
 
     protected void setUp() throws Exception {
         super.setUp();



Mime
View raw message