Multi thread and deadlocks

I am running dataload from a text file to MS SQL SRVR database. The jobs are running in multi thread mode. I am getting deadlock errors with threads.
each thread is supposed to delete records.
with single thread mode log file order is as below
1. get product to be deleted A
2. delete A
3. get product to be deleted B
4. delete B
5. get product to be deleted C
6 delete C
with multi thread mode
1. get product to be deleted A
2. get product to be deleted B
3. get product to be deleted C
4. get product to be deleted D
5. delete A
6. get product to be deleted E
7. get product to be deleted F
8. deadlock while deleteing the product B
Any clues what is going wrong here?
Here is the code for the delete method:
================================
PreparedStatement prepStatement = null;
System.out.println("get product to be deleted " + product);
prepStatement = conn.prepareStatement("delete from MYTABLE where product = ? ");
prepStatement.setString(1, product);
prepStatement.executeUpdate();
================================
Please note that only unique data is sent to each thread.
Any help is greatly appreciated.
Thanks

Thanks for the responses. I need to do update/insert new records after delete operation is completed. Later at the end of the db changes, i close the connection.
From my understanding deadlocks happen when both threads try to touch the same record same time. But, i am sending unique records for each thread. Unless these is somethign wrong with the query, it should always return unique values.
This is the query that sends unique records for each thread in sql srvr.
select distinct top ? columnA, columnB from MyTable where processed = 'FALSE' and columnB = ? "
This should be equivalent of oracle query
select distinct columnA, columnB from MyTable where columnB=? rownum > ? and rownum <= ?
if the top in sql srvr is equivalent to rownum in oracle then i always get distinct records and there should be no deadlocks.
Any help?
Thanks

