Examples of serviceConnectionManager()


Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

        Statement stmt;

        PersistenceBroker pb = PersistenceBrokerFactory.defaultPersistenceBroker();
        try
        {
            con = pb.serviceConnectionManager().getConnection();
            stmt = con.createStatement();
            try
            {
                if(platform instanceof PlatformMySQLImpl)
                {
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

        Connection con;
        Statement stmt;
        PersistenceBroker pb = PersistenceBrokerFactory.defaultPersistenceBroker();
        try
        {
            con = pb.serviceConnectionManager().getConnection();

            stmt = con.createStatement();
            if(platform instanceof PlatformMySQLImpl)
            {
                stmt.execute(DROP_CONSTRAINT_MYSQL);
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

        ConnectionRepository cr = MetadataManager.getInstance().connectionRepository();
        PBKey connKey = cr.getStandardPBKeyForJcdAlias( "pv" );
        PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker( connKey );
        broker.beginTransaction();
        try {
            conn = broker.serviceConnectionManager().getConnection();
        } catch (LookupException ex) {
            ex.printStackTrace();
        }
    }
}
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

       
        // Check whether the database was opened correctly
        try {
            PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker(connKey);
            broker.beginTransaction();
            Connection con = broker.serviceConnectionManager().getConnection();
            broker.commitTransaction();
            broker.close();
        } catch (Exception ex) {
            /*
             Finding the real reason for the error needs a bit of guesswork: first
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

       
        // Alter tables to match corrent schema
        PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker( connKey );
        broker.beginTransaction();
        try {
            Connection con = broker.serviceConnectionManager().getConnection();
            /*
             TODO:
             Derby alter table statements created by DdlUtils have wrong syntax.
             Luckily we do not need to do such modifications for now. There is
             error report for DdlUtils (http://issues.apache.org/jira/browse/DDLUTILS-53),
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

     * perform commit on all tx-states
     */
    public void commit() throws TransactionAbortedException, LockNotGrantedException
    {
        PersistenceBroker broker = transaction.getBroker();
        ConnectionManagerIF connMan = broker.serviceConnectionManager();
        boolean saveBatchMode = connMan.isBatchMode();

        try
        {
            if (log.isDebugEnabled())
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

        Statement stmt;

        PersistenceBroker pb = PersistenceBrokerFactory.defaultPersistenceBroker();
        try
        {
            con = pb.serviceConnectionManager().getConnection();
            stmt = con.createStatement();
            try
            {
                if(platform instanceof PlatformMySQLImpl)
                {
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

        Connection con;
        Statement stmt;
        PersistenceBroker pb = PersistenceBrokerFactory.defaultPersistenceBroker();
        try
        {
            con = pb.serviceConnectionManager().getConnection();

            stmt = con.createStatement();
            if(platform instanceof PlatformMySQLImpl)
            {
                stmt.execute(DROP_CONSTRAINT_MYSQL);
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

            if(log.isDebugEnabled())
            {
                log.debug("Do internal cleanup and close the internal used connection without" +
                        " closing the used broker");
            }
            ConnectionManagerIF cm = broker.serviceConnectionManager();
            if(cm.isInLocalTransaction())
            {
                /*
                arminw:
                in managed environment this call will be ignored because, the JTA transaction
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.serviceConnectionManager()

     * DB set <em>true</em>, else set <em>false</em> to improve performance.
     */
    public void writeObjects(boolean needsReusePrepare) throws TransactionAbortedException, LockNotGrantedException
    {
        PersistenceBroker broker = transaction.getBroker();
        ConnectionManagerIF connMan = broker.serviceConnectionManager();
        boolean saveBatchMode = connMan.isBatchMode();

        try
        {
            if (log.isDebugEnabled())
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.