XA & Oracle - Multi-threaded

Hi All,
The Oracle XA documentation says that multi threaded
applications are
possible. But when i tried to open a connection to the DB using
XA_OPEN in
thread session with the same string it is giving an error in the
second
thread saying "XA_ERRPROTO: DB Name not unique", however sucess
in the first
thread. So multi-thread means multiple connections to diff DB.
So i opened one connection in the main thread, and i did a
XA_START with
diff. XID in both the threads. Again here in the second thered
the error is
"XA_ERRPROTO: Thread already associated".
So if these are standard ones how to write a mult threaded
application using
XA which uses only one DB.
-prabha
null

要好好看,楼主为啥不解释一下呢,或者简单翻译一下思想呢。 
为了到单位不忘记该连接,故发此贴,希望不要认为是灌水。

Similar Messages

  • 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/>

  • Oracle 8 on Linux in Multi-Thread mode

    I installed Oracle 8.0.5.0.0 on Linux RedHat 5.1
    But I cann't startup database in multi-threaed mode.
    When I try to startup DB the errors follow
    SVRMGR> startup;
    ORA-00101: invalid specification for system parameter
    MTS_DISPATCHERS
    ORA-00102: network protocol
    (ADDRESS=(PARTIAL=YES)(PROTOCOL=tcp)) cannot be used by
    dispatchers
    My configuration files are:
    listener.ora
    LISTENER =
    (ADDRESS_LIST =
    (ADDRESS= (PROTOCOL= IPC)(KEY= orcl))
    (ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
    (ADDRESS= (PROTOCOL= TCP)(Host=
    pcstar.kharkov.ua)(Port= 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME= pcstar.kharkov.ua)
    (ORACLE_HOME= /usr/oracle)
    (SID_NAME = orcl)
    (SID_DESC =
    (SID_NAME = extproc)
    (ORACLE_HOME = /usr/oracle)
    (PROGRAM = extproc)
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 10
    TRACE_LEVEL_LISTENER = OFF
    tnslistener working normally
    tnsnames.ora
    extproc_connection_data =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = orcl))
    (CONNECT_DATA = (SID = extproc))
    orcl =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL= TCP)(Host=
    pcstar.pcstar.kharkov.ua)(Port= 1521))
    (CONNECT_DATA = (SID = orcl))
    orcl_BEQ =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = BEQ)(PROGRAM = /usr/oracle)
    (argv0 = oracleorcl)
    (args = '(DESCRIPTION =
    (LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))')
    (envs =
    'ORACLE_HOME=/usr/oracle,ORACLE_SID=orcl')
    initorcl.ora
    mts_dispatchers="tcp,1"
    mts_max_dispatchers=3
    mts_servers=1
    mts_max_servers=5
    mts_service=orcl
    mts_listener_address="(ADDRESS=(PROTOCOL=tcp)(Host=pcstar)(Por
    t=1521))"
    If anybody started server in Multi-Thread mode, mail me
    [email protected]
    Best Regards!
    Gennady Saldiga
    null

    Yes, the MTS for TCP protocol does not work. A patch will be
    released soon for the production release with the fix for
    the MTS problem.
    Maturi
    Satoshi Hirai (guest) wrote:
    : Gennady Saldiga (guest) wrote:
    : : I installed Oracle 8.0.5.0.0 on Linux RedHat 5.1
    : : But I cann't startup database in multi-threaed mode.
    : : When I try to startup DB the errors follow
    : : SVRMGR> startup;
    : : ORA-00101: invalid specification for system parameter
    : : MTS_DISPATCHERS
    : : ORA-00102: network protocol
    : : (ADDRESS=(PARTIAL=YES)(PROTOCOL=tcp)) cannot be used by
    : : dispatchers
    : : My configuration files are:
    : : listener.ora
    : : LISTENER =
    : : (ADDRESS_LIST =
    : : (ADDRESS= (PROTOCOL= IPC)(KEY= orcl))
    : : (ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
    : : (ADDRESS= (PROTOCOL= TCP)(Host=
    : : pcstar.kharkov.ua)(Port= 1521))
    : : SID_LIST_LISTENER =
    : : (SID_LIST =
    : : (SID_DESC =
    : : (GLOBAL_DBNAME= pcstar.kharkov.ua)
    : : (ORACLE_HOME= /usr/oracle)
    : : (SID_NAME = orcl)
    : : (SID_DESC =
    : : (SID_NAME = extproc)
    : : (ORACLE_HOME = /usr/oracle)
    : : (PROGRAM = extproc)
    : : STARTUP_WAIT_TIME_LISTENER = 0
    : : CONNECT_TIMEOUT_LISTENER = 10
    : : TRACE_LEVEL_LISTENER = OFF
    : : tnslistener working normally
    : : tnsnames.ora
    : : extproc_connection_data =
    : : (DESCRIPTION =
    : : (ADDRESS = (PROTOCOL = IPC)(KEY = orcl))
    : : (CONNECT_DATA = (SID = extproc))
    : : orcl =
    : : (DESCRIPTION =
    : : (ADDRESS = (PROTOCOL= TCP)(Host=
    : : pcstar.pcstar.kharkov.ua)(Port= 1521))
    : : (CONNECT_DATA = (SID = orcl))
    : : orcl_BEQ =
    : : (DESCRIPTION =
    : : (ADDRESS = (PROTOCOL = BEQ)(PROGRAM = /usr/oracle)
    : : (argv0 = oracleorcl)
    : : (args = '(DESCRIPTION =
    : : (LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))')
    : : (envs =
    : : 'ORACLE_HOME=/usr/oracle,ORACLE_SID=orcl')
    : : initorcl.ora
    : : mts_dispatchers="tcp,1"
    : : mts_max_dispatchers=3
    : : mts_servers=1
    : : mts_max_servers=5
    : : mts_service=orcl
    mts_listener_address="(ADDRESS=(PROTOCOL=tcp)(Host=pcstar)(Por
    : : t=1521))"
    : : If anybody started server in Multi-Thread mode, mail me
    : : [email protected]
    : : Best Regards!
    : : Gennady Saldiga
    : Hi!
    : Same problem occured on my environment (Debian GNU/Linux 2.0).
    : But I succeeded to start Multi-thread server on ipc protocol.
    : My current configuration file (mts_* in init.ora) as follows:
    : mts_dispatchers="ipc,1"
    : mts_max_dispatchers=10
    : mts_servers=1
    : mts_max_servers=10
    : mts_service=orcl
    : # I confirmed mts_listener_address syntax by manual and
    : # v$parameter.
    : # Net8 Admn man says: If you have multiple MTS_LISTENER_ADDRESS
    : # parameters, they must be adjacent to each other in your
    : # initialization file.
    mts_listener_address="(ADDRESS=(PROTOCOL=TCP)(host=j-00872)(port=
    : 1521))"
    : mts_listener_address="(ADDRESS=(PROTOCOL=IPC)(KEY=orcl))"
    : So I tested MTS_DISPATCHERS parameter's other syntax.
    : The test results are:
    : # mts_dispatchers="ipc,1"
    : # OK
    : # mts_dispatchers="tcp,1"
    : # ORA-00101,ORA-00102 occured
    : # mts_dispatchers="TCP,1"
    : # ORA-00101,ORA-00102 occured
    : # mts_dispatchers="ipc,1","tcp,1"
    : # ORA-00101,ORA-00102 occured
    : # mts_dispatchers="(ADDRESS=(PARTIAL=YES)(PROTOCOL=tcp))"
    : # ORA-00101,ORA-00102 occured
    : # mts_dispatchers="(ADDRESS=(PARTIAL=NO)(PROTOCOL=tcp))"
    : # ORA-00101,ORA-00102 occured
    : # mts_dispatchers="(ADDRESS=(PARTIAL=YES)(PROTOCOL=ipc))"
    : # OK
    : # mts_dispatchers="(PROTOCOL=IPC) (DISPATCHERS=3)"
    : # OK
    : # mts_dispatchers="(PROTOCOL=TCP) (DISPATCHERS=3)"
    : # ORA-00101,ORA-00102 occured
    : # mts_dispatchers="(ADDRESS=(PROTOCOL=IPC)(KEY=orcl))
    : (dispatchers=3)"
    : # OK
    mts_dispatchers="(ADDRESS=(PROTOCOL=TCP)(host=j-00872)(port=1521)
    : ) (dispatcher
    : s=3)"
    : # ORA-00101,ORA-00102 occured
    mts_dispatchers="(description=(ADDRESS=(PROTOCOL=IPC)(KEY=orcl))(
    : connect_data=
    : (sid=orcl))) (dispatchers=3)"
    : # OK
    mts_dispatchers="(description=(ADDRESS=(PROTOCOL=TCP)(host=j-0087
    : 2)(port=1521)
    : )(connect_data=(sid=orcl))) (dispatchers=3)"
    : # ORA-00101,ORA-00102 occured
    : ### While the test, sometimes ORA-00472 (ORA-00472: PMON
    process
    : ### terminated with error) occured when instance shutdown.
    : ### I think the error reported in another message
    : ### on the same thread.
    : It seems dispatcher is not binded to tcp protocol adapter.
    : Does anybody have more information about Multi-thread server
    : using TCP protocol.
    : ### Please forgive my bad english.
    : Thank you.
    : Satoshi Hirai
    null

  • 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

  • How to write a multi threaded Cache Event Listener

    I have a distributed data cache called tokenCache for my application. I have also added a mapListener to this cache to listen to a particular kind of events.
    tokenCache.addMapListener((MapListener) new TokenCacheListenerBean(), new MapEventFilter(tokenFilter), false);
    So bascially everytime a token (The domain object of this cache) is updated the entryUpdated() method in my EJB TokenCacheListenerBean is invoked.
    The issue I have though is that, from what I observe on running my code is that the Cache Listener is single threaded. So if two Token Objects on my tokenCache are updated,
    lets say Token Object A and Token Object B one after the other,  the entryUpdated() method in my EJB is invoked for Token Object A and  once the invocation is complete
    then the entryUpdated() method is invoked again for Token Object B(). At a given point of time there is only one instance of TokenCacheListenerBean EJB.  Is there a way to
    make this happen in multi-threaded manner ?
    Is there a configuration setting somewhere which allows multiple CacheListeners to be instantiated at a given point of time ?
    TokenCacheListenerBean  EJB_
    package oracle.communications.activation.asap.ace;
    import java.util.Iterator;
    import java.util.Set;
    import java.util.logging.Logger;
    import javax.ejb.Stateless;
    import com.tangosol.net.NamedCache;
    import com.tangosol.util.MapEvent;
    import com.tangosol.util.MapListener;
    import com.tangosol.util.ValueUpdater;
    import com.tangosol.util.extractor.PofExtractor;
    import com.tangosol.util.extractor.PofUpdater;
    import com.tangosol.util.filter.EqualsFilter;
    import com.tangosol.util.filter.LikeFilter;
    import com.tangosol.util.filter.LimitFilter;
    import com.tangosol.util.processor.UpdaterProcessor;
    * Session Bean implementation class TokenCacheListenerBean
    @Stateless
    public class TokenCacheListenerBean implements TokenCacheListenerBeanRemote, TokenCacheListenerBeanLocal, MapListener {
    NamedCache asdlCache;
    NamedCache tokenCache;
    private final int PAGE_SIZE = 1;
    private static Logger logger = Logger.getLogger(ConnectionManager.class.getName());;
    * An instance of the JCAModeler EJB, represents the JCA-JNEP
    JCAModeler jcaBean;
    * Default constructor.
    public TokenCacheListenerBean() {
    // TODO Auto-generated constructor stub
    public void entryDeleted(MapEvent Event) {
    public void entryInserted(MapEvent Event) {
    public void entryUpdated(MapEvent Event) {
    Token newToken = (Token) Event.getNewValue();
    Token oldToken = (Token) Event.getOldValue();
    if ((oldToken.getState() == Token.TOKEN_RESERVED)
    && (newToken.getState()== Token.TOKEN_AVAILABLE)) {
    String networkID = newToken.getNeID();
    asdlCache = AceCacheFactory.getCache("asdlCache");
    tokenCache = AceCacheFactory.getCache("tokenCache");
    EqualsFilter filterNE = new EqualsFilter(new PofExtractor(String.class,Asdl.NETWORKID), networkID);
    LimitFilter limitFilter = new LimitFilter(filterNE, PAGE_SIZE);
    Set removeASDL = asdlCache.keySet(limitFilter);
    Iterator asdlIterator = removeASDL.iterator();
    if (asdlIterator.hasNext()) {
    logger.info(printASDLCache());
    ValueUpdater updater = new PofUpdater(Token.STATE);
    System.out.println("Token ID:" + newToken.getTokenID());
    UpdaterProcessor updaterProcessor = new UpdaterProcessor(updater, Integer.toString(Token.TOKEN_RESERVED));
    tokenCache.invoke(newToken.getTokenID(), updaterProcessor);
    jcaBean = new JCAModeler(tokenCache);
    Object asdlID = asdlIterator.next();
    Asdl provisionAsdl = (Asdl) asdlCache.get(asdlID);
    asdlCache.remove(asdlID);
    jcaBean.provision(provisionAsdl, newToken.getTokenID());
    logger.info(ConnectionManager.printTokenCache());
    logger.info(printASDLCache());
    }

    Here is what I am asking!
    I have added 2 listeners (Listener A and Listener B) which each listen on for changes made to 2 different token Cache Objects (Token A and Token B).
    for (i = 0; i < 2 ; i++) {
    Token tokenAdded = new Token(UUID.randomUUID().toString(),TOKEN_AVAILABLE, networkID);
    tokenCache.put(tokenAdded.getTokenID(), tokenAdded);
         tokenCache.addMapListener((MapListener) new TokenCacheListener(), tokenAdded.getTokenID(), false);
    Now assume that updates are made to Token A and Token B simuntaneosly.
    Why do i observe in my diagnostic messages that only one Listener is invoked at a given point of time.
    Which means I see Listener A getting invoked and then once invocation of Listener A is complete I see Listener B bieng invoked.
    Ideally I would want both listeners to be invoked simultaneously rather than in a one off fashion.
    Here is the code for my token cache Listener
    package oracle.communications.activation.asap.ace;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Set;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    import com.tangosol.util.AbstractMapListener;
    import com.tangosol.util.Filter;
    import com.tangosol.util.MapEvent;
    import com.tangosol.util.MapListener;
    import com.tangosol.util.ObservableMap;
    import com.tangosol.util.ValueUpdater;
    import com.tangosol.util.extractor.PofExtractor;
    import com.tangosol.util.extractor.PofUpdater;
    import com.tangosol.util.filter.AndFilter;
    import com.tangosol.util.filter.EqualsFilter;
    import com.tangosol.util.filter.LikeFilter;
    import com.tangosol.util.filter.LimitFilter;
    import com.tangosol.util.processor.UpdaterProcessor;
    public class TokenCacheListener extends AbstractMapListener {
         NamedCache asdlCache;
         NamedCache tokenCache;
         AceCacheFactory cacheFactoryBean = new AceCacheFactory();
         private final int PAGE_SIZE = 1;
         private static Logger logger = Logger.getLogger(ConnectionManager.class
                   .getName());;
         * An instance of the JCAModeler EJB, represents the JCA-JNEP
         JCAModeler jcaBean;
         * This is a utility method and prints the tokens cache.
         public String printTokenCache() {
              NamedCache tokenCache = cacheFactoryBean.getCache("tokenCache");
              LikeFilter tokenList = new LikeFilter(new PofExtractor(String.class,
                        Token.STATE), "%", (char) 0, false);
              Set keySet = tokenCache.keySet(tokenList);
              StringBuffer cachedTokenList = new StringBuffer("\n################################## Token(s) Cache ##################################");
              int counter = 1;
              for (Object tokenInCache: keySet) {
                   Token tokenObject = (Token) tokenCache.get(tokenInCache.toString());
                   cachedTokenList.append("\nS.NO:" + (counter++)
                             + "\t ID:" + tokenInCache.toString()
                             + "\t State:" + Token.tokenToString(tokenObject.getState()));
              cachedTokenList.append("\n####################################################################################");
              return cachedTokenList.toString();     
         * This method is a utility method and it prints all the ASDL(s) currently present on the
         * asdlCache.
         private String printASDLCache() {
              NamedCache asdlCache = cacheFactoryBean.getCache("asdlCache");
              LikeFilter asdlList = new LikeFilter(new PofExtractor(String.class,
                                  Asdl.NETWORKID), "%", (char) 0, false);
              Set keySet = asdlCache.keySet(asdlList);
              StringBuffer cachedASDLList = new StringBuffer("\n################ ASDL Cache ######## ########");
              int counter = 1;
              for (Object asdlInCache: keySet) {
                   cachedASDLList.append("\nS.NO:" + (counter++) + "\t ID:" + asdlInCache.toString());
              cachedASDLList.append("\n################ ASDL Cache ######## ########\n");
              return cachedASDLList.toString();     
         public TokenCacheListener() {
         public void checkASDLCache(MapEvent Event) {
         // Not currently used
         public void entryUpdated(MapEvent Event) {
              Token newToken = (Token) Event.getNewValue();
              Token oldToken = (Token) Event.getOldValue();
              logger.info("\n=============================================================================================="
                        + "\nTOKEN CACHE LISTENER"
                        + "\n=============================================================================================="
                        + printTokenCache()
                        + "\n==============================================================================================");
              if ((oldToken.getState() == Token.TOKEN_RESERVED)
                        && (newToken.getState()== Token.TOKEN_AVAILABLE)) {
              String networkID = newToken.getNeID();
              asdlCache = cacheFactoryBean.getCache("asdlCache");
              tokenCache = cacheFactoryBean.getCache("tokenCache");
              EqualsFilter filterNE = new EqualsFilter(new PofExtractor(String.class,Asdl.NETWORKID), networkID);
              LimitFilter limitFilter = new LimitFilter(filterNE, PAGE_SIZE);
              Set removeASDL = asdlCache.keySet(limitFilter);
              Iterator asdlIterator = removeASDL.iterator();
              if (asdlIterator.hasNext()) {
              logger.info(printASDLCache());
              ValueUpdater updater = new PofUpdater(Token.STATE);
              System.out.println("Token ID:" + newToken.getTokenID());
              UpdaterProcessor updaterProcessor = new UpdaterProcessor(updater, Integer.toString(Token.TOKEN_RESERVED));
              tokenCache.invoke(newToken.getTokenID(), updaterProcessor);
              jcaBean = new JCAModeler(tokenCache);
              Object asdlID = asdlIterator.next();
              Asdl provisionAsdl = (Asdl) asdlCache.get(asdlID);
              asdlCache.remove(asdlID);
              jcaBean.provision(provisionAsdl, newToken.getTokenID());
              logger.info(printTokenCache());
              logger.info(printASDLCache());
    I only see one instance of this listener alive at any given point of time.
    Edited by: 807103 on Nov 3, 2011 1:00 PM
    Edited by: 807103 on Nov 3, 2011 1:12 PM

  • Multi Thread Server over TCP/IP

    Multi Thread Server over TCP/IP. Does it work?
    In my box it works only over IPC protocol.
    null

    S C Maturi (guest) wrote:
    : Mark Malakanov (guest) wrote:
    : : Multi Thread Server over TCP/IP. Does it work?
    : : In my box it works only over IPC protocol.
    : Mark,
    : Multi threaded server over TCP/IP will not work with
    : the current distribution of Oracle 8.0.5 on Linux.
    : This is corrected and a patch would be released soon.
    : Maturi
    tcp 0 0 bock.nettek-ll:listener bock.nettek-
    llc.co:4196 ESTABLISHED
    tcp 0 0 bock.nettek-llc.co:4196 bock.nettek-
    ll:listener ESTABLISHED
    (I have serveral of these)
    TNS Ping Utility for Linux: Version 8.0.5.0.0 - Production on 07-
    JAN-99 18:45:52
    (c) Copyright 1997 Oracle Corporation. All rights reserved.
    Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=localhost)
    (PORT=1521))
    OK (440 msec)
    ...and from my install log you see that I selected MTS:
    -[ YESNO
    Q> Would you like MTS (Multi-Threaded Server) configured
    and the SQL*Net$
    A> TRUE
    Please explain? Will TCP/IP MTS work via the loopback adapter
    only? So far I have not tried a remote TCP/IP connection.
    -STEVEl
    null

  • Running a Java Multi Thread Program in database

    I have created a multi threaded program in Java and it runs successfully from the command prompt. I want to create a DBMS Job which will wake up at regular intervals and runs the java program(Java stored procedure). Is this possible in 9.2/10G ?? If Yes, will there be any impact on the DB performance/increase memory etc.,
    The database (9.2...) resides on a RH 2.3 AS box.
    Any ideas...
    Thanks,
    Purush

    Purush,
    Java stored procedures cannot be multi-threaded. Well, they can, but the threads will not run in parallel. You may be able to find some more information in the Oracle documentation, which is available from:
    http://tahiti.oracle.com
    Good Luck,
    Avi.

  • 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

  • Connection Pooling in OCCI Vs Multi-Threading.

    Hi,
    I am working on an application in which I am using OCCI( Oracle C++ Call Interface)  and multi-threading concepts.
    My application is having different clients( Ex: Client-A, Client-B) and I am offering a set of operations( functions that trigger the Stored Procedures of DataBase ) which are common to all the clients.Each Client can send asynchronous requests of any number.So, is there any chance of using single connection( not connection pooling) to the Data Base for all the clients to manage their requests ?
    Note: Multi-threaded requests are also allowed from each client.
    How can I co-relate multithreading and Connection Pooling in OCCI?
    Can I you multi-threading without Connection Pooling? If so how?
    Will the connection pooling is needed if there is no multi threading concept in my application?
    Please help me on this. Very urgent.
    Thanks in Advance..:)

    Connections are resources that the application uses and a fewer connections can be used by multiple threads if the threads are not always busy with the database activity only, and are doing other work too. This sharing (pooling) can be implemented by the application or the application can leverage the connection pooling features offered by OCI/OCCI (recommended).
    Be aware of connections vs sessions and sharing them (refer to :
    OCI Programming Advanced Topics
    OCCIConnectionPool is to pool connections and OCCIStatelessConnectionPool is to pool sessions. Please see the differences in the above link and apply as appropriate.

  • Is a Trigger Multi Thread?

    I’m trying to execute a SELECT statement WHERE status = X to make some operations when I insert a row in my Table.
    If there is another insert until is execute the firs insert, the Trigger is executed in other Thread or waits until the first ended?
    Is a Trigger Multi Thread?
    If is multi thread, is possible to make it in single thread or wait until the first one end?

    Each session will execute its own copy of the trigger.
    To single thread access to rows within a table look at the select for update statement.
    When designing transactions give thought to Oracle's read consistency model: readers will not wait on updaters to see the row contents.
    But by selecting for update you will cause other sessions that want to update the same selected row as taken by the first session to wait for the first session to commit or rollback before the second session performs its update.
    If you need to single thread access to the entire table you could be designing an applciation that will not scale to support multiple session access.
    HTH -- Mark D Powell --

  • MUlti-threading concept

    Hi All,
    Want to know how we can multi-thread a program for a particular PLSQL code in Oracle EBS for which the child thread doesn't consume any thread in the front-end even though it executes with user-specified threads?

    Hi;
    Please review below notes which could gives you some idea:
    How Does iPayment Use Multi Threading? [ID 983478.1]
    http://orabiz.blogspot.com/2010/06/ebs-plsql-multithreading-example.html
    Can I have multi-thread program in EBS
    Regard
    Helios

  • Multi-threaded agent not being used

    Solaris 9, Oracle 9.2.0.1
    The docs say the multi-threaded agent avoids processes starting every time a user opens a database connection. Except it doesn't seem to.
    I've started up the agent;
    ps -ef |grep hsodbc
    oracle 6193 1 0 14:21:07 ? 0:00 hsodbcMYSQL_R -mt
    But, when I establish 2 user connections across a database link, I see this;
    ps -ef |grep hsodbc
    oracle 6201 1 0 14:21:40 ? 0:00 hsodbcMYSQL_R (LOCAL=NO)
    oracle 6216 1 1 14:23:08 ? 0:00 hsodbcMYSQL_L (LOCAL=NO)
    oracle 6193 1 0 14:21:07 ? 0:00 hsodbcMYSQL_R -mt
    The multi-threaded agent isn't picking up and processing the connections as I would expect. Processes are being spawned in exactly the same way as when the mt agent is not running.
    I have checked the listener logs and the agent is registering ok at startup [and every 10 secs too!!!].
    Can anyone shed any light on why I am not seeing the benefits of the mt agent?
    TIA
    Steve

    Steve,
    MTA is not supported with Generic Connectivity.

  • "Inconsistent cursor cache. Out of range cursor" error on dual processor multi thread

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

  • "SQL-02103: Inconsistent cursor cache." error on a dual processor multi threaded apps

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

  • "SQL-02103 Inconsistent cursor cache." error on dual processor multi threaded system

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

    I have a C++ with Pro*C++ COM object running on a Win2000 OS on
    a dual processor Middleware. The program is being called by a
    service in a multi threaded way. An oracle error like ORA-2103
    and SQL-02103 will be generated after running the program. We've
    tried putting mutex on every SQL statement in Pro*C and it works
    but the systems became very very slow. We concluded that the
    error might be cause by a collision of threads accessing the
    same Table or different tables having foreign constraints. This
    is so because the error keeps coming from a statement accessing
    Table A and following errors comes from a Table B having a
    foreign key on Table A.
    Our only solution now is to put Mutex on Statements accessing
    same tables or tables with foreign constraints but this will
    make our system run very very slow. I dont know if the problem
    is in our Oracle Database because we already upgraded our system
    from 8.1.6 to 8.1.7. The wierd thing on this is that the system
    is running smoothly without oracle errors on a SINGLE PROCESSOR
    Middleware. Hope you can give me any insights on this problem.

Maybe you are looking for

  • IPod cannot update because "firmware file" cannot be found

    We have a video iPod with color--30 GB. When I connect to iTunes to update my iPod, it says a newer version of iPod software is available. When I click okay to download update, an error message comes up saying "The iPod "Rachel" could not be updated

  • Running a WD-Appl. results in 500   Internal Server Error

    Dear all, I installed both JAVA and ABAP stack (Sneak preview 6.40 SP15) on one box. In the NSP I created a Web Service via SE37 using an existing RFC function module of my own. Then I released my Web Service for SOAP Runtime via WSCONFIG. Next I che

  • Viewing JavaDoc HTML files inside a JFrame

    hi all, how can I display any of JavaDoc HTML files (as overview-summary.html or index.html) inside a JFrame? in addition, the user should be able to use hyperlinks. I used JEditorPane, but in it I can't use hyperlinks. thanks for your answers. :)

  • Random Pen Pressure in PS CS4

    Hi, I have a intuos3 with updated drivers. The pen pressure works fine with other programs(illustrator, flash, wacom settings program, etc). But in Photoshop, the pressure recognition is random. Half of the time it works fine, but other times it does

  • Repalce comma with Space in Webi report.

    Hi Experts, My address Column in Webi report is showing data is like : Address (this is the field coming for BW) House No1,Flat J10,New Delhi,INDIA. Can we replace Comma with the space so that the ablove data would be like : House No1 Flat J10 New De