djencks 2004/10/28 17:21:34
Modified: modules/core/src/test/org/openejb/transaction
ContainerPolicyTest.java
Added: modules/core/src/test/org/openejb/transaction
MockTransaction.java MockTransactionManager.java
Log:
Move the deployment classes ***ContainerBuilder to deployment. Drag most ofthe
testsuite along with them. Don't you wish we were on svn?
Revision Changes Path
1.4 +1 -2
openejb/modules/core/src/test/org/openejb/transaction/ContainerPolicyTest.java
Index: ContainerPolicyTest.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/test/org/openejb/transaction/ContainerPolicyTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ContainerPolicyTest.java 5 Oct 2004 07:04:05 -0000 1.3
+++ ContainerPolicyTest.java 28 Oct 2004 21:21:34 -0000 1.4
@@ -60,7 +60,6 @@
import org.openejb.EJBInvocation;
import org.openejb.EJBInvocationImpl;
import org.openejb.EJBInterfaceType;
-import org.openejb.MockTransactionManager;
/**
*
1.1
openejb/modules/core/src/test/org/openejb/transaction/MockTransaction.java
Index: MockTransaction.java
===================================================================
/* ====================================================================
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided
* that the following conditions are met:
*
* 1. Redistributions of source code must retain copyright
* statements and notices. Redistributions must also contain a
* copy of this document.
*
* 2. Redistributions in binary form must reproduce this list of
* conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name "OpenEJB" must not be used to endorse or promote
* products derived from this Software without prior written
* permission of The OpenEJB Group. For written permission,
* please contact [EMAIL PROTECTED]
*
* 4. Products derived from this Software may not be called "OpenEJB"
* nor may "OpenEJB" appear in their names without prior written
* permission of The OpenEJB Group. OpenEJB is a registered
* trademark of The OpenEJB Group.
*
* 5. Due credit should be given to the OpenEJB Project
* (http://openejb.org/).
*
* THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the OpenEJB Project. For more information
* please see <http://openejb.org/>.
*
* ====================================================================
*/
package org.openejb.transaction;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.RollbackException;
import javax.transaction.Status;
import javax.transaction.Synchronization;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import javax.transaction.xa.XAResource;
/**
*
*
* @version $Revision: 1.1 $ $Date: 2004/10/28 21:21:34 $
*/
public class MockTransaction implements Transaction {
public void commit() throws HeuristicMixedException, HeuristicRollbackException,
RollbackException, SecurityException, SystemException {
}
public boolean delistResource(XAResource xaResource, int i) throws
IllegalStateException, SystemException {
return false;
}
public boolean enlistResource(XAResource xaResource) throws
IllegalStateException, RollbackException, SystemException {
return false;
}
public int getStatus() throws SystemException {
return Status.STATUS_NO_TRANSACTION;
}
public void registerSynchronization(Synchronization synchronization) throws
IllegalStateException, RollbackException, SystemException {
}
public void rollback() throws IllegalStateException, SystemException {
}
public void setRollbackOnly() throws IllegalStateException, SystemException {
}
}
1.1
openejb/modules/core/src/test/org/openejb/transaction/MockTransactionManager.java
Index: MockTransactionManager.java
===================================================================
/* ====================================================================
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided
* that the following conditions are met:
*
* 1. Redistributions of source code must retain copyright
* statements and notices. Redistributions must also contain a
* copy of this document.
*
* 2. Redistributions in binary form must reproduce this list of
* conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name "OpenEJB" must not be used to endorse or promote
* products derived from this Software without prior written
* permission of The OpenEJB Group. For written permission,
* please contact [EMAIL PROTECTED]
*
* 4. Products derived from this Software may not be called "OpenEJB"
* nor may "OpenEJB" appear in their names without prior written
* permission of The OpenEJB Group. OpenEJB is a registered
* trademark of The OpenEJB Group.
*
* 5. Due credit should be given to the OpenEJB Project
* (http://openejb.org/).
*
* THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the OpenEJB Project. For more information
* please see <http://openejb.org/>.
*
* ====================================================================
*/
package org.openejb.transaction;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.InvalidTransactionException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.Status;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import org.apache.geronimo.transaction.ExtendedTransactionManager;
import org.openejb.*;
/**
*
*
* @version $Revision: 1.1 $ $Date: 2004/10/28 21:21:34 $
*/
public class MockTransactionManager implements ExtendedTransactionManager {
private Transaction transaction = new org.openejb.deployment.MockTransaction();
public boolean committed;
public boolean rolledBack;
public void clear() {
committed = false;
rolledBack = false;
}
public void begin() throws NotSupportedException, SystemException {
}
public void commit() throws HeuristicMixedException, HeuristicRollbackException,
IllegalStateException, RollbackException, SecurityException, SystemException {
committed = true;
}
public int getStatus() throws SystemException {
return Status.STATUS_ACTIVE;
}
public Transaction getTransaction() throws SystemException {
return transaction;
}
public void resume(Transaction tobj) throws IllegalStateException,
InvalidTransactionException, SystemException {
}
public void rollback() throws IllegalStateException, SecurityException,
SystemException {
rolledBack = true;
}
public void setRollbackOnly() throws IllegalStateException, SystemException {
}
public void setTransactionTimeout(int seconds) throws SystemException {
}
public Transaction suspend() throws SystemException {
return null;
}
public Transaction begin(long transactionTimeoutMilliseconds) throws
NotSupportedException, SystemException {
return transaction;
}
}