geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r559235 - in /geronimo/components: ./ txmanager/ txmanager/trunk/ txmanager/trunk/geronimo-connector/ txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/ txmanager/trunk/geronimo-connector/src/main/java/org/apach...
Date Tue, 24 Jul 2007 22:02:04 GMT
Author: djencks
Date: Tue Jul 24 15:01:59 2007
New Revision: 559235

URL: http://svn.apache.org/viewvc?view=rev&rev=559235
Log:
GERONIMO-3344 non-kernel-dependent tx and connector classes in separate jars

Added:
    geronimo/components/
    geronimo/components/txmanager/
    geronimo/components/txmanager/trunk/
    geronimo/components/txmanager/trunk/geronimo-connector/
      - copied from r558786, geronimo/server/trunk/modules/geronimo-connector/
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectSource.java   (with props)
    geronimo/components/txmanager/trunk/geronimo-transaction/
      - copied from r558786, geronimo/server/trunk/modules/geronimo-transaction/
Removed:
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/ActivationSpecWrapperGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/AdminObjectSource.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/AdminObjectWrapper.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/AdminObjectWrapperGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/DatabaseInitializationGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContextGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/JCAResourceImpl.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/JCAResourceImplGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/ResourceAdapterImpl.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/ResourceAdapterImplGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/ResourceAdapterModuleImpl.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/ResourceAdapterModuleImplGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/ResourceAdapterWrapperGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/AbstractConnectionManagerGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManagerGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImpl.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/JCAConnectionFactoryImplGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinatorGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/CallerIdentityPasswordCredentialLoginModule.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapperGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/transactionlog/JDBCLog.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/transactionlog/JDBCLogGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManagerGBean.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/AdminObjectWrapperTest.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/GenericConnectionManagerGBeanSerializationTest.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapperTest.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/security/GBeanTest.java
    geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLogGBean.java
    geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/GeronimoTransactionManagerGBean.java
    geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImplGBean.java
    geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/XidFactoryImplGBean.java
Modified:
    geronimo/components/txmanager/trunk/geronimo-connector/pom.xml
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectInterceptor.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/SubjectInterceptorTest.java
    geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
    geronimo/components/txmanager/trunk/geronimo-transaction/pom.xml
    geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverableTransactionManager.java
    geronimo/components/txmanager/trunk/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java

Modified: geronimo/components/txmanager/trunk/geronimo-connector/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-connector/pom.xml?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-connector/pom.xml (original)
+++ geronimo/components/txmanager/trunk/geronimo-connector/pom.xml Tue Jul 24 15:01:59 2007
@@ -23,24 +23,24 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.geronimo.modules</groupId>
-        <artifactId>modules</artifactId>
-        <version>2.1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
+        <groupId>org.apache.geronimo.genesis.config</groupId>
+        <artifactId>project-config</artifactId>
+        <version>1.2-SNAPSHOT</version>
     </parent>
 
+    <groupId>org.apache.geronimo.components</groupId>
     <artifactId>geronimo-connector</artifactId>
+    <version>2.0-SNAPSHOT</version>
     <name>Geronimo :: Connector</name>
 
     <dependencies>
-        
+<!--        
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-naming</artifactId>
             <version>${version}</version>
         </dependency>
 
-        <!-- Needed only for DeploymentException in a test, from NameFactory which probably shouldn't be throwing it in the first place-->
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-deployment</artifactId>
@@ -52,10 +52,10 @@
             <artifactId>geronimo-security</artifactId>
             <version>${version}</version>
         </dependency>
-
+-->
         <!-- g-system, g-management come from this via g-j2ee -->
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
+            <groupId>org.apache.geronimo.components</groupId>
             <artifactId>geronimo-transaction</artifactId>
             <version>${version}</version>
         </dependency>
@@ -63,8 +63,9 @@
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+            <version>1.1.1</version>
         </dependency>
-
+<!--
         <dependency>
             <groupId>org.tranql</groupId>
             <artifactId>tranql</artifactId>
@@ -76,13 +77,350 @@
                 </exclusion>
             </exclusions>
         </dependency>
-
+-->
         <!-- needed for passwordcredential realm-->
