Package org.exolab.castor.jdo.transactionmanager

Examples of org.exolab.castor.jdo.transactionmanager.TransactionManagerAcquireException


            webSphereTxMgr = Class.forName( "com.ibm.ejcs.jts.jta.JTSXA" );
            method = webSphereTxMgr.getMethod( "getTransactionManager", null );
            _transactionManager = ( TransactionManager ) method.invoke( webSphereTxMgr, null );
        }
        catch( ClassNotFoundException cnfe ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", cnfe.getMessage()), cnfe );
        }
        catch( IllegalAccessException iae ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", iae.getMessage()), iae );
        }
        catch( InvocationTargetException ite ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", ite.getMessage()), ite );
        }
        catch( NoSuchMethodException nsme ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", nsme.getMessage()), nsme );
        }

        return _transactionManager;
    }
View Full Code Here


            webSphereTxMgrFactory = Class.forName (FACTORY_CLASS_NAME);
            method = webSphereTxMgrFactory.getMethod(FACTORY_METHOD_NAME, null );
            _transactionManager = (TransactionManager) method.invoke(webSphereTxMgrFactory, null );
        }
        catch( ClassNotFoundException cnfe ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", cnfe.getMessage() ) );
        }
        catch( IllegalAccessException iae ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", iae.getMessage() ) );
        }
        catch( InvocationTargetException ite ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", ite.getMessage() ) );
        }
        catch( NoSuchMethodException nsme ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", nsme.getMessage() ) );
        }

        return _transactionManager;
    }
View Full Code Here

            String jndiENC = params.getProperty("jndiEnc", TRANSACTION_MANAGER_NAME );
            objectFound = context.lookup(jndiENC);
            _transactionManager = (TransactionManager) objectFound; 
        }
        catch (ClassCastException e) {
          throw new TransactionManagerAcquireException (Messages.format (
            "jdo.transaction.unableToCastToTransactionManager", objectFound.getClass().getName()), e);
        }
        catch (NoInitialContextException e) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", e.getMessage()), e);
        }
        catch (NameNotFoundException e) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", e.getMessage()), e);
        }
        catch (Exception e) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", e.getMessage()), e);
        }

        return _transactionManager;
    }
View Full Code Here

            webSphereTxMgr = Class.forName( "com.ibm.ejcs.jts.jta.JTSXA" );
            method = webSphereTxMgr.getMethod( "instance", null );
            _transactionManager = ( TransactionManager ) method.invoke( webSphereTxMgr, null );
        }
        catch( ClassNotFoundException cnfe ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", cnfe.getMessage()), cnfe);
        }
        catch( IllegalAccessException iae ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", iae.getMessage()), iae );
        }
        catch( InvocationTargetException ite ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", ite.getMessage()), ite );
        }
        catch( NoSuchMethodException nsme ) {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", nsme.getMessage()), nsme );
        }

        return _transactionManager;
    }
View Full Code Here

            method = webSphereTxMgr.getMethod( "getTransactionManager", null );
            _txMgr = ( TransactionManager ) method.invoke( webSphereTxMgr, null );
        }
        catch( ClassNotFoundException cnfe )
        {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", cnfe.getMessage() ) );
        }
        catch( IllegalAccessException iae )
        {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", iae.getMessage() ) );
        }
        catch( InvocationTargetException ite )
        {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", ite.getMessage() ) );
        }
        catch( NoSuchMethodException nsme )
        {
            throw new TransactionManagerAcquireException( Messages.format(
                "jdo.transaction.unableToAcquireTransactionManager", nsme.getMessage() ) );
        }

        return _txMgr;
    }
View Full Code Here

TOP

Related Classes of org.exolab.castor.jdo.transactionmanager.TransactionManagerAcquireException

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.