Examples of serviceConnectionManager()


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

    {
        super.setUp();


        PersistenceBroker pb = PersistenceBrokerFactory.defaultPersistenceBroker();
        platform = pb.serviceConnectionManager().getSupportedPlatform();
        if (skipTest()) return;
        Connection con;
        Statement stmt;

        try
View Full Code Here

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

        Connection con;
        Statement stmt;

        try
        {
            con = pb.serviceConnectionManager().getConnection();
            stmt = con.createStatement();
            if(platform instanceof PlatformMySQLImpl)
            {
                stmt.execute(CREATE_MYSQL);
            }
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();
            stmt.execute(DROP);
            stmt.close();

            stmt = con.createStatement();
View Full Code Here

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

        // 3. Get a list of some articles
        TransactionExt tx = (TransactionExt) odmg.newTransaction();
        tx.begin();
        PersistenceBroker broker = tx.getBroker();

        Connection conn = broker.serviceConnectionManager().getConnection();
        /**
         * only execute this test if scrolling is supported.
         */
        if(!conn.getMetaData()
                .supportsResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE))
View Full Code Here

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

        {
            PersistenceBroker broker = null;
            try
            {
                broker = PersistenceBrokerFactory.defaultPersistenceBroker();
                broker.serviceConnectionManager().setBatchMode(true);
                broker.beginTransaction();
                for (int i = 0; i < arr.length; i++)
                {
                    broker.store(arr[i], ObjectModification.INSERT);
                }
View Full Code Here

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

        {
            PersistenceBroker broker = null;
            try
            {
                broker = PersistenceBrokerFactory.defaultPersistenceBroker();
                broker.serviceConnectionManager().setBatchMode(true);
                broker.beginTransaction();
                for (int i = 0; i < arr.length; i++)
                {
                    broker.store(arr[i], ObjectModification.UPDATE);
                    // broker.store(arr[i]);
View Full Code Here

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

        public void deleteArticles(PerfArticle[] arr) throws Exception
        {
            PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
            try
            {
                broker.serviceConnectionManager().setBatchMode(true);
                broker.beginTransaction();
                for (int i = 0; i < arr.length; i++)
                {
                    broker.delete(arr[i]);
                }
View Full Code Here

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

                /*
                persistent object descriptor doesn't has a sequence name
                and autoNaming is false --> expect an exception
                */
                SMAutoNaming obj = new SMAutoNaming("testAutoNaming_1");
                sd = broker.serviceConnectionManager().getConnectionDescriptor().getSequenceDescriptor();
                assertTrue("false".equals(sd.getAttribute("autoNaming")));

                broker.beginTransaction();
                broker.store(obj);
                broker.commitTransaction();
View Full Code Here

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

        SequenceManager sm = broker.serviceSequenceManager();
        int seqGrabSize = 0;
        // we need the SM grab size
        if (sm instanceof SequenceManagerSeqHiLoImpl || sm instanceof SequenceManagerHighLowImpl)
        {
            SequenceDescriptor sd = broker.serviceConnectionManager().getConnectionDescriptor().getSequenceDescriptor();
            String strSize = sd.getAttribute(SequenceManagerHighLowImpl.PROPERTY_GRAB_SIZE);
            if (strSize != null)
            {
                seqGrabSize = new Integer(strSize).intValue();
            }
View Full Code Here

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

     * 'TestObjectEmptyCache' instance.
     */
    public void testPerClassCache() throws Exception
    {
        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        JdbcConnectionDescriptor jcd = broker.serviceConnectionManager().getConnectionDescriptor();
        if(jcd.getObjectCacheDescriptor().getObjectCache().equals(ObjectCacheEmptyImpl.class))
        {
            ojbSkipTestMessage("Doesn't work with " + ObjectCacheEmptyImpl.class + " as default cache.");
            return;
        }
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.