+<!--
         <dependency>
             <groupId>regexp</groupId>
             <artifactId>regexp</artifactId>
         </dependency>
-
+-->
     </dependencies>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.geronimo.plugins</groupId>
+                    <artifactId>car-maven-plugin</artifactId>
+                    <version>${version}</version>
+                    <extensions>true</extensions>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-enforcer-plugin</artifactId>
+                    <version>1.0-alpha-2</version>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <version>2.0-alpha-4</version>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>groovy-maven-plugin</artifactId>
+                    <version>1.0-alpha-2</version>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>selenium-maven-plugin</artifactId>
+                    <version>1.0-beta-2-SNAPSHOT</version>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>xmlbeans-maven-plugin</artifactId>
+                    <version>2.3.1-20070720.222301-1</version>
+
+                    <executions>
+                        <execution>
+                            <goals>
+                                <goal>xmlbeans</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+
+                    <configuration>
+                        <download>true</download>
+                        <quiet>false</quiet>
+                    </configuration>
+                </plugin>
+
+
+                <plugin>
+                    <groupId>org.codehaus.mojo.jspc</groupId>
+                    <artifactId>jspc-maven-plugin</artifactId>
+                    <version>2.0-SNAPSHOT</version>
+                    <executions>
+                        <execution>
+                            <goals>
+                                 <goal>compile</goal>
+                            </goals>
+                            <configuration>
+                                <warSourceDirectory>${pom.basedir}/src/main/webapp</warSourceDirectory>
+                            </configuration>
+                        </execution>
+                    </executions>
+                    
+                    <!-- Use the Tomcat 6 JSP compiler, but with our custom Jasper version -->
+                    <dependencies>
+                        <dependency>
+                            <groupId>org.codehaus.mojo.jspc</groupId>
+                            <artifactId>jspc-compiler-tomcat6</artifactId>
+                            <version>2.0-SNAPSHOT</version>
+                            <exclusions>
+                                <exclusion>
+                                    <groupId>org.apache.tomcat</groupId>
+                                    <artifactId>jasper</artifactId>
+                                </exclusion>
+                            </exclusions>
+                        </dependency>
+                        
+                        <dependency>
+                            <groupId>org.apache.tomcat</groupId>
+                            <artifactId>jasper</artifactId>
+                            <version>6.0.13-G543818</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>sql-maven-plugin</artifactId>
+                    <version>1.0</version>
+                </plugin>
+                
+                <!--
+                FIXME: Should not configure war to assume jsp by default
+                -->
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-war-plugin</artifactId>
+                    <version>2.0.2</version>
+                    <configuration>
+                        <warSourceDirectory>${pom.basedir}/src/main/webapp</warSourceDirectory>
+                        <webXml>${project.build.directory}/jspweb.xml</webXml>
+                        <archiveClasses>true</archiveClasses>
+                        <archive>
+                            <!-- Do not include META-INF/maven to avoid long file problems on windows -->
+                            <addMavenDescriptor>false</addMavenDescriptor>
+                        </archive>
+                        
+                        <!--
+                        HACK: Include legal files explicity, otherwise they will end up in the wrong path
+                              or in another jar file in the war.
+                        
+                        NOTE: targetPath is broken for webResources (as documented)
+                        -->
+                        <webResources>
+                            <resource>
+                                <directory>${project.build.outputDirectory}</directory>
+                                <includes>
+                                    <include>META-INF/LICENSE*</include>
+                                    <include>META-INF/NOTICE*</include>
+                                    <include>META-INF/DISCLAIMER*</include>
+                                </includes>
+                            </resource>
+                        </webResources>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-ear-plugin</artifactId>
+                    <version>2.3</version>
+                    <configuration>
+                        <archive>
+                            <!-- Do not include META-INF/maven to avoid long file problems on windows -->
+                            <addMavenDescriptor>false</addMavenDescriptor>
+                        </archive>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-rar-plugin</artifactId>
+                    <version>2.2</version>
+                    <configuration>
+                        <archive>
+                            <!-- Do not include META-INF/maven to avoid long file problems on windows -->
+                            <addMavenDescriptor>false</addMavenDescriptor>
+                        </archive>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <configuration>
+                        <archive>
+                            <!-- Do not include META-INF/maven to avoid long file problems on windows -->
+                            <addMavenDescriptor>false</addMavenDescriptor>
+                        </archive>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.geronimo.plugins</groupId>
+                    <artifactId>geronimo-maven-plugin</artifactId>
+                    <version>${version}</version>
+
+                    <configuration>
+                        <assemblies>
+                            <assembly>
+                                <id>jetty</id>
+                                <groupId>org.apache.geronimo.assemblies</groupId>
+                                <artifactId>geronimo-jetty6-jee5</artifactId>
+                                <version>${version}</version>
+                                <classifier>bin</classifier>
+                                <type>zip</type>
+                            </assembly>
+
+                            <assembly>
+                                <id>jetty-minimal</id>
+                                <groupId>org.apache.geronimo.assemblies</groupId>
+                                <artifactId>geronimo-jetty6-minimal</artifactId>
+                                <version>${version}</version>
+                                <classifier>bin</classifier>
+                                <type>zip</type>
+                            </assembly>
+
+                            <assembly>
+                                <id>tomcat</id>
+                                <groupId>org.apache.geronimo.assemblies</groupId>
+                                <artifactId>geronimo-tomcat6-jee5</artifactId>
+                                <version>${version}</version>
+                                <classifier>bin</classifier>
+                                <type>zip</type>
+                            </assembly>
+
+                            <assembly>
+                                <id>tomcat-minimal</id>
+                                <groupId>org.apache.geronimo.assemblies</groupId>
+                                <artifactId>geronimo-tomcat6-minimal</artifactId>
+                                <version>${version}</version>
+                                <classifier>bin</classifier>
+                                <type>zip</type>
+                            </assembly>
+                            
+                            <assembly>
+                                <id>framework</id>
+                                <groupId>org.apache.geronimo.assemblies</groupId>
+                                <artifactId>geronimo-framework</artifactId>
+                                <version>${version}</version>
+                                <classifier>bin</classifier>
+                                <type>zip</type>
+                            </assembly>
+                        </assemblies>
+
+                        <defaultAssemblyId>jetty</defaultAssemblyId>
+
+                        <optionSets>
+                            <optionSet>
+                                <id>morememory</id>
+                                <options>
+                                    <option>-Xmx512m</option>
+                                    <option>-XX:MaxPermSize=128m</option>
+                                </options>
+                            </optionSet>
+
+                            <optionSet>
+                                <id>debug</id>
+                                <options>
+                                    <option>-Xdebug</option>
+                                    <option>-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</option>
+                                </options>
+                            </optionSet>
+                        </optionSets>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <!-- Allow any Java >= 1.5, but not 1.6 or above -->
+                                <requireJavaVersion>
+                                    <version>[1.5,1.6)</version>
+                                </requireJavaVersion>
+                                
+                                <!-- Allow any Maven >= 2.0.5 -->
+                                <requireMavenVersion>
+                                    <version>[2.0.5,)</version>
+                                </requireMavenVersion>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            
+            <plugin>
+                <groupId>org.apache.geronimo.genesis.plugins</groupId>
+                <artifactId>tools-maven-plugin</artifactId>
+
+                <!-- Tools includes custom packagings, install as extension to pick them up -->
+                <extensions>true</extensions>
+
+                <executions>
+                    <execution>
+                        <id>install-legal-files</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy-legal-files</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Fail the build if no legal files were copied -->
+                            <strict>true</strict>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>verify-legal-files</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>verify-legal-files</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Fail the build if no legal files were found -->
+                            <strict>true</strict>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-idea-plugin</artifactId>
+                <configuration>
+                    <jdkName>1.5</jdkName>
+                    <jdkLevel>1.5</jdkLevel>
+                    <linkModules>true</linkModules>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-release-plugin</artifactId>
+                <configuration>
+                    <tagBase>https://svn.apache.org/repos/asf/geronimo/server/tags</tagBase>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>
 

