[jboss-cvs] JBossAS SVN: r57961 - in branches/JEE5_TCK: build iiop/src/etc server/src/etc/conf/default testsuite/src/main/org/jboss/test/jca/adapter
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 1 06:47:55 EST 2006
Author: jhalliday
Date: 2006-11-01 06:47:50 -0500 (Wed, 01 Nov 2006)
New Revision: 57961
Modified:
branches/JEE5_TCK/build/build-distr.xml
branches/JEE5_TCK/build/build-thirdparty.xml
branches/JEE5_TCK/iiop/src/etc/iiop-service.xml
branches/JEE5_TCK/server/src/etc/conf/default/jboss-service.xml
branches/JEE5_TCK/testsuite/src/main/org/jboss/test/jca/adapter/TestManagedConnection.java
Log:
Changes to make JBossTS the default transaction manager:
build system pulls the TS from repository.jboss.com
jboss-service.xml and iiop-service.xml reflect the new configuration
fixed a minor bug in jca adaper test that was exposed when running the JBossTS.
Modified: branches/JEE5_TCK/build/build-distr.xml
===================================================================
--- branches/JEE5_TCK/build/build-distr.xml 2006-11-01 05:01:48 UTC (rev 57960)
+++ branches/JEE5_TCK/build/build-distr.xml 2006-11-01 11:47:50 UTC (rev 57961)
@@ -187,7 +187,7 @@
<include name="ejb3-persistence.jar"/>
</fileset>
</copy>
-
+
<!-- Copy across client jars -->
<mkdir dir="${install.client}"/>
<copy todir="${install.client}" filtering="no">
@@ -380,7 +380,7 @@
</copy>
<copy file="${apache.log4j.lib}/snmpTrapAppender.jar"
tofile="${install.all.lib}/log4j-snmp-appender.jar">
- </copy>
+ </copy>
<!-- Copy thirdparty client code -->
<copy todir="${install.client}" filtering="no">
@@ -1053,7 +1053,7 @@
<fileset dir="${opennms.joesnmp.lib}">
<include name="joesnmp.jar"/>
</fileset>
- </copy>
+ </copy>
<!-- Include the JMX console war unpacked -->
<mkdir dir="${install.server}/all/deploy/jmx-console.war"/>
@@ -1447,6 +1447,19 @@
<include name="jboss-transaction-client.jar"/>
</fileset>
</copy>
+
+ <!-- copy binary release of JBossTS from thirdparty repo -->
+ <copy todir="${install.all.lib}" filtering="no">
+ <fileset dir="${project.thirdparty}/jboss/jbossts/lib/">
+ <include name="jbossjta.jar"/>
+ <include name="jbossjta-integration.jar"/>
+ <include name="jbossts-common.jar"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${install.all.conf}" filtering="no"
+ file="${project.thirdparty}/jboss/jbossts/resources/jbossjta-properties.xml"/>
+
</target>
<target name="_module-transaction-all" depends="_module-transaction-most">
@@ -1782,7 +1795,7 @@
<include name="xml-apis.jar"/>
<include name="xercesImpl.jar"/>
<include name="resolver.jar"/>
- </fileset>
+ </fileset>
</copy>
<!-- Copy thirdparty code to lib/endorsed -->
@@ -1798,7 +1811,7 @@
<include name="serializer.jar"/>
</fileset>
</copy>
-
+
<!-- Copy thirdparty code to server/all/lib -->
<copy todir="${install.all.lib}" filtering="no">
<fileset dir="${apache.logging.lib}">
@@ -1817,7 +1830,7 @@
<include name="wstools.*"/>
</patternset>
</unjar>
-
+
</target>
</project>
Modified: branches/JEE5_TCK/build/build-thirdparty.xml
===================================================================
--- branches/JEE5_TCK/build/build-thirdparty.xml 2006-11-01 05:01:48 UTC (rev 57960)
+++ branches/JEE5_TCK/build/build-thirdparty.xml 2006-11-01 11:47:50 UTC (rev 57961)
@@ -99,7 +99,8 @@
<componentref name="jboss/serialization" version="1.0.1.GA"/>
<componentref name="jboss/profiler/jvmti" version="1.0.0.CR5"/>
<componentref name="jboss/test" version="1.0.0.CR1"/>
- <componentref name="jboss/web" version="2.0.0.snapshot"/>
+ <componentref name="jboss/jbossts" version="snapshot"/>
+ <componentref name="jboss/web" version="2.0.0.snapshot"/>
<componentref name="jbpm" version="3.0.2"/>
<componentref name="jbpm-bpel" version="1.0.0.alpha4"/>
<componentref name="jfreechart" version="0.9.20"/>
Modified: branches/JEE5_TCK/iiop/src/etc/iiop-service.xml
===================================================================
--- branches/JEE5_TCK/iiop/src/etc/iiop-service.xml 2006-11-01 05:01:48 UTC (rev 57960)
+++ branches/JEE5_TCK/iiop/src/etc/iiop-service.xml 2006-11-01 11:47:50 UTC (rev 57961)
@@ -17,7 +17,7 @@
<!-- CorbaORBService MBean, as well as the CorbaTransactionService -->
<!-- MBean. You will also need to comment out (or set to false) the -->
<!-- attibute GlobalIdsEnabled of the TransactionManagerService MBean -->
-<!-- (in file conf/jboss-service.xml). -->
+<!-- (in file conf/jboss-service.xml). -->
<!-- -->
<!-- ===================================================================== -->
@@ -32,7 +32,7 @@
name="jboss.security:service=JaasSecurityDomain,domain=IIOP+SSL">
<constructor>
<arg type="java.lang.String" value="IIOP+SSL"/>
- </constructor>
+ </constructor>
<attribute name="KeyStoreURL">iiop-over-ssl.keystore</attribute>
<attribute name="KeyStorePass">iiop-over-ssl</attribute>
</mbean>
@@ -62,8 +62,10 @@
<initializer>org.jboss.tm.iiop.TxIORInterceptorInitializer</initializer>
<!-- comment out to disable null transaction propagation over IIOP -->
<initializer>org.jboss.tm.iiop.TxServerClientInterceptorInitializer</initializer>
- <!-- comment out to disable transaction demarcation over IIOP -->
+ <!-- comment out to disable transaction demarcation over IIOP
+ Note: for TX over IIOP support in 5.0, use JBossTS JTS instead.
<initializer>org.jboss.tm.iiop.TxServerInterceptorInitializer</initializer>
+ -->
<!-- comment out to disable the Security Attribute Service -->
<initializer>org.jboss.iiop.csiv2.SASInitializer</initializer>
</interceptor-initializers>
@@ -78,16 +80,16 @@
<!-- IIOP invoker -->
<!-- ==================================================================== -->
- <mbean code="org.jboss.invocation.iiop.IIOPInvoker"
+ <mbean code="org.jboss.invocation.iiop.IIOPInvoker"
name="jboss:service=invoker,type=iiop">
<depends>jboss:service=CorbaORB</depends>
</mbean>
-
+
<!-- ==================================================================== -->
<!-- CORBA naming service -->
<!-- ==================================================================== -->
- <mbean code="org.jboss.iiop.CorbaNamingService"
+ <mbean code="org.jboss.iiop.CorbaNamingService"
name="jboss:service=CorbaNaming">
<depends>jboss:service=CorbaORB</depends>
</mbean>
@@ -96,12 +98,15 @@
<!-- CORBA transaction service -->
<!-- ==================================================================== -->
- <!-- comment out to disable transaction demarcation over IIOP -->
- <mbean code="org.jboss.tm.iiop.CorbaTransactionService"
+ <!-- comment out to disable transaction demarcation over IIOP
+ Note: for TX over IIOP support in 5.0, use JBossTS JTS instead.
+ (http://labs.jboss.com/portal/jbosstm)
+ <mbean code="org.jboss.tm.iiop.CorbaTransactionService"
name="jboss:service=CorbaTransaction">
<depends>jboss:service=TransactionManager</depends>
<depends>jboss:service=CorbaORB</depends>
<depends>jboss:service=CorbaNaming</depends>
</mbean>
+ -->
</server>
Modified: branches/JEE5_TCK/server/src/etc/conf/default/jboss-service.xml
===================================================================
--- branches/JEE5_TCK/server/src/etc/conf/default/jboss-service.xml 2006-11-01 05:01:48 UTC (rev 57960)
+++ branches/JEE5_TCK/server/src/etc/conf/default/jboss-service.xml 2006-11-01 11:47:50 UTC (rev 57961)
@@ -139,20 +139,20 @@
| SubscriptionList
| - subscribe for the notifications to be stored in the table
- <mbean code="org.jboss.monitor.services.ActiveAlarmTable"
+ <mbean code="org.jboss.monitor.services.ActiveAlarmTable"
name="jboss.monitor:service=ActiveAlarmTable">
<attribute name="SubscriptionList">
<subscription-list>
<mbean name="jboss.monitor:*">
<notification type="jboss.alarm"/>
- <notification type="JBOSS_MONITOR_NOTIFICATION"/>
+ <notification type="JBOSS_MONITOR_NOTIFICATION"/>
</mbean>
<mbean name="jboss.system:service=Logging,type=JMXNotificationAppender"/>
</subscription-list>
</attribute>
</mbean>
-->
-
+
<!-- ==================================================================== -->
<!-- JBoss RMI Classloader - only install when available -->
<!-- ==================================================================== -->
@@ -277,7 +277,7 @@
-->
<attribute name="ServerMode">true</attribute>
<attribute name="SecurityManagerClassName">org.jboss.security.plugins.JaasSecurityManager</attribute>
- <attribute name="DefaultUnauthenticatedPrincipal">anonymous</attribute>
+ <attribute name="DefaultUnauthenticatedPrincipal">anonymous</attribute>
<!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
in seconds.
If you want to disable caching of security credentials, set this to 0 to
@@ -292,11 +292,11 @@
AuthenticationCacheJndiName has been changed from the default value.
-->
<attribute name="DefaultCacheResolution">60</attribute>
- </mbean>
+ </mbean>
<!-- Authorization manager-->
<mbean code="org.jboss.security.plugins.AuthorizationManagerService"
- name="jboss.security:service=AuthorizationManager">
+ name="jboss.security:service=AuthorizationManager">
<attribute name="AuthorizationManagerClassName">org.jboss.security.plugins.JBossAuthorizationManager</attribute>
</mbean>
@@ -309,7 +309,7 @@
<!--attribute name="Pad">true</attribute-->
</mbean>
- <!-- TM Recovery
+ <!-- TM Recovery. Obsolete, use JBossTS instead.
<mbean code="org.jboss.tm.recovery.XidFactoryInitializationService"
name="jboss:service=XidFactoryInitializer">
<depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
@@ -333,31 +333,28 @@
<!--
| The fast in-memory transaction manager.
- -->
+ | Deprecated in 5.0. Use JBossTS JTA instead.
<mbean code="org.jboss.tm.TransactionManagerService"
name="jboss:service=TransactionManager"
xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
<attribute name="TransactionTimeout">300</attribute>
<attribute name="XARetryTimeout">60</attribute>
<attribute name="PreparedTimeout">60</attribute>
- <!-- set to false to disable transaction demarcation over IIOP -->
<attribute name="GlobalIdsEnabled">true</attribute>
<depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
- <!-- depends optional-attribute-name="RecoveryLogger" proxy-type="org.jboss.tm.recovery.RecoveryLoggerInstance">jboss:service=RecoveryLogger</depends-->
-
- <!-- Transaction Integrity Checking -->
- <!-- Force a rollback if another thread is associated with the transaction at commit -->
- <!--depends optional-attribute-name="TransactionIntegrityFactory"
- proxy-type="org.jboss.tm.integrity.TransactionIntegrityFactory">
- <mbean code="org.jboss.tm.integrity.FailIncompleteTransaction"
- name="jboss:service=TransactionManager,plugin=TransactionIntegrity"/>
- </depends-->
</mbean>
+ -->
+ <!-- JBossTS JTA -->
+ <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
+ name="jboss:service=TransactionManager">
+ <attribute name="TransactionTimeout">300</attribute>
+ </mbean>
+
<!--
- | Old UserTransaction support.
- | Commented out as UserTransaction is now supported
- | by the distributed transaction manager (see below).
+ | UserTransaction support. Will be replaced by the DTM once
+ | the DTM is made to play nice with JBossTS.
+ -->
<mbean code="org.jboss.tm.usertx.server.ClientUserTransactionService"
name="jboss:service=ClientUserTransaction"
xmbean-dd="resource:xmdesc/ClientUserTransaction-xmbean.xml">
@@ -394,12 +391,12 @@
</mbean>
</depends>
</mbean>
- -->
<!--
| Distributed transaction manager.
| Includes support for UserTransaction over JBoss remoting.
- -->
+ | Works with the old in-memory tx manager, but not JBossTS.
+ | Hence disabled for now.
<mbean code="org.jboss.tm.remoting.server.DistributedTransactionManager"
name="jboss:service=DistributedTransactionManager">
<depends>jboss:service=TransactionManager</depends>
@@ -408,6 +405,7 @@
</depends-list>
<attribute name="InterpositionEnabled">false</attribute>
</mbean>
+ -->
<!-- ==================================================================== -->
<!-- Invokers to the JMX node -->
Modified: branches/JEE5_TCK/testsuite/src/main/org/jboss/test/jca/adapter/TestManagedConnection.java
===================================================================
--- branches/JEE5_TCK/testsuite/src/main/org/jboss/test/jca/adapter/TestManagedConnection.java 2006-11-01 05:01:48 UTC (rev 57960)
+++ branches/JEE5_TCK/testsuite/src/main/org/jboss/test/jca/adapter/TestManagedConnection.java 2006-11-01 11:47:50 UTC (rev 57961)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.test.jca.adapter;
+package org.jboss.test.jca.adapter;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -53,7 +53,7 @@
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
* @version <tt>$Revision$</tt>
*/
-public class TestManagedConnection implements ManagedConnection, XAResource, LocalTransaction
+public class TestManagedConnection implements ManagedConnection, XAResource, LocalTransaction
{
public static final String STARTED = "STARTED";
public static final String SUSPENDED = "SUSPENDED";
@@ -64,9 +64,9 @@
public static final String LOCAL_TRANSACTION = "LOCAL_TRANSACTION";
public static final String LOCAL_COMMITTED = "LOCAL_COMMITTED";
public static final String LOCAL_ROLLEDBACK = "LOCAL_ROLLEDBACK";
-
+
private final int id;
-
+
private Logger log = Logger.getLogger(getClass());
private TestManagedConnectionFactory mcf;
private HashSet handles = new HashSet();
@@ -79,11 +79,11 @@
private boolean failInPrepare = false;
private boolean failInCommit = false;
private static boolean failInStart = false;
-
+
private static int xaCode;
-
+
private String localState = LOCAL_NONE;
-
+
public static void setFailInStart(boolean fis, int xa)
{
failInStart = fis;
@@ -94,7 +94,7 @@
this.mcf = mcf;
this.id = id;
}
-
+
void setFailInPrepare(final boolean fail, final int xaCode)
{
this.failInPrepare = fail;
@@ -122,7 +122,7 @@
public synchronized void cleanup() throws ResourceException
{
log.info("cleanup: " + this +" handles=" + handles);
-
+
checkDestroyedResourceException();
for (Iterator i = handles.iterator(); i.hasNext(); )
{
@@ -135,7 +135,7 @@
public synchronized Object getConnection(Subject param1, ConnectionRequestInfo param2) throws ResourceException
{
log.info("getConnection " + this);
-
+
checkDestroyedResourceException();
if (param2 != null && ((TestConnectionRequestInfo) param2).failure.equals("getConnectionResource"))
@@ -153,14 +153,14 @@
checkDestroyedResourceException();
- if (p instanceof TestConnection)
+ if (p instanceof TestConnection)
{
((TestConnection)p).setMc(this);
handles.add(p);
}
else
{
- throw new ResourceException("wrong kind of Connection " + p);
+ throw new ResourceException("wrong kind of Connection " + p);
}
}
@@ -208,7 +208,7 @@
long sleepInStart = mcf.getSleepInStart();
if (flags == TMNOFLAGS && sleepInStart != 0)
doSleep(sleepInStart);
-
+
synchronized (this)
{
if(failInStart)
@@ -217,7 +217,7 @@
broadcastConnectionError(xaex);
throw new XAException(xaCode + "for" + this);
}
-
+
GlobalXID gid = new GlobalXID(xid);
String flagString = TxUtils.getXAResourceFlagsAsString(flags);
log.info("start with xid=" + gid + " flags=" + flagString + " for " + this);
@@ -226,9 +226,9 @@
synchronized (xids)
{
String state = (String) xids.get(gid);
- if (state == null && flags != TMNOFLAGS)
+ if (state == null && flags != TMNOFLAGS)
throw new XAException("Invalid start state=" + state + " xid=" + gid + " flags=" + flagString + " for " + this);
- if (state != null && state != SUSPENDED && state != ENDED
+ if (state != null && state != SUSPENDED && state != ENDED
&& (state != STARTED || ((flags & TMJOIN) == 0))
&& (state != STARTED || ((flags & TMRESUME) == 0))
)
@@ -247,13 +247,13 @@
long sleepInEnd = mcf.getSleepInEnd();
if (flags != TMSUCCESS && sleepInEnd != 0)
doSleep(sleepInEnd);
-
+
synchronized (this)
{
GlobalXID gid = new GlobalXID(xid);
String flagString = TxUtils.getXAResourceFlagsAsString(flags);
log.info("end with xid=" + gid + " flags=" + flagString + " for " + this);
- checkDestroyedXAException();
+ // checkDestroyedXAException(); (check is broken, don't use with JBossTS)
Map xids = getXids();
synchronized (xids)
{
@@ -275,7 +275,7 @@
GlobalXID gid = new GlobalXID(xid);
log.info("commit with xid=" + gid + " onePhase=" + onePhase + " for " + this);
checkDestroyedXAException();
- if (failInCommit)
+ if (failInCommit)
throw new XAException(xaCode + " for " + this);
Map xids = getXids();
synchronized (xids)
@@ -321,7 +321,7 @@
String state = (String) xids.get(gid);
if (state != SUSPENDED && state != ENDED)
throw new XAException("Invalid prepare state=" + state + " xid=" + gid + " " + this);
- if (failInPrepare)
+ if (failInPrepare)
throw new XAException(xaCode + " for " + this);
xids.put(gid, PREPARED);
return XA_OK;
@@ -367,12 +367,12 @@
{
return localState;
}
-
+
public void begin() throws ResourceException
{
localState = LOCAL_TRANSACTION;
}
-
+
public void sendBegin() throws ResourceException
{
begin();
@@ -396,11 +396,11 @@
{
localState = LOCAL_COMMITTED;
}
-
+
public void sendCommit() throws ResourceException
{
commit();
-
+
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
Collection copy = new ArrayList(listeners);
for (Iterator i = copy.iterator(); i.hasNext(); )
@@ -421,11 +421,11 @@
{
localState = LOCAL_ROLLEDBACK;
}
-
+
public void sendRollback() throws ResourceException
{
rollback();
-
+
ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);
Collection copy = new ArrayList(listeners);
for (Iterator i = copy.iterator(); i.hasNext(); )
@@ -452,12 +452,12 @@
{
return mcf.getXids();
}
-
+
void connectionClosed(TestConnection handle)
{
if (destroyed.get())
return;
-
+
log.info("Connetion closed handle=" + handle + " for " + this);
ConnectionEvent ce = new ConnectionEvent(this ,ConnectionEvent.CONNECTION_CLOSED);
@@ -486,7 +486,7 @@
{
if(destroyed.get())
return;
-
+
Exception ex = null;
if (e instanceof Exception)
ex = (Exception) e;
@@ -515,9 +515,9 @@
{
if (destroyed.get())
return;
-
+
log.info("Connetion error handle=" + handle + " for " + this, e);
-
+
ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, e);
ce.setConnectionHandle(handle);
Collection copy = new ArrayList(listeners);
@@ -545,7 +545,7 @@
if (destroyed.get())
throw new XAException("Already destroyed " + this);
}
-
+
public synchronized String toString()
{
StringBuffer buffer = new StringBuffer();
@@ -571,13 +571,13 @@
if (interrupted)
Thread.currentThread().interrupt();
}
-
+
public class GlobalXID
{
byte[] gid;
int hashCode;
String toString;
-
+
public GlobalXID(Xid xid)
{
gid = xid.getGlobalTransactionId();
@@ -586,17 +586,17 @@
hashCode += 37 * gid[i];
toString = new String(gid).trim();
}
-
+
public int hashCode()
{
return hashCode;
}
-
+
public String toString()
{
return toString;
}
-
+
public boolean equals(Object obj)
{
if (obj == null || obj instanceof GlobalXID == false)
More information about the jboss-cvs-commits
mailing list