Package org.jboss.test.xa.interfaces

Examples of org.jboss.test.xa.interfaces.XATest


            throw e;
        }

         // sed kicks ass
        System.out.print(++test+"- "+"Creating an the XATest bean...");
        XATest bean;
        try {
            bean = home.create();
            if(bean == null) throw new Exception("No Bean!");
            log.debug("OK");
        } catch (Exception e) {
             // sed kicks ass
            log.debug("Could not create the bean!");
            log.debug("Check the server trace for details");
            log.debug("failed", e);


            throw e;
        }

         // sed kicks ass
        System.out.print(++test+"- "+"Creating required tables...");
        try {
            bean.createTables();
            log.debug("OK");
        }
        catch (Exception e) {
            log.debug("\nFailed to create tables");
            throw e;
        }

         // sed kicks ass
        System.out.print(++test+"- "+"Clearing any old data...");
        try {
            bean.clearData();
            log.debug("OK");
        } catch(Exception e) {
             // sed kicks ass
            log.debug("Could not clear the data: did you create the table in both data sources?");
            log.debug("CREATE TABLE XA_TEST(ID INTEGER NOT NULL PRIMARY KEY, DATA INTEGER NOT NULL)");

            throw e;
        }

         // sed kicks ass
        System.out.print(++test+"- "+"Testing DB connections...");
        try {
            bean.doWork();
            log.debug("OK");
        } catch(CantSeeDataException e) {
            log.debug("sort of worked.");
            log.debug(e.getMessage());
        } catch(Exception e) {
View Full Code Here

TOP

Related Classes of org.jboss.test.xa.interfaces.XATest

Copyright © 2018 www.massapicom. 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.