Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 64598 invoked from network); 10 Apr 2006 06:11:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Apr 2006 06:11:44 -0000 Received: (qmail 5263 invoked by uid 500); 10 Apr 2006 06:11:43 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 5120 invoked by uid 500); 10 Apr 2006 06:11:42 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 5109 invoked by uid 99); 10 Apr 2006 06:11:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Apr 2006 23:11:42 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 09 Apr 2006 23:11:41 -0700 Received: (qmail 64509 invoked by uid 65534); 10 Apr 2006 06:11:21 -0000 Message-ID: <20060410061121.64505.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r392895 - in /geronimo/branches/1.1/modules/connector-builder: ./ src/java/org/apache/geronimo/connector/deployment/ src/test-data/connector_1_5_localtx/ src/test-data/connector_1_5_notx/ src/test/org/apache/geronimo/connector/deployment/ Date: Mon, 10 Apr 2006 06:11:20 -0000 To: scm@geronimo.apache.org From: djencks@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: djencks Date: Sun Apr 9 23:11:18 2006 New Revision: 392895 URL: http://svn.apache.org/viewcvs?rev=392895&view=rev Log: GERONIMO-1822 add some checks for consistency of ra.xml and geronimo plan transaction support settings Added: geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_localtx/ - copied from r392471, geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_localtx/geronimo-ra.xml - copied unchanged from r392876, geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_localtx/ra.xml - copied, changed from r392876, geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ra.xml geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/ - copied from r392471, geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/geronimo-ra.xml - copied, changed from r392876, geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/ra.xml - copied, changed from r392876, geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ra.xml Modified: geronimo/branches/1.1/modules/connector-builder/maven.xml geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java Modified: geronimo/branches/1.1/modules/connector-builder/maven.xml URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/maven.xml?rev=392895&r1=392894&r2=392895&view=diff ============================================================================== --- geronimo/branches/1.1/modules/connector-builder/maven.xml (original) +++ geronimo/branches/1.1/modules/connector-builder/maven.xml Sun Apr 9 23:11:18 2006 @@ -55,6 +55,22 @@ + + + + + + + + + + + + + + Modified: geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=392895&r1=392894&r2=392895&view=diff ============================================================================== --- geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java (original) +++ geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java Sun Apr 9 23:11:18 2006 @@ -638,10 +638,22 @@ if (connectionManager.isSetNoTransaction()) { transactionSupport = NoTransactions.INSTANCE; } else if (connectionManager.isSetLocalTransaction()) { + if ("NoTransaction".equals(ddTransactionSupport)) { + throw new DeploymentException("You are requesting local transaction support for a connector that does not support transactions: named: " + connectionfactoryInstance.getName().trim()); + } transactionSupport = LocalTransactions.INSTANCE; } else if (connectionManager.isSetTransactionLog()) { + if ("NoTransaction".equals(ddTransactionSupport)) { + throw new DeploymentException("You are requesting local transaction support for a connector that does not support transactions: named: " + connectionfactoryInstance.getName().trim()); + } transactionSupport = TransactionLog.INSTANCE; } else if (connectionManager.isSetXaTransaction()) { + if ("NoTransaction".equals(ddTransactionSupport)) { + throw new DeploymentException("You are requesting xa transaction support for a connector that does not support transactions: named: " + connectionfactoryInstance.getName().trim()); + } + if ("LocalTransaction".equals(ddTransactionSupport)) { + throw new DeploymentException("You are requesting xa transaction support for a connector that supports only local transactions: named: " + connectionfactoryInstance.getName().trim()); + } transactionSupport = new XATransactions(connectionManager.getXaTransaction().isSetTransactionCaching(), connectionManager.getXaTransaction().isSetThreadCaching()); } else if ("NoTransaction".equals(ddTransactionSupport)) { @@ -652,7 +664,7 @@ transactionSupport = new XATransactions(defaultXATransactionCaching, defaultXAThreadCaching); } else { //this should not happen - throw new DeploymentException("Unexpected transaction support element"); + throw new DeploymentException("Unexpected transaction support element in connector named: " + connectionfactoryInstance.getName().trim()); } PoolingSupport pooling; if (connectionManager.getSinglePool() != null) { @@ -679,7 +691,7 @@ } else if (connectionManager.getNoPool() != null) { pooling = new NoPool(); } else { - throw new DeploymentException("Unexpected pooling support element"); + throw new DeploymentException("Unexpected pooling support element in connector named " + connectionfactoryInstance.getName().trim()); } try { connectionManagerGBean.setAttribute("transactionSupport", transactionSupport); @@ -688,13 +700,13 @@ connectionManagerGBean.setAttribute("containerManagedSecurity", Boolean.valueOf(connectionManager.isSetContainerManagedSecurity())); connectionManagerGBean.setReferencePattern("TransactionContextManager", earContext.getTransactionContextManagerObjectName()); } catch (Exception e) { - throw new DeploymentException("Problem setting up ConnectionManager", e); + throw new DeploymentException("Problem setting up ConnectionManager named " + connectionfactoryInstance.getName().trim(), e); } try { earContext.addGBean(connectionManagerGBean); } catch (GBeanAlreadyExistsException e) { - throw new DeploymentException("Could not add connection manager gbean to context", e); + throw new DeploymentException("Could not add connection manager gbean to context: name: " + connectionfactoryInstance.getName().trim(), e); } return connectionManagerAbstractName; } @@ -767,7 +779,7 @@ public GBeanData locateActivationSpecInfo(AbstractNameQuery resourceAdapterInstanceQuery, String messageListenerInterface, Configuration configuration) throws DeploymentException { //First, locate the module gbean from the JCAResourceAdapter instance - AbstractName instanceName = null; + AbstractName instanceName; try { instanceName = configuration.findGBean(resourceAdapterInstanceQuery); } catch (GBeanNotFoundException e) { Copied: geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_localtx/ra.xml (from r392876, geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ra.xml) URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_localtx/ra.xml?p2=geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_localtx/ra.xml&p1=geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ra.xml&r1=392876&r2=392895&rev=392895&view=diff ============================================================================== --- geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ra.xml (original) +++ geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_localtx/ra.xml Sun Apr 9 23:11:18 2006 @@ -75,7 +75,7 @@ org.apache.geronimo.connector.mock.MockConnection - XATransaction + LocalTransaction description BasicPassword Copied: geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/geronimo-ra.xml (from r392876, geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml) URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/geronimo-ra.xml?p2=geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/geronimo-ra.xml&p1=geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml&r1=392876&r2=392895&rev=392895&view=diff ============================================================================== --- geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml (original) +++ geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/geronimo-ra.xml Sun Apr 9 23:11:18 2006 @@ -43,9 +43,7 @@ newvalue2 - - - + 10 5000 @@ -113,22 +111,10 @@ class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean"> - - 5000 - 300 - DefaultThreadPool - - - - DefaultThreadPool - - - DefaultThreadPool - - - DefaultThreadPool - + 10 + 10 + 10 TransactionContextManager Copied: geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/ra.xml (from r392876, geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ra.xml) URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/ra.xml?p2=geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/ra.xml&p1=geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ra.xml&r1=392876&r2=392895&rev=392895&view=diff ============================================================================== --- geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/ra.xml (original) +++ geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5_notx/ra.xml Sun Apr 9 23:11:18 2006 @@ -75,7 +75,7 @@ org.apache.geronimo.connector.mock.MockConnection - XATransaction + NoTransaction description BasicPassword Modified: geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=392895&r1=392894&r2=392895&view=diff ============================================================================== --- geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java (original) +++ geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java Sun Apr 9 23:11:18 2006 @@ -285,6 +285,40 @@ }; executeTestBuildModule(action, true); } + + public void testBuildPackedModule15LocalTx() throws Exception { + InstallAction action = new InstallAction() { + private File rarFile = new File(basedir, "target/test-rar-15-localtx.rar"); + + public File getRARFile() { + return rarFile; + } + + }; + try { + executeTestBuildModule(action, true); + fail("transaction setting mismatch not detected"); + } catch (DeploymentException e) { + + } + } + + public void testBuildPackedModule15NoTx() throws Exception { + InstallAction action = new InstallAction() { + private File rarFile = new File(basedir, "target/test-rar-15-notx.rar"); + + public File getRARFile() { + return rarFile; + } + + }; + try { + executeTestBuildModule(action, true); + fail("transaction setting mismatch not detected"); + } catch (DeploymentException e) { + + } + } private void executeTestBuildModule(InstallAction action, boolean is15) throws Exception {