Modified: geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java (original)
+++ geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java Tue Jul 24 15:01:59 2007
@@ -44,11 +44,12 @@
     public GenericConnectionManager(TransactionSupport transactionSupport,
                                     PoolingSupport pooling,
                                     boolean containerManagedSecurity,
+                                    SubjectSource subjectSource,
                                     ConnectionTracker connectionTracker,
                                     RecoverableTransactionManager transactionManager,
                                     String objectName,
                                     ClassLoader classLoader) {
-        super(new InterceptorsImpl(transactionSupport, pooling, containerManagedSecurity, objectName, connectionTracker, transactionManager, classLoader), transactionManager);
+        super(new InterceptorsImpl(transactionSupport, pooling, containerManagedSecurity, subjectSource, objectName, connectionTracker, transactionManager, classLoader), transactionManager);
     }
 
     private static class InterceptorsImpl implements AbstractConnectionManager.Interceptors {
@@ -73,7 +74,7 @@
         public InterceptorsImpl(TransactionSupport transactionSupport,
                                 PoolingSupport pooling,
                                 boolean containerManagedSecurity,
-                                String objectName,
+                                SubjectSource subjectSource, String objectName,
                                 ConnectionTracker connectionTracker,
                                 TransactionManager transactionManager,
                                 ClassLoader classLoader) {
@@ -96,7 +97,7 @@
             stack = transactionSupport.addTransactionInterceptors(stack, transactionManager);
 
             if (containerManagedSecurity) {
-                stack = new SubjectInterceptor(stack);
+                stack = new SubjectInterceptor(stack, subjectSource);
             }
 
             if (transactionSupport.isRecoverable()) {

Modified: geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectInterceptor.java?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectInterceptor.java (original)
+++ geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectInterceptor.java Tue Jul 24 15:01:59 2007
@@ -21,8 +21,6 @@
 import javax.resource.spi.ApplicationServerInternalException;
 import javax.security.auth.Subject;
 
-import org.apache.geronimo.security.ContextManager;
-
 /**
  * SubjectInterceptor.java This is installed only when the plan includes a container-managed-security element.
  *
@@ -34,16 +32,18 @@
 public class SubjectInterceptor implements ConnectionInterceptor {
 
     private final ConnectionInterceptor next;
+    private final SubjectSource subjectSource;
 
-    public SubjectInterceptor(final ConnectionInterceptor next) {
+    public SubjectInterceptor(final ConnectionInterceptor next, final SubjectSource subjectSource) {
         this.next = next;
+        this.subjectSource = subjectSource;
     }
 
     public void getConnection(ConnectionInfo connectionInfo) throws ResourceException {
         Subject currentSubject = null;
         if (!connectionInfo.isApplicationManagedSecurity()) {
             try {
-                currentSubject = ContextManager.getNextCaller();
+                currentSubject = subjectSource.getSubject();
             } catch (SecurityException e) {
                 throw new ResourceException("Can not obtain Subject for login", e);
             }
@@ -98,4 +98,5 @@
     public void destroy() {
         next.destroy();
     }
+
 }

Added: geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectSource.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectSource.java?view=auto&rev=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectSource.java (added)
+++ geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectSource.java Tue Jul 24 15:01:59 2007
@@ -0,0 +1,30 @@
+/*
+ * 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.outbound;
+
+import javax.security.auth.Subject;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public interface SubjectSource {
+    Subject getSubject() throws SecurityException;
+}

Propchange: geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectSource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectSource.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/components/txmanager/trunk/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/SubjectSource.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java (original)
+++ geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java Tue Jul 24 15:01:59 2007
@@ -18,23 +18,75 @@
 package org.apache.geronimo.connector;
 
 import java.util.Timer;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
 import javax.resource.spi.XATerminator;
 import javax.resource.spi.work.WorkManager;
 
 import junit.framework.TestCase;
 import org.apache.geronimo.connector.work.GeronimoWorkManager;
-import org.apache.geronimo.pool.ThreadPool;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
+import org.apache.geronimo.transaction.manager.XAWork;
 
 /**
  * Unit tests for {@link GeronimoBootstrapContext}
  * @version $Rev$ $Date$
  */
 public class BootstrapContextTest extends TestCase {
-    ThreadPool pool;
+    ThreadPoolExecutor pool;
+
     protected void setUp() throws Exception {
         super.setUp();
-        pool = new ThreadPool(1, "Connector Test", 30000, ThreadPool.class.getClassLoader(), "foo:test=bar");
+
+        XAWork xaWork = new GeronimoTransactionManager();
+        int poolSize = 1;
+        int keepAliveTime = 30000;
+        ThreadPoolExecutor pool = new ThreadPoolExecutor(
+            poolSize, // core size
+            poolSize, // max size
+            keepAliveTime, TimeUnit.MILLISECONDS,
+            new SynchronousQueue());
+
+        pool.setRejectedExecutionHandler(new WaitWhenBlockedPolicy());
+        pool.setThreadFactory(new ThreadPoolThreadFactory("Connector Test", getClass().getClassLoader()));
+    }
+
+    private static class WaitWhenBlockedPolicy
+        implements RejectedExecutionHandler {
+        public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) throws RejectedExecutionException {
+            try {
+                executor.getQueue().put(r);
+            }
+            catch (InterruptedException e) {
+                throw new RejectedExecutionException(e);
+            }
+        }
+    }
+    private static final class ThreadPoolThreadFactory implements ThreadFactory {
+        private final String poolName;
+        private final ClassLoader classLoader;
+
+        private int nextWorkerID = 0;
+
+        public ThreadPoolThreadFactory(String poolName, ClassLoader classLoader) {
+            this.poolName = poolName;
+            this.classLoader = classLoader;
+        }
+
+        public Thread newThread(Runnable arg0) {
+            Thread thread = new Thread(arg0, poolName + " " + getNextWorkerID());
+            thread.setContextClassLoader(classLoader);
+            return thread;
+        }
+
+        private synchronized int getNextWorkerID() {
+            return nextWorkerID++;
+        }
     }
 
     /**

Modified: geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java (original)
+++ geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/ConnectionManagerTestUtils.java Tue Jul 24 15:01:59 2007
@@ -37,17 +37,20 @@
 import org.apache.geronimo.connector.outbound.connectiontracking.DefaultComponentInterceptor;
 import org.apache.geronimo.connector.outbound.connectiontracking.DefaultInterceptor;
 import org.apache.geronimo.connector.outbound.connectiontracking.GeronimoTransactionListener;
-import org.apache.geronimo.security.ContextManager;
-import org.apache.geronimo.testsupport.TestSupport;
 import org.apache.geronimo.transaction.manager.RecoverableTransactionManager;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import junit.framework.TestCase;
 
 /**
  * ???
  *
  * @version $Rev$ $Date$
  */
-public class ConnectionManagerTestUtils extends TestSupport implements DefaultInterceptor {
+public class ConnectionManagerTestUtils extends TestCase implements DefaultInterceptor {
+    protected static final Log log = LogFactory.getLog(ConnectionManagerTestUtils.class);
+    
     protected boolean useTransactionCaching = true;
     protected boolean useLocalTransactions = false;
     protected boolean useThreadCaching = false;
@@ -98,12 +101,17 @@
 
         mockManagedConnectionFactory = new MockManagedConnectionFactory();
         subject = new Subject();
-        ContextManager.setCallers(subject, subject);
+        SubjectSource subjectSource = new SubjectSource() {
+
+            public Subject getSubject() throws SecurityException {
+                return subject;
+            }
+        };
         connectionManagerDeployment = new GenericConnectionManager(
                 transactionSupport,
                 poolingSupport,
                 containerManagedSecurity,
-                connectionTrackingCoordinator,
+                subjectSource, connectionTrackingCoordinator,
                 this.transactionManager,
                 name,
                 classLoader);

Modified: geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/SubjectInterceptorTest.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/SubjectInterceptorTest.java?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/SubjectInterceptorTest.java (original)
+++ geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/outbound/SubjectInterceptorTest.java Tue Jul 24 15:01:59 2007
@@ -20,8 +20,6 @@
 import javax.security.auth.Subject;
 import javax.resource.ResourceException;
 
-import org.apache.geronimo.security.ContextManager;
-
 /**
  *
  *
@@ -34,7 +32,13 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        subjectInterceptor = new SubjectInterceptor(this);
+        SubjectSource subjectSource = new SubjectSource() {
+            public Subject getSubject() throws SecurityException {
+                return subject;
+            }
+        };
+
+        subjectInterceptor = new SubjectInterceptor(this, subjectSource);
     }
 
     protected void tearDown() throws Exception {
@@ -44,7 +48,6 @@
 
     public void testGetConnection() throws Exception {
         subject = new Subject();
-        ContextManager.setCallers(subject, subject);
         ConnectionInfo connectionInfo = makeConnectionInfo();
         ManagedConnectionInfo managedConnectionInfo = connectionInfo.getManagedConnectionInfo();
         subjectInterceptor.getConnection(connectionInfo);
@@ -73,14 +76,12 @@
 
     public void testEnterWithChangedSubject() throws Exception {
         makeSubject("foo");
-        ContextManager.setCallers(subject, subject);
         ConnectionInfo connectionInfo = makeConnectionInfo();
         managedConnection = new TestPlainManagedConnection();
         subjectInterceptor.getConnection(connectionInfo);
         //reset our test indicator
         obtainedConnectionInfo = null;
         makeSubject("bar");
-        ContextManager.setCallers(subject, subject);
         subjectInterceptor.getConnection(connectionInfo);
         //expect re-association
         assertTrue("Expected connection asked for", obtainedConnectionInfo != null);
@@ -103,7 +104,6 @@
 
     public void testUnshareablePreventsReAssociation() throws Exception {
         makeSubject("foo");
-        ContextManager.setCallers(subject, subject);
         ConnectionInfo connectionInfo = makeConnectionInfo();
         connectionInfo.setUnshareable(true);
         managedConnection = new TestPlainManagedConnection();
@@ -111,7 +111,6 @@
         //reset our test indicator
         obtainedConnectionInfo = null;
         makeSubject("bar");
-        ContextManager.setCallers(subject, subject);
         try {
             subjectInterceptor.getConnection(connectionInfo);
             fail("Reassociating should fail on an unshareable connection");

Modified: geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java (original)
+++ geronimo/components/txmanager/trunk/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java Tue Jul 24 15:01:59 2007
@@ -18,18 +18,24 @@
 package org.apache.geronimo.connector.work;
 
 import java.lang.reflect.Constructor;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
 import javax.resource.spi.work.ExecutionContext;
 import javax.resource.spi.work.Work;
 import javax.resource.spi.work.WorkEvent;
 import javax.resource.spi.work.WorkException;
 import javax.resource.spi.work.WorkListener;
 
-import org.apache.geronimo.pool.ThreadPool;
-import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
-import org.apache.geronimo.transaction.manager.XAWork;
-import org.apache.geronimo.testsupport.TestSupport;
+import junit.framework.TestCase;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
+import org.apache.geronimo.transaction.manager.XAWork;
 
 /**
  * Timing is crucial for this test case, which focuses on the synchronization
@@ -37,7 +43,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class PooledWorkManagerTest extends TestSupport {
+public class PooledWorkManagerTest extends TestCase {
 
     private GeronimoWorkManager workManager;
 
@@ -45,13 +51,55 @@
         super.setUp();
         
         XAWork xaWork = new GeronimoTransactionManager();
-        ThreadPool pool = new ThreadPool(1, "Connector Test", 30000, ThreadPool.class.getClassLoader(), "foo:test=bar");
-        pool.setWaitWhenBlocked(true);
-        
+        int poolSize = 1;
+        int keepAliveTime = 30000;
+        ThreadPoolExecutor pool = new ThreadPoolExecutor(
+            poolSize, // core size
+            poolSize, // max size
+            keepAliveTime, TimeUnit.MILLISECONDS,
+            new SynchronousQueue());
+
+        pool.setRejectedExecutionHandler(new WaitWhenBlockedPolicy());
+        pool.setThreadFactory(new ThreadPoolThreadFactory("Connector Test", getClass().getClassLoader()));
+
+
         workManager = new GeronimoWorkManager(pool, pool, pool, xaWork);
         workManager.doStart();
     }
 
+    private static class WaitWhenBlockedPolicy
+        implements RejectedExecutionHandler {
+        public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) throws RejectedExecutionException {
+            try {
+                executor.getQueue().put(r);
+            }
+            catch (InterruptedException e) {
+                throw new RejectedExecutionException(e);
+            }
+        }
+    }
+    private static final class ThreadPoolThreadFactory implements ThreadFactory {
+        private final String poolName;
+        private final ClassLoader classLoader;
+
+        private int nextWorkerID = 0;
+
+        public ThreadPoolThreadFactory(String poolName, ClassLoader classLoader) {
+            this.poolName = poolName;
+            this.classLoader = classLoader;
+        }
+
+        public Thread newThread(Runnable arg0) {
+            Thread thread = new Thread(arg0, poolName + " " + getNextWorkerID());
+            thread.setContextClassLoader(classLoader);
+            return thread;
+        }
+
+        private synchronized int getNextWorkerID() {
+            return nextWorkerID++;
+        }
+    }
+
     public void testDoWork() throws Exception {
         int nbThreads = 2;
         AbstractDummyWork threads[] = helperTest(DummyDoWork.class, nbThreads, 500, 600);
@@ -153,7 +201,7 @@
             try {
                 perform(new DummyWork(name, tempo), timeout, null, listener);
             } catch (Exception e) {
-                log.debug(e.getMessage(), e);
+//                log.debug(e.getMessage(), e);
             }
         }
 

Modified: geronimo/components/txmanager/trunk/geronimo-transaction/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-transaction/pom.xml?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-transaction/pom.xml (original)
+++ geronimo/components/txmanager/trunk/geronimo-transaction/pom.xml Tue Jul 24 15:01:59 2007
@@ -23,17 +23,28 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.geronimo.modules</groupId>
-        <artifactId>modules</artifactId>
-        <version>2.1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
+        <groupId>org.apache.geronimo.genesis.config</groupId>
+        <artifactId>project-config</artifactId>
+        <version>1.2-SNAPSHOT</version>
     </parent>
 
+    <groupId>org.apache.geronimo.components</groupId>
     <artifactId>geronimo-transaction</artifactId>
+    <version>2.0-SNAPSHOT</version>
     <name>Geronimo :: Transaction</name>
     
     <dependencies>
-        <dependency>
+
+            <dependency>
+                <groupId>commons-logging</groupId>
+                <artifactId>commons-logging</artifactId>
+                <version>1.0.4</version>
+            </dependency>
+
+
+
+<!-- 
+       <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-core</artifactId>
             <version>${version}</version>
@@ -44,20 +55,23 @@
             <artifactId>geronimo-j2ee</artifactId>
             <version>${version}</version>
         </dependency>
-
+-->
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jta_1.1_spec</artifactId>
+            <version>1.1</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+            <version>1.1.1</version>
         </dependency>
 
         <dependency>
             <groupId>org.objectweb.howl</groupId>
             <artifactId>howl</artifactId>
+            <version>1.0.1-1</version>
         </dependency>
     </dependencies>
     

Modified: geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverableTransactionManager.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverableTransactionManager.java?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverableTransactionManager.java (original)
+++ geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverableTransactionManager.java Tue Jul 24 15:01:59 2007
@@ -23,7 +23,7 @@
 import javax.transaction.TransactionManager;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public interface RecoverableTransactionManager extends TransactionManager {
     void recoveryError(Exception e);

Modified: geronimo/components/txmanager/trunk/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java?view=diff&rev=559235&r1=558786&r2=559235
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java (original)
+++ geronimo/components/txmanager/trunk/geronimo-transaction/src/test/java/org/apache/geronimo/transaction/manager/TransactionManagerImplTest.java Tue Jul 24 15:01:59 2007
@@ -17,9 +17,8 @@
 
 package org.apache.geronimo.transaction.manager;
 
-import java.util.ArrayList;
 import java.util.Map;
-import javax.management.ObjectName;
+
 import javax.transaction.RollbackException;
 import javax.transaction.Status;
 import javax.transaction.Transaction;
@@ -27,9 +26,6 @@
 import javax.transaction.xa.Xid;
 
 import junit.framework.TestCase;
-import org.apache.geronimo.gbean.ReferenceCollection;
-import org.apache.geronimo.gbean.ReferenceCollectionEvent;
-import org.apache.geronimo.gbean.ReferenceCollectionListener;
 
 /**
  * @version $Rev$ $Date$
@@ -48,7 +44,7 @@
     TransactionManagerImpl tm;
 
     protected void setUp() throws Exception {
-        tm = new TransactionManagerImplGBean(10,
+        tm = new TransactionManagerImpl(10,
                 new XidFactoryImpl("WHAT DO WE CALL IT?".getBytes()), transactionLog);
     }
 



Mime
View raw message