Hello,

I'm Saving 9000 entries in blocks of circa. 10 entries in a HSQL DB. After 
circa. 10 broker.commitTransaction, i get one of the following two 
Exceptions  rotational by PersistenceBroker.commitTransaction()


2005-12-21 09:44:58,675 INFO   [main] ObjectCacheFactory M[info] - Start 
creating new ObjectCache instance
2005-12-21 09:44:58,675 INFO   [main] ObjectCacheFactory M[info] - 
Instantiate new org.apache.ojb.broker.cache.CacheDistributor for PB 
instance [EMAIL PROTECTED]
2005-12-21 09:44:58,675 INFO   [main] ObjectCacheFactory M[info] - New 
ObjectCache instance was created
2005-12-21 09:47:30,223 ERROR  [main] TeilestammBP 
M[importiereTeileInLager] - 
org.apache.ojb.broker.PersistenceBrokerException: Can't lookup a 
connection
2005-12-21 09:47:30,223 ERROR  [main] TeilestammBP 
M[importiereTeileInLager] - 
org.apache.ojb.broker.PersistenceBrokerException: Can't lookup a 
connection

OR

2005-12-21 10:20:29,910 INFO   [main] ObjectCacheFactory M[info] - Start 
creating new ObjectCache instance
2005-12-21 10:20:29,910 INFO   [main] ObjectCacheFactory M[info] - 
Instantiate new org.apache.ojb.broker.cache.CacheDistributor for PB 
instance [EMAIL PROTECTED]
2005-12-21 10:20:29,910 INFO   [main] ObjectCacheFactory M[info] - New 
ObjectCache instance was created
2005-12-21 10:28:20,607 ERROR  [main] StatementsForClassImpl M[error] - 
java.sql.SQLException: Connection is closed
2005-12-21 10:28:20,607 ERROR  [main] StatementsForClassImpl M[error] - 
java.sql.SQLException: Connection is closed


The store-method, i calling in a loop is:

    public void save(AbstractPersistenceObjectIfc[] persistenceObjects) {
        try {
            PersistenceBroker broker = 
PersistenceBrokerFactory.createPersistenceBroker(getConnectionDescriptor());;
            broker.beginTransaction();
            for (int i = 0; i < persistenceObjects.length; i++) {
                broker.store(persistenceObjects[i]);
            }
            broker.commitTransaction();
        } finally {
            if (broker != null && broker.isInTransaction()) {
                broker.abortTransaction();
            }
            if (broker != null && !broker.isClosed()) {
                broker.close();
            }
        }
    }

HSQL is Running in clientmode

Any proposals?

Thanks a lot

Josef Wagner (Germany)

Reply via email to