Similar Messages

  • DBXML 2.4.16:  Accessing containers from multiple threads and deadlock

    Hi,
    I am evaluating dbxml for my upcoming project (http://xcapserver.sourceforge.net) where I am sending following four requests through multiples threads which gets into deadlock situation after running certain iterations. Can you please help me what am I doing wrong?
    1. Put Document
    2. Get Document
    3. Get Document Node (XPATH Query)
    4. Delete Document
    I am using following environment variables.
    u_int32_t env_flags = DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL |DB_INIT_TXN | DB_THREAD|DB_RECOVER| DB_AUTO_COMMIT; (I tried removing DB_AUTO_COMMIT)
    dbEnv_.open(dbxml_env.c_str(), env_flags, 0);
    XmlManager instance is initialized as :pxmlmgr_= new XmlManager(&dbEnv_) ;
    pxmlmgr_->setDefaultContainerType(DbXml::XmlContainer::WholedocContainer);
    NOTE: pxmlmgr_ instance is member variable of singleton class assuming XmlManager is thread safe and can be reused for all threads.
    Below is the psudo code. It is written in C++. I have removed exception handling and other code for clarity.
    getDocument (...){
    XmlTransaction containerTxn =pxmlmgr_->createTransaction();
              XmlContainer cont = pxmlmgr_->openContainer(container, DB_RDONLY|DB_THREAD);
              XmlDocument doc = cont.getDocument(document);
              containerTxn.commit();
              data = doc.getContent(data
    NOTE: To use doc(...) function, I have to create an alias than only I can use container name e.g /dbxml/resource-lists/users/rjoshi where /dbxml is env_home.
    container name: /dbxml/resource-lists/users/rjoshi (here rjoshi is container name)
    document name: presence
    getDocumentNode(...) {
    size_t npos = container.find_last_of("/", container.length());
              std::string alias = container.substr(npos+1, container.length()-npos) + "_" + document;
                   XCAP_DEBUG("Alias:" + alias);
                   std::string fullQuery = "doc('dbxml:" + alias + '/' + document + "')" + node;
                   XCAP_DEBUG("XPath Full Query:" + fullQuery);
                   XmlTransaction txn = pxmlmgr_->createTransaction();
                   XmlContainer cont = pxmlmgr_->openContainer(container, DB_RDONLY|DB_THREAD);
                   cont.addAlias(alias);
                   //query context
                   XmlQueryContext context = pxmlmgr_->createQueryContext();
              XmlResults results(pxmlmgr_->query(fullQuery, context ) );
                   cont.removeAlias(alias);
                   txn.commit();
    putDocument(....){
    size_t npos = container.find_last_of("/", container.length());
              std::string dir = container.substr(0, npos);
                   boost::filesystem::path p(dir);
                   if(!boost::filesystem::exists(p)) {
                        boost::filesystem::create_directories(p);
                   XmlTransaction txn = pxmlmgr_->createTransaction();
                   XmlContainer cont = pxmlmgr_->openContainer(container, DBXML_TRANSACTIONAL|DB_THREAD|DB_CREATE);
              XmlUpdateContext updateContext = pxmlmgr_->createUpdateContext();
                   cont.putDocument(document, data, updateContext, 0);
                   txn.commit();
    deleteDocument() {
    XmlTransaction txn = pxmlmgr_->createTransaction();
              XmlContainer cont = pxmlmgr_->openContainer(container, DB_THREAD);
              XmlUpdateContext updateContext = pxmlmgr_->createUpdateContext();
              cont.deleteDocument(document, updateContext);          
              txn.commit();
    }

    1. What platform are you on?
    rjoshi>>I am running on mac OSX 10.5.8
    2. There are still some potential coding issues here:
    2a. In DbXmlDb.hpp there is a DbEnv instance which is
    a member of your class. If using DbEnv as a data member
    it is usually best to use new/delete vs making it a member.
    rjoshi>>I have modified code to use new/delete
    2b. In DbXmlDB.cpp DBXML_ADOPT_DBENV is being used.
    DBXML_ADOPT_DBENV requires that DbEnv be created via
    new() as it calls delete() on it.
    rjoshi>> modified code to use new/delete
    2c. In general is it best not to open containers upon
    each use. Containers should be opened and shared among
    threads.
    rjoshi>> In real application, multiple devices (e.g IM, Phone) can read/write same document but it's not always the case so I don't want to open the container and keep in the memory. There is no way for me to know when to close the container. Is there any way to set flag where container can be open for certain duration and if not used, it will get closed and removed from memory?
    2d. Instead of using a transaction for opening containers
    use DBXML_TRANSACTIONAL|DB_THREAD. Also the use of
    DB_RDONLY in the read cases will not change anything significant
    as open instances are shared and the state of the first
    one is the only one that counts.
    rjoshi>> In init() function, I am setting default container flags as
    pxmlmgr_->setDefaultContainerFlags(DB_CREATE | DB_THREAD
                   | DBXML_TRANSACTIONAL);
    Do I still need to set these flags while opening the container?
    2e. The setting of DB_THREAD looks to be used inconsistently.
    It should be used all the time if the application is
    making use of threading.
    rjoshi>> Again I was setting default flag for container as below in the init() function so was not using it. I have corrected the inconsistency.
    pxmlmgr_->setDefaultContainerFlags(DB_CREATE | DB_THREAD
                   | DBXML_TRANSACTIONAL);
    2f. I can not tell for sure from looking at the cpp file,but
    just make sure that operation-based transactions are consistently
    passed in the application.
    rjoshi>> I have removed transactions while opening the container and using all other places.
    Still I am able to reproduce the deadlock. Please see the below output of db_state -CA.
    bash-3.2$ ./db_stat -h /dbxml/ENV -CA
    Default locking region information:
    3327     Last allocated locker ID
    0x7fffffff     Current maximum unused locker ID
    9     Number of lock modes
    1000     Maximum number of locks possible
    1000     Maximum number of lockers possible
    1000     Maximum number of lock objects possible
    39     Number of current locks
    143     Maximum number of locks at any one time
    75     Number of current lockers
    313     Maximum number of lockers at any one time
    12     Number of current lock objects
    26     Maximum number of lock objects at any one time
    6643     Total number of locks requested
    6560     Total number of locks released
    0     Total number of locks upgraded
    2166     Total number of locks downgraded
    531     Lock requests not available due to conflicts, for which we waited
    9     Lock requests not available due to conflicts, for which we did not wait
    0     Number of deadlocks
    0     Lock timeout value
    0     Number of locks that have timed out
    0     Transaction timeout value
    0     Number of transactions that have timed out
    464KB     The size of the lock region
    60     The number of region locks that required waiting (0%)
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Lock REGINFO information:
    Lock     Region type
    7     Region ID
    /dbxml/ENV/__db.007     Region name
    0xf000     Original region address
    0xf000     Region address
    0xf044     Region primary address
    0     Region maximum allocation
    0     Region allocated
    Region allocations: 3005 allocations, 0 failures, 0 frees, 1 longest
    REGION_JOIN_OK     Region flags
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Lock region parameters:
    786457     Lock region region mutex [60/23741 0% 12394/0]
    1031     locker table size
    1031     object table size
    436     obj_off
    45860     locker_off
    1     need_dd
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Lock conflict matrix:
    0     0     0     0     0     0     0     0     0     
    0     0     1     0     1     0     1     0     1     
    0     1     1     1     1     1     1     1     1     
    0     0     0     0     0     0     0     0     0     
    0     1     1     0     0     0     0     1     1     
    0     0     1     0     0     0     0     0     1     
    0     1     1     0     0     0     0     1     1     
    0     0     1     0     1     0     1     0     0     
    0     1     1     0     1     1     1     0     1     
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Locks grouped by lockers:
    Locker Mode Count Status ----------------- Object ---------------
    c3e dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    c3e READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 2
    c41 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c42 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    c42 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 4
    c45 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c46 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    c46 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 6
    c49 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c4a dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    c4a READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 8
    c4d dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c4e dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    c4e READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 10
    c51 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c52 dd= 0 locks held 2 write locks 0 pid/thread 12389/0
    c52 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 12
    c52 READ 6 HELD /dbxml/resource-lists/users/rjoshi handle 0
    c55 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c59 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    c59 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 14
    c5c dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c5d dd= 0 locks held 2 write locks 0 pid/thread 12389/0
    c5d READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 16
    c5d READ 2 HELD /dbxml/resource-lists/users/rjoshi handle 0
    c60 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000325 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000326 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    80000326 WRITE 1 WAIT /dbxml/resource-lists/users/rjoshi page 13
    80000326 READ 2 HELD /dbxml/resource-lists/users/rjoshi page 11
    80000327 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c8e dd= 0 locks held 2 write locks 0 pid/thread 12389/0
    c8e READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 18
    c8e READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 0
    80000328 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    80000328 WRITE 1 WAIT /dbxml/resource-lists/users/rjoshi page 13
    80000328 READ 2 HELD /dbxml/resource-lists/users/rjoshi page 11
    8000032a dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c91 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    8000032b dd= 0 locks held 3 write locks 1 pid/thread 12389/0
    8000032b WRITE 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    8000032b READ 7 HELD /dbxml/resource-lists/users/rjoshi page 13
    8000032b WRITE 14 HELD /dbxml/resource-lists/users/rjoshi page 13
    8000032b READ 3 HELD /dbxml/resource-lists/users/rjoshi page 11
    8000032c dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    8000032c READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    c93 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    8000032d dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c94 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    8000032e dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    8000032e READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    c95 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    8000032f dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000330 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000330 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    80000331 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000332 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000332 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    c99 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    c99 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 2
    80000333 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000333 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    80000334 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000334 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    80000335 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    c9c dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000336 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    80000336 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    c9d dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    c9d READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 4
    ca0 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    ca1 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    ca1 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 6
    ca4 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    ca5 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    ca5 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 8
    ca8 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    ca9 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    ca9 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 10
    cac dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cad dd= 0 locks held 2 write locks 0 pid/thread 12389/0
    cad READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 12
    cad READ 6 HELD /dbxml/resource-lists/users/rjoshi handle 0
    cb0 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cb4 dd= 0 locks held 1 write locks 0 pid/thread 12389/0
    cb4 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 14
    cb7 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cb8 dd= 0 locks held 2 write locks 0 pid/thread 12389/0
    cb8 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 16
    cb8 READ 2 HELD /dbxml/resource-lists/users/rjoshi handle 0
    cbb dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    ce9 dd= 0 locks held 2 write locks 0 pid/thread 12389/0
    ce9 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 18
    ce9 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 0
    cec dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    ced dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cee dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cef dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf0 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf1 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf2 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf3 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf4 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf5 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf6 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf7 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf8 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cf9 dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cfa dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cfb dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cfc dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cfd dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cfe dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    cff dd= 0 locks held 0 write locks 0 pid/thread 12389/0
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Locks grouped by object:
    Locker Mode Count Status ----------------- Object ---------------
    80000326 READ 2 HELD /dbxml/resource-lists/users/rjoshi page 11
    80000328 READ 2 HELD /dbxml/resource-lists/users/rjoshi page 11
    8000032b READ 3 HELD /dbxml/resource-lists/users/rjoshi page 11
    8000032b WRITE 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    8000032c READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    8000032e READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    80000330 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    80000332 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    80000333 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    80000334 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    80000336 READ 1 WAIT /dbxml/resource-lists/users/rjoshi page 11
    c4e READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 10
    ca9 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 10
    c4a READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 8
    ca5 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 8
    c59 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 14
    cb4 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 14
    8000032b WRITE 14 HELD /dbxml/resource-lists/users/rjoshi page 13
    8000032b READ 7 HELD /dbxml/resource-lists/users/rjoshi page 13
    80000328 WRITE 1 WAIT /dbxml/resource-lists/users/rjoshi page 13
    80000326 WRITE 1 WAIT /dbxml/resource-lists/users/rjoshi page 13
    c52 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 12
    cad READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 12
    c3e READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 2
    c99 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 2
    c52 READ 6 HELD /dbxml/resource-lists/users/rjoshi handle 0
    c5d READ 2 HELD /dbxml/resource-lists/users/rjoshi handle 0
    c8e READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 0
    cad READ 6 HELD /dbxml/resource-lists/users/rjoshi handle 0
    cb8 READ 2 HELD /dbxml/resource-lists/users/rjoshi handle 0
    ce9 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 0
    c46 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 6
    ca1 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 6
    c42 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 4
    c9d READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 4
    c8e READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 18
    ce9 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 18
    c5d READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 16
    cb8 READ 1 HELD /dbxml/resource-lists/users/rjoshi handle 16

  • Struck thread and deadlock

    Hi All,
    We are getting following error. what is the cause for the below issue.
    ####<Mar 20, 2010 9:09:46 AM AST> <Alert> <Log Management> <pappsa04> <sau1_81pappsa04> <ExecuteThread: '1' for queue: 'weblogic.kernel.Non-Blocking'> <<WLS Kernel>> <> <BEA-170018> <The log file has been rotated to sau1_81pappsa04.log00538. Log messages will continue to be logged in ./sau1_81pappsa04/sau1_81pappsa04.log.>
    ####<Mar 20, 2010 9:09:46 AM AST> <Warning> <RMI> <pappsa04> <sau1_81pappsa04> <ExecuteThread: '1' for queue: 'weblogic.kernel.Non-Blocking'> <<WLS Kernel>> <> <BEA-080004> <An error was thrown by rmi server: weblogic.cluster.replication.ReplicationManager.update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;)
    java.lang.IllegalAccessError: tried to access method weblogic.servlet.internal.WebAppServletContext.pushEnvironment(Ljava/lang/Thread;)Ljava/lang/ClassLoader; from class weblogic.servlet.internal.session.ReplicatedSessionData.
    java.lang.IllegalAccessError: tried to access method weblogic.servlet.internal.WebAppServletContext.pushEnvironment(Ljava/lang/Thread;)Ljava/lang/ClassLoader; from class weblogic.servlet.internal.session.ReplicatedSessionData
         at weblogic.servlet.internal.session.ReplicatedSessionData.update(ReplicatedSessionData.java:220)
         at weblogic.cluster.replication.ReplicationManager.update(ReplicationManager.java:1302)
         at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    ####<Mar 20, 2010 9:09:47 AM AST> <Warning> <RMI> <pappsa04> <sau1_81pappsa04> <ExecuteThread: '1' for queue: 'weblogic.kernel.Non-Blocking'> <<WLS Kernel>> <> <BEA-080004> <An error was thrown by rmi server: weblogic.cluster.replication.ReplicationManager.update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;)
    java.lang.IllegalAccessError: tried to access method weblogic.servlet.internal.WebAppServletContext.pushEnvironment(Ljava/lang/Thread;)Ljava/lang/ClassLoader; from class weblogic.servlet.internal.session.ReplicatedSessionData.
    java.lang.IllegalAccessError: tried to access method weblogic.servlet.internal.WebAppServletContext.pushEnvironment(Ljava/lang/Thread;)Ljava/lang/ClassLoader; from class weblogic.servlet.internal.session.ReplicatedSessionData
         at weblogic.servlet.internal.session.ReplicatedSessionData.update(ReplicatedSessionData.java:220)
         at weblogic.cluster.replication.ReplicationManager.update(ReplicationManager.java:1302)
         at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    thanks in advance...
    Santosh

    Hi All,
    We are getting following error. what is the cause for the below issue.
    ####<Mar 20, 2010 9:09:46 AM AST> <Alert> <Log Management> <pappsa04> <sau1_81pappsa04> <ExecuteThread: '1' for queue: 'weblogic.kernel.Non-Blocking'> <<WLS Kernel>> <> <BEA-170018> <The log file has been rotated to sau1_81pappsa04.log00538. Log messages will continue to be logged in ./sau1_81pappsa04/sau1_81pappsa04.log.>
    ####<Mar 20, 2010 9:09:46 AM AST> <Warning> <RMI> <pappsa04> <sau1_81pappsa04> <ExecuteThread: '1' for queue: 'weblogic.kernel.Non-Blocking'> <<WLS Kernel>> <> <BEA-080004> <An error was thrown by rmi server: weblogic.cluster.replication.ReplicationManager.update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;)
    java.lang.IllegalAccessError: tried to access method weblogic.servlet.internal.WebAppServletContext.pushEnvironment(Ljava/lang/Thread;)Ljava/lang/ClassLoader; from class weblogic.servlet.internal.session.ReplicatedSessionData.
    java.lang.IllegalAccessError: tried to access method weblogic.servlet.internal.WebAppServletContext.pushEnvironment(Ljava/lang/Thread;)Ljava/lang/ClassLoader; from class weblogic.servlet.internal.session.ReplicatedSessionData
         at weblogic.servlet.internal.session.ReplicatedSessionData.update(ReplicatedSessionData.java:220)
         at weblogic.cluster.replication.ReplicationManager.update(ReplicationManager.java:1302)
         at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    ####<Mar 20, 2010 9:09:47 AM AST> <Warning> <RMI> <pappsa04> <sau1_81pappsa04> <ExecuteThread: '1' for queue: 'weblogic.kernel.Non-Blocking'> <<WLS Kernel>> <> <BEA-080004> <An error was thrown by rmi server: weblogic.cluster.replication.ReplicationManager.update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;)
    java.lang.IllegalAccessError: tried to access method weblogic.servlet.internal.WebAppServletContext.pushEnvironment(Ljava/lang/Thread;)Ljava/lang/ClassLoader; from class weblogic.servlet.internal.session.ReplicatedSessionData.
    java.lang.IllegalAccessError: tried to access method weblogic.servlet.internal.WebAppServletContext.pushEnvironment(Ljava/lang/Thread;)Ljava/lang/ClassLoader; from class weblogic.servlet.internal.session.ReplicatedSessionData
         at weblogic.servlet.internal.session.ReplicatedSessionData.update(ReplicatedSessionData.java:220)
         at weblogic.cluster.replication.ReplicationManager.update(ReplicationManager.java:1302)
         at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    thanks in advance...
    Santosh

  • Memory leaks and multi threading issues in managed client.

    In our company we use a lot of Oracle, and after the release of the managed provider we migrated all applications to it. First the  things were very impressive : the new client was faster, but after some days applications that uses 100MB with old client goes to 1GB and up. The memory is not the only issue, we use a lot of multi threading, and we experience connection drops and not disposal, after 1 days working one of the application had over 100 sessions on the server. I think there is something wrong with connection pool and multi threading.
    Is someone experience same problems.
    Yesterday we went back with unmanaged provider. Now things are back to normal.

    connection drops: did you try to use "Validate Connection=true" parameter in your connection string?
    the new client was faster: are you sure with this statement? Even in 64bit environment? I got quite serious performance problems when running application under 64bit process: https://forums.oracle.com/thread/2595323

  • Enterprise User and Multi Thread Server

    Hi,
    We are going to build a system which uses a configuration:
    10g2
    Enterprise User
    Multi Thread Server
    Client apps accesses db over JDBC/SSL
    Could some please share experience about issues regarding
    using Enterprise User and Multi Thread Server ?
    Is MTS transparant for Enterprise User authentication ?
    Regards,
    Cezary

    If you build simpserv with -t, and set MIN and MAXDISPATCHTHREADS, you
    should have an example of a multithreaded server.
         Scott
    Johan Philippe wrote:
    >
    We have been going to the documentation on multi-threading and contexting in servers
    on Tuxedo 7.1.
    And the impression so far is that apart from the function definitions there is
    not much information around.
    Didn't even find a simple example of a multi-threaded server in the Bea refs yet.
    Does anyone know/have such an example?
    And is anyone using multi-contexting in a server, because the limitation that
    only server-dispatched
    thread get a context puts quite a limitation on its usefullness.

  • Multi threading under single file channel

    Hi,
      We have File-Proxy scenario .
    We are using fCC sender channel and using
    recordset sequence as varaibale
    recordsets per message was 250.
    When large size file like 2GB was processed, PI is taking 45-50 min to process the file and from proxy end its taking 8 hrs to process this file.
    we are using one channel and 250 recordsets per message by chunking file and process to target. We are following EOIO for sequence for these chunk files.
    with this approach in PI target system proxy is taking huge time to process.
    experts suggested using multi threading and multiple channels are the ideal solution for this issue.
    am expecting with multiple channels and multi threading  will cause issue for receiver proxy  because of more objects and current approach is fine.
    Please suggest any other alternatives we can acheive in PI with respect to this issue?
    Note: I checked blog for file chunk option under Adv parameters and I cant use that here as FCC and Mapping is there .
    Rgds,
    aman

    Hi Aman,
    We had file to proxy interface and the XML payload of the proxy was around 400mb...to reduce the time taken in PI in mapping step we reduced the XML payload of the proxy by cutting the XML tagnames.
    for example an xml field <firstname>Anand</firstname> was converted to <f>Anand</f>
    with this we were able to achieve about 40-50% reduction in XML payload the file and a good improvement in the time taken by PI mapping to process the file.
    Hope it helps,
    Thanks,
    Anand

  • SQL Server - Mult threading

    Hi ,
            We have requirement to execute a SQL Server 2008 R2 , stored procedure for 200 different input values ( 200 times calling the same procedure) . All these calculations can be executed independently. Currently, we
    are executing the same procedure for 200 different values SEQUENTIALLY. I feel this can be converted as parallel process / muti threaded , where i can initiate the execution of stored procedures for multiple values at the same time, so that i can reduce the
    total execution time.
    In SQL Server is there any possibility of handling this scenario ( parallel process / multi threading) . Please suggest.
    Thank you

    Hello,
    Its a web application and the request is initiated from web page ... and the user is exepecting a quick responce .. The procedure has to do lot of calcualtion based on the supplied parameters..
    There isn't much you can do except for tune the stored procedures or have an intermediate result set ready through something such as a indexed view. If there are multiple simultaneous queries on the same connections then I would look at the middleware tier
    if you're using one.
    SQL Server automatically decides (which can be influenced in several different ways) how to run the query. SQL Server itself is vastly multi-threaded and not every query benefits from parallelism. I feel as though you'd have more luck either tuning the stored
    procedures.
    Sean Gallardy | Blog |
    Twitter

  • Help with understanding multi-threaded code

    Hi Everyone,
    I am currently reading a book on multi-threading and up until recently I have been able to understand what is going on. The thing is the complexity of the code has just jumped up about two gears without warning. The code is now using inner classes which I am trying to develop an understanding of but I am not finding it easy going, and the book has been lite on explanations. If anybody can help with the following code it will be really appreciated.
    public class SetPriority extends Object
         private static Runnable makeRunnable()
              Runnable r = new Runnable()
                   public void run()
                        for(int i=0; i<5; i++)
                             Thread t = Thread.currentThread();
                             System.out.println("in run() - priority=" + t.getPriority() +
                                          ", name=" + t.getName());
                             try{
                                  Thread.sleep(2000);
                             }catch(InterruptedException x){
                                  //ignore
              return r;
         public static void main(String[] args)
              Thread threadA = new Thread(makeRunnable(), "threadA");
              threadA.setPriority(8);
              threadA.start();
              Thread threadB = new Thread(makeRunnable(), "threadB");
              threadB.setPriority(2);
              threadB.start();
              Runnable r = new Runnable()
                   public void run()
                        Thread threadC = new Thread(makeRunnable(), "threadC");
                        threadC.start();
              Thread threadD = new Thread(r, "threadD");
              threadD.setPriority(7);
              threadD.start();
              try{
                   Thread.sleep(3000);
              }catch(InterruptedException x){
                   //ignore
              threadA.setPriority(3);
              System.out.println("in main() - threadA.getPriority()=" + threadA.getPriority());
    }My greatest challenge is understanding how the makeRunnable() method works. I don't understand how this inner class can be declared static and then multiple "instances" created from it. I know that I have no idea what is going on, please help!!!
    Thanks for your time.
    Regards
    Davo
    P.S.: If you know of any really good references on inner classes, particularly URL resources, please let me know. Thanks again.

    Yikes!! The good news is that you're unlikely to see such convoluted code in real life. But here we go.
    "private static Runnable makeRunnable()" declares a method that returns objects of type Runnable. The fact that the method is declared "static" is pretty irrelevant - I'll describe what that means later.
    The body of the method creates and returns an object of type Runnable. Not much special about it, except that you can give such an object to the constructor of class Thread and as a result the run() method of this Runnable object will be called on a new thread of execution (think - in parallel).
    Now the way it creates this Runnable object is by using the "anonymous inner class" syntax. In effect the method is doing the same as
    public class MyNewClass implements Runnable {
        public void run() {
            // All the same code inside run()
    public class SetPriority {
        private static Runnable makeRunnable() {
            Runnable r = new MyNewClass();
            return r;
        // The rest of the original code
    }Except you don't bother declaring MyNewClass. You're not interested in defining any new method signatures. You just want to create an object that implements Runnable and has certain instructions that you want inside the run() method. Think of the whole approach as shorthand.
    Think about this for a while. In the mean time I'll write up the "static".

  • Multi-Thread application and common data

    I try to make a multi-Thread application. All the Threads will update some common data.
    How could I access the variable �VALUE� with the Thread in the following code:
    public class Demo {
    private static long VALUE;
    public Demo(long SvId) {
    VALUE = 0;
    public static class makeThread extends Thread {
    public void run() {
    VALUE++;
    public static long getVALUE() {
    return VALUE;
    The goal is to get the �VALUE� updated by the Thread with �getVALUE()�
    Thanks for your reply
    Benoit

    That code is so wrong in so many ways......
    I know you're just experimenting here, learning what can and can't be done with Threads, but bad habits start early, and get harder to kick as time goes on. I am going to give a little explanation here about what's wrong, and what's right.. If you're going to do anything serious though, please, read some books, and don't pick up bad habits.
    Alright, The "answer" code. You don't use Thread.sleep() to wait for Threads to finish. That's just silly, use the join() method. It blocks until the threads execution is done. So if you have a whole bunch of threads in an array, and you want to start them up, and then do something once they finish. Do this.
    for(int k=0; k<threads.length; k++) {
      threads[k].start();
    for(int k=0; k<threads.length; k++) {
      threads[k].join();
    System.out.println("All Threads Done");Now that's the simple problem. No tears there.
    On to the java memory model. Here where the eye water starts flowing. The program you have written is not guarenteed to do what you expect it to do, that is, increment VALUE some amount of time and then print it out. The program is not "Thread Safe".
    Problem 1) - Atomic Operations and Synchronization
    Incrementing a 'long' is not an atomic operation via the JVM spec, icrementing an int is, so if you change the type of VALUE to an int you don't have to worry about corruption here. If a long is required, or any method with more then one operation that must complete without another thread entering. Then you must learn how to use the synchronized keyword.
    Problem 2) - Visiblity
    To get at this problem you have to understand low level computing terms. The variable VALUE will NOT be written out to main memory every time you increment it. It will be stored in the CPUs cache. If you have more then one CPU, and different CPUs get those threads you are starting up, one CPU won't know what the other is doing. You get memory overwrites, and nothing you expect. If you solve problem 1 by using a synchronized block, you also solve problem 2, because updating a variable under a lock will cause full visiblity of the change. However, there is another keyword in java.. "volatile".. A field modified with this keyword will always have it's changes visible.
    This is a very short explaination, barely scratching the surface. I won't even go into performance issues here. If you want to know more. Here's the resources.
    Doug Lea's book
    http://java.sun.com/docs/books/cp/
    Doug Lea's Site
    http://g.cs.oswego.edu
    -Spinoza

  • Multi-processor Multi-Threaded deadlock

    Hi all-
    I've posted this over at jGuru.com and haven't come up with an effective solution but I wanted to try here before I reported this as a bug. This deals with kicking off many threads at once (such as might happen when requests are coming in over a socket).
    I'm looking for a way to find out when all of my threads have finished processing. I have several different implementations that work on a single processor machine:
    inst is an array of 1000+ threads. The type of inst is a class that extends threads (and thus implements the runable interface).
    for (i = 0;i<Count;i++)
    inst[ i ].start()
    for (i = 0;i<Count;i++)
    inst[ i ].join();
    however this never terminates on a multiprocessor machine. I've also tried an isAlive loop instead of join that waits until all threads have terminated until it goes on. Again, this works on the single processor but not the multi-processor machine. Additionally someone suggested a solution with a third "counter" class that is synchronized and decremented in each thread as processing finishes, then a notifyAll is called. The main thread is waiting after it starts all the threads, wakes up to check if the count is zero, and if it's not it goes back to sleep. Again this will work on the single processor but not the multi-processor.
    The thread itself ends up doing a JNI call which in turn calls another DLL which I just finished making thread safe (this has been tested via C programs). The procedures are mathematically intensive but calculation time is around half a second on a P3 800Mhz.
    Any help on this is greatly appreciated. My next step will likely be tearing down the application to exclude the calculating part just to test the JVM behavior. Is there a spec with the JVM behavior on a multi processor machine, I haven't seen one and it's hard to know what to expect from join() (joining across to processors seems like wierd concept), getCurrentThread() (since 2+ threads are running at the same time), etc.

    My next step will likely be tearing down the application to
    exclude the calculating part just to test the JVM behavior.Sounds like a really good idea.
    Is there a spec with the JVM behavior on a multi processor machine, The behaviour of threads is defined in the specs.
    You might want to check the bug database also. There are bug fixes for various versions of java.

  • Aggregate Storage And Multi-Threading/Multi-Core Systems

    Please pardon if this question has been asked before, but the Forum search is not returning any relevant results.
    We are in the process of purchasing hardware for an 11.1.2 Essbase environment. We are going 64-bit, on Windows 2008, with either 32 GB or 64 GB of system RAM. The debate we are having is the number of CPUs and cores per CPU. We have not built any ASO databases as of yet, but we plan to launch a major BSO to ASO conversion project once 11.1.2 is off the ground here.
    Historically, with BSO, we did not see performance improvements significant enough to justify the cost of additional CPUs when we ran calcs on multi-CPU systems vs. single or dual CPU systems, even when the settings and design should have taken the most advantage of BSO's multi-threading capabilities. However, it would seem that ASO's design may be able to make better use of multi-core systems.
    I know that there are a lot of factors behind any system's performance, but in general, is ASO in 11.1.2 written well enough to make it worthwhile to consider, say, a four CPU, total 16 core system vs. a 2 CPU, total four core system?

    Grand central dispatch - infancy, not really doing its job, and I don't think apps have to be specifically written for HT, but they do have to not do things that they use to - prevent threads from going to sleep! or be parked.
    high usage is not necessarily high efficiency. often the opposite.
    Windows 7 seems to be optimized for multi-core thanks to a lot of reworking. Intel wants and knows it isn't possible to hand code, that the hardware has to be smarter, too. But the OS has a job, and right now I don't think it does it properly. Or handle memory.
    Gulftown's 12MB cache will help, and over all should be 20% more efficient doing its work.
    With dual processors, and it doesn't look like there are two quick path bridges, data shuffling has led to memory thrashing. Use to be page thrashing with not enough memory. Then core thrashing but having the cores, but not integrated (2008 is often touted as being greatest design so far, but it was FOUR dual-cores, 2009 was the first with a processor that really was new design and (native) 4-core.
    One core should be owned by the OS so it is always available for its own work and housekeeping.
    The iTunes audio bug last year showed how damaging and not to implement code and how a thread could usurp processing and add a high cpu temperature while basically doing nothing, sort of a denial of service attack on the processor - those 80*C temps people had.
    All those new technology features under development and not like OpenCL, GCD and even OpenGL are tested, mature but rather 1.0 foundation for the future. A year ahead of readiness.

  • Oracle Multi-threaded libraries and Forte R3

    Hello all,
    I heard through the grapevine that it would be possible
    to use Oracle 7.3 multi-threaded support with Forte 3.0G.
    (thus making Load-Balancing obsolete in this case)
    Has anyone given a try at this assumption ?
    If yes, on what platform and what versions ?
    Thanks,
    Vincent Figari
    You don't need to buy Internet access to use free Internet e-mail.
    Get completely free e-mail from Juno at http://www.juno.com
    Or call Juno at (800) 654-JUNO [654-5866]
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi,
    It is available In R3.0.F.2 also. I tested it this release and it works
    very well. But, you need to make a design pattern on it : A Oracle
    Session can not be shared between several transactions throught threads.
    So You need to manage a pool of DBSessions.
    Hope this Helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Vincent R Figari wrote:
    >
    Hello all,
    I heard through the grapevine that it would be possible
    to use Oracle 7.3 multi-threaded support with Forte 3.0G.
    (thus making Load-Balancing obsolete in this case)
    Has anyone given a try at this assumption ?
    If yes, on what platform and what versions ?
    Thanks,
    Vincent Figari
    You don't need to buy Internet access to use free Internet e-mail.
    Get completely free e-mail from Juno at http://www.juno.com
    Or call Juno at (800) 654-JUNO [654-5866]
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Java multi-thread Applet and Multi-processor

    Hello,
    I have a JAVA applet which work fine on a mono-processeur machine and not fine at all on multi-processors.
    It use multi thread (for reading on socket) and some times, request are lost.
    Is that a matter of programming or a JVM bug ?
    This happens on Linux and Windows NT bi-processors.
    We hare using JAVA 1.3.0_02
    Thanks for your help
    [email protected]

    I have already have a look to javax.swing.SwingUtilities.invokeLater() but (I think) it don't work for my need.
    A graphic applet which create 2 threads : one for reading and one for writing on a socket.
    Request sent to the server are memorized in a vector, and once answer is received, the request is remove from vector and treated. Access to the list is protected by synchronize.
    Everything works fine one several plateforme (linux, windows 98/2000/NT, Solaris). The only problem is on multi-processor : request are lost !

  • Indesign and multi threaded cpu support??????????

    When the indesign will finally support multi-core processors?????? It is tragic that adobe dont have any support for multi-core cpu and that this products cost thousends $$$$$!!!!!!!!!!!!!!! Only premiere and some photoshop function support multi-core cpu.

    If you are good freelancer you can get money spent on CS back in a month. So I would not call this software expensive. What concerns multi threaded cpu support I believe that programming tools as well as operating systems need to evolve. I am sure that we will get better support in this matter in close future.

  • Multi-thread failure - Error in assignment

    Hello
    I have a c++ program processor running under Windows XP with Oracle 9i. My program access to oracle by an ODBC driver version 9.2.0.4.0. It could be launched in multi-thread to increase performance. When I launch it with one thread everything is fine. When I use several threads I have problems. ODBC driver returns to me a "error in assignment ... General error" message and my updates queries failed. Under SQl server it works without problems. It seems to be a kind of deadlock. When I disable check box in my odbc driver of "enable query timeout" my program encounter a problem and freezes...
    Could someone help me ?

    user13335017 wrote:
    I have thought of the above solutions as workable, however, it is not. Some exhibited errors are:
    A. "Attempt to use database while environment is closed." This error applies to 2, 3 and 4 all the way;
    B. "Attempt to read / write database while database is closed." This error applies to 3 in particular;
    C. "Attempt to close environment while some database is still open." This error applies to 5.
    Please help me with designing a better strategy to solve the concurrent issue. Many thanks in advance.All these are expected errors. You should design the application so that you do not close an environment handle while database handles are still open, keep database handles open for as long as operations need to be performed on the underlying databases, open the database handles after opening the database handles, and close database handles before closing the environment handle.
    In short, in pseudo-code, you should have something like this:
    - open environment handle,
    - open database handles,
    - perform whatever operations are needed on the databases,
    - close database handles,
    - close environment handle.
    You can refer to the Getting Started with Data Storage and the Getting Started with Transaction Processing guides appropriate for the API you are using, from the Berkeley DB documentation page.
    Regards,
    Andrei

Maybe you are looking for

  • Facebook App

    Hi... I have a problem with Facebook App. I'm Portuguese and the App is in Portuguese... from Brazil. I prefer having the English version of the app, and I tried to download it from the US app store, but it comes in "Brazilian" too. Is there anyway t

  • Video quality is less than expected when playing inside Flash

    iam using flv video. i played it back in many ways , with flv player that comes with flash ,as embedded in the time line and using external class that use  NetStream ,the video quality was less than playing the same video  outside the flash invironme

  • Calendar Bug? Is anyone experiencing this?

    I have an iphone 4s (ATT) running ios 6. I create a calendar event, set my availability to free, and set alerts I then invite someone to the event Everything is fine until they accept the event Once they accept or decline the event, it sets my availa

  • Click on mail-mail opens and all emails there disappear

    I know that there are emails on my iphone 4. I click on mail, mail opens and all emails there disappear.

  • Bookmarking tool

    I know on the Windows platform, there's the powerful "autobookmark plugin" which is used to semi-automatically produce bookmarks and named destinations in PDF files. I'm looking for a Mac equivalent. What is a powerful bookmarking and named destinati