Examples of TxTester


Examples of org.jboss.ejb3.test.iiop.TxTester

  
   public void testTxPropegation() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("TxTesterBean/remote");
      TxTester session = (TxTester) PortableRemoteObject.narrow(obj, TxTester.class);
      assertNotNull(session);
      UserTransaction tx;
      try
      {
         tx = (UserTransaction) PortableRemoteObject.narrow(ctx.lookup("UserTransaction"), UserTransaction.class);
      }
      catch(NameNotFoundException e)
      {
         log.warn("Corba Transaction Service is not installed (not available with Arjuna, only with JBossTS)");
         return;
      }
      tx.begin();
      try
      {
         session.txMandatoryMethod();
      }
      finally
      {
         tx.rollback();
      }
View Full Code Here

Examples of org.jboss.ejb3.test.iiop.TxTester

   public void testTxRequired() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("TxTesterBean/remote");
      TxTester session = (TxTester) PortableRemoteObject.narrow(obj, TxTester.class);
      assertNotNull(session);
      try
      {
         session.txMandatoryMethod();
         fail("Expected an exception");
      }
      catch(Exception e)
      {
         //fail("TODO: check exception");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.