Forum Stats

  • 3,770,000 Users
  • 2,253,045 Discussions
  • 7,875,263 Comments

Discussions

Can I forcibly close Enviornment without commit or abort opened Transaction

527078
527078 Member Posts: 33
edited Sep 14, 2006 9:48AM in Berkeley DB Java Edition
Hi,

1. Is it possible to close (forcibly) an Enviornment without commit or abort a opened Transaction ?

2. com.sleepycat.je.DatabaseException: (JE 3.0.12) Can't close Database: Database state must not be DbState.CLOSED. Why i'm getting this exception ?

Thanks in advance.

reddy.

Comments

  • Charles Lamb
    Charles Lamb Member Posts: 836
    Hi Reddy,

    Could you please give me the exact stack trace? Thanks.

    Charles Lamb
  • 527078
    527078 Member Posts: 33
    Hi Charles,

    When i got the below exception i'm unable to release the Enviornment. [ In my application i need to swap from one Enviornment to another Enviornment ]. It's not releasing the lock on Enviornment.


    17:46:28,155 WARN [JBossManagedConnectionPool] Destroying connection that could not be successfully matched: org.jboss.resource.[email protected]10713e3[state=NORMAL [email protected] handles=0 lastUse=1158236185532 permit=false trackByTx=false mcp=org.jbos[email protected]f09710 context=org[email protected]14db697 xaResource=org.jboss[email protected]10e838f txSync=null]
    17:46:28,245 WARN [JBossManagedConnectionPool] Exception destroying ManagedConnection org.jboss.resource.[email protected]10713e3[state=DESTROYED [email protected] handles=0 lastUse=1158236185532 permit=false trackByTx=false mcp=org.jbos[email protected]f09710 context=org[email protected]14db697 xaResource=org.jboss[email protected]10e838f txSync=null]
    javax.resource.ResourceException: com.sleepycat.je.DatabaseException: (JE 3.0.12) There is 1 existing transaction opened against the Environment.
    Aborting open transactions ...

    at com.sleepycat.je.jca.ra.JEManagedConnection.destroy(JEManagedConnection.java:190)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:570)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
    at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:454)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:324)
    at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:301)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:379)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
    at com.sleepycat.je.jca.ra.JEConnectionFactoryImpl.getConnection(JEConnectionFactoryImpl.java:56)
    at com.sleepycat.je.jca.ra.JEConnectionFactoryImpl.getConnection(JEConnectionFactoryImpl.java:43)
    at com.travelgator.util.BerkelyDBUtil.getConnection(BerkelyDBUtil.java:203)
    at com.travelgator.command.admin.BuildLuceneIndexCommand.executeRequest(BuildLuceneIndexCommand.java:106)
    at com.travelgator.command.BaseCommand.execute(BaseCommand.java:82)
    at com.travelgator.services.lucene.IndexControllerEJB.processRequest(IndexControllerEJB.java:102)


    Thanks,

    Reddy,
  • Charles Lamb
    Charles Lamb Member Posts: 836
    Hi Reddy,

    It looks like there's another thread with an open transaction operating against that environment. Do you know if that's possible? If so, you'll have to close that transaction before you can close the environment.

    Charles Lamb
This discussion has been closed.