Two Connections Pools in a Single Transaction

Hi,
Inside my Custom Control I have to hit the databases of two different systems and do my validations. The two different DBs have two corresponding Connection pools.
But when I run my Custom Control (flow is jsp->jpf->custom control->2 db controls), weblogic says that two different pools cannot be used inside the same transaction.
Is there a way to work around this issue as I HAVE to call the two systems for my validations.

Are you using a TXDatasource to get your dbms connection??
          Are both ejb's updating the same dbms same connection pool.
          If container managed ejb 2 would need to call setrollback only if you
          want it to roll back and also setrollback on ejb1.
          So something like
          ejb1 - makes dbms calls all ok
          calls ejb2 ejb2 has error
          call setrollback only in ejb2
          throw exception
          If both are on the same tx then both should rollback. I suspect you
          are not using a tx datasource.
          usha wrote:
          > Hi,
          > I have one ejb(ejb no.1) calling another ejb (ejb no.2) and few other methods
          > having database updation.
          > If any of the method gives an exception then the database changes done by ejb
          > no.2 does not roll back. Why is this happening ..?
          > This is a container managed transaction and have 'Required' transaction isolatin
          > level. I don't have any setrollbackonly as the transaction is started at ejb no.1
          > level.
          >
          > Can anyone answer my question.
          > Can anybody help me about putting
          

Similar Messages

  • Do I really need two connection pools when using two durable subscriptions?

    I have a Spring daemon which takes messages from two different topics and stores them in a database.
    What irritates me is that I can't get it to work with a single connection pool. I get a message that I can't create durable subscriptions without a unique client id on the connection. It's not enough that the client id be set on the listener container, I have to set it on the underlying ConnectionFactory. I though this was some kind of glitch with openMQ but activeMQ gives me exactly the same behaviour.
    This is the important part of the config
        <bean id="realCon" class="org.apache.activemq.ActiveMQConnectionFactory" p:brokerURL="discovery:(multicast://default?group=live)"
        p:clientID="DB_RECORD_CLIENT"/>
        <bean id="realCon2" class="org.apache.activemq.ActiveMQConnectionFactory" p:brokerURL="discovery:(multicast://default?group=live)"
        p:clientID="DB_LOG_CLIENT"/>
        <bean id="jmsConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory"
        p:targetConnectionFactory-ref="realCon"/>
        <bean id="jmsConnectionFactory2" class="org.springframework.jms.connection.CachingConnectionFactory"
        p:targetConnectionFactory-ref="realCon2"/>
        <bean id="ocsMessageListener" class="com.cc.mer.ordercatcher.MessageReceived"/>
        <bean id="logMessageListener" class="com.cc.mer.ordercatcher.LogMessageReceived"/>
        <jms:listener-container
            connection-factory="jmsConnectionFactory"
            destination-type="durableTopic"
            transaction-manager="transactionManager"
            acknowledge="transacted"
            >
            <jms:listener ref="ocsMessageListener" destination="OCS_RELAYED"
                          subscription="ocs.db.recording" />
        </jms:listener-container>
        <jms:listener-container
            connection-factory="jmsConnectionFactory2"
            destination-type="durableTopic"
            transaction-manager="transactionManager"
            acknowledge="transacted"
            >
            <jms:listener ref="logMessageListener" destination="OCS_LOG"
                          subscription="ocs.log.recording" />
        </jms:listener-container>

    Thank you all for your replies.
    Yesterday, I went back to BestBuy and returned the Gigabit Ethernet Switch and exchanged it for a Belkin Share Max N300 router.  I chose this one because I want to use the router in WIRED mode and this had a 10/100/1000Mbps Gigabit Ethernet capability.  Most other routers that I looked at only had 10/100Mbps.  I also liked that it had two USB ports.
    I had to call Belkin tech support because the installer from the included CD would not install the software.  Nor would the installer that I downloaded from their web site.  I ended up actually having to be taken to the IP address' web site and from there I was able to configure everything.
    Although it took me a few hours to get all my other wireless devices onto my wireless network (I have a couple of Airport Express(es) for running "Airplay," and a wifi dongle on my TV), things now seem to be working fine. 

  • Two Connection Pools In One Database With Two Phisical Schema

    I have a database with 2 physical schemas. Each physical schema has a different username and password. So i must create a second connection pool. But i have the problem that physical schemas don't understand which connection pool to use. How can i coincide each physical schema to its connection pool automatically.
    Regards

    You need two Physical databases each with its own Connection Pool, within that database will be a single Physical Schema.
    Or you could have a single Database/Connection Pool if it has read access to both schemas.

  • Error: Creating a Connection Pool: issue with valid transaction levels

    Server: SunOS 5.8 Generic_117350-27 sun4u sparc SUNW,UltraAX-MP
    App Server: Sun Java System Application Server 8.2
    Jar: ojdbc14.jar
    Datasource Classname: oracle.jdbc.pool.OracleConnectionPoolDataSource
    Resource Type: javax.sql.ConnectionPoolDataSource
    [Issue]
    Using /SUNWappserver/lib/ojdbc14.jar, when I create my connection pool in Sun Java System Application Server 8.2, I return the following error each time I try to start the domain:
    [#|2006-07-28T14:53:56.169-0500|WARNING|sun-appserver-pe8.2|javax.enterprise.resource.resourceadapter|_ThreadID=11;|RAR5117 : Failed to obtain/create connection. Reason : The isolation level could not be set: READ_COMMITTED and SERIALIZABLE are the only valid transaction levels|#]
    When I change the value to "SERIALIZABLE" in my domain.xml file, I receive the following error in my server.log:
    Caused by: org.xml.sax.SAXParseException: Attribute "transaction-isolation-level" with value "SERIALIZABLE" must have a value from the list "read-uncommitted read-committed repeatable-read serializable ".
    So, I'm stuck!
    I can't use the values READ_COMMITTED or SERIALIZABLE since the valid values are "read-uncommitted read-committed repeatable-read serializable ".
    Case sensitivity matters.
    Any thoughts or help would be greatly appreciated.
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    The Oracle JDBC accepts TRANSACTION_READ_COMMITTED and TRANSACTION_SERIALIZABLE isolation levels.
    Example:
    connAttr.setProperty(“TRANSACTION_ISOLATION”, “TRANSACTION_SERIALIZABLE”);
    I'd check with the Apps server folks.
    Kuassi - blog http://db360.blogspot.com/
    ------ book http://www.amazon.com/gp/product/1555583296/

  • Contact Two Datasources in Weblogic 10 in a single transaction

    Hi,
    my requirement is to create two datasource which points to two different schemas of oracle 10 g database.
    In a single transaction i may be in requireemnt of contacting both the datasource to get respective db connection and do a insert/update.
    I created two datasources A and B which use Oracle 9 thin driver.
    When my application starts my app is able to get connection of datasource A and unable to get connection on datasource B. what may be the problem ??
    both uses Oracle non-XA driver with one phase commit;
    Let me know how to connect to two diff datasources in a single transaction.
    Thanks in Advance.
    Sreehari.

    Do you get like any error for second datasource like jndi lookup failed or exactly what do you see error. If I understand your usecase:
    DataSource_1 -> Uses ConnectionPool_1 -> DB Schema_1
    DataSource_2 -> Uses ConnectionPool_2 -> DB Schema_2.
    So in your java application, I guess you are using JNDI Lookup and pass above Datasources unique JNDI names, and get 2 instances. I mean you have like 2 sets of Jndi lookup code to get 2 connection objects. This looks pretty straight forward. Does not matter what drivers you use.
    Are you reusing any objects in your code, like have a single connection object and then close it and try to recycle it for second something like that...If not, check for any errors in the log files.
    Ravi Jegga

  • Does com.evermind.sql.DriverManagerDataSource provide connection pooling?

    Hi,
    The class defined in default data-sources.xml file is com.evermind.sql.DriverManagerDataSource. In Oracle9i JDBC Developer's Guide and Reference Release 1 (9.0.1) documentation's chapter 15, Oracle encourages to use this emulated data source for it is fast and efficent.
    But I could not find any info about whether com.evermind.sql.DriverManagerDataSource provides connection pooling.
    Actually, I want to make sure that if I use default data-sources.xml and ejb-location attribute for lookup method, will I be able to get pooled connection?
    Thanks a lot.

    Hi,
    Thank you for taking your time.
    I could manage to get connections from the com.evermind.sql.DriverManagerDataSource using jdbc/OracleDS in JNDI lookup string.
    As far as I've understood from the document you pointed out, I could not see "connection pooling" expression directly for emulated class. But there is an explanation that says "Connections retrieved within a single transaction from a data source using the same username and password causes the logical connections to share a single physical connection.". Is this what you've mentioned?
    Lastly, how can I make sure that the connections are coming from the pool? Is there a way to see that?
    Thanks again.

  • Direct DB Request- Connect to2 schemas using 2 connections pools at a time?

    Hello All,
    Will “Direct Database Request” feature helps to connect to two connection pools at a time?
    Report output is based on UNION of two select statements coming from two schemas, two connection pools are created to connect to two Schemas
    First select statement is coming from one schema and second select statement is coming form the other
    Select column1, column2, column3 from A, B, C
    UNION
    Select column4, column5, column6 from X, Y, Z
    A, B, C tables are coming from first schema and X, Y, Z are coming from the other
    How to get the above out put using “Direct Database Request” feature
    Regards,
    SMA

    This is a very bad idea. If you connect to the same database then it will much better to simply do synonyms and grants between the objects schema1 to schema2 so that you can use a single connection. You query will run much faster since the BI Server will not need to run separate queries to stich the data together. If the data is two different databases then you are advised to do some ETL and consolidate all the data into your datawarehouse database.

  • Recognizing alternate connection pool

    hi..
    Currently, If a connection pool fails due to a TNS failure, application instance also fails, it has lost connectivity.
    But I need, my application to recognize an alternate connection pool, such that if transactions time out on one connection, application would recognize that the primary pool is not responding and retry the transactions on a secondary data connection pool via the alternate DB instance.
    If I get the solution for this, it will be appreciable
    Thanks in advance
    Suresh

    Hi. Look at our documentation on multipools.
    Joe
    Suresh Kumar wrote:
    hi..
    Currently, If a connection pool fails due to a TNS failure, application instance also fails, it has lost connectivity.
    But I need, my application to recognize an alternate connection pool, such that if transactions time out on one connection, application would recognize that the primary pool is not responding and retry the transactions on a secondary data connection pool via the alternate DB instance.
    If I get the solution for this, it will be appreciable
    Thanks in advance
    Suresh

  • WL Connection Pool bad behaviour

    My WebLogic server is configurated with two connection pools towards an Oracle
    and a Sql db servers.
    Unfortunately, when a DB server goes down the WebLogic connection pool is not
    refreshed until I RE-START the WebLogic server.
    In particular, it seesms that a db failure causes WebLogic connection pool to
    have bad connections ("connection CLOSED", in jdbc log...) that are not good to
    execute Stored Procedures.
    Have anyone find this problem?
    Could someone recommend me a solution to face to this problem?
    Thank you very much in advance!
    Mauro

    Mauro,
    Could you post text of the exception and the source code where it happens?
    Slava
    Hi Slava,
    yes of course, I tried!
    With TestOnReserve/Release turned ON WebLogic understands that the poolconnections
    are "closed" and when I ask a connection the exception "No ResourcesAvailable"
    is thrown.
    On the contrary, with TestOnReserve turned OFF, WebLogic does not test thepool
    and grants the connection on demand, but the stored procedures (only thestored
    procedures!!??) executed on this connection throw the exception("connection closed").
    >
    I tried also to catch the failure and to refresh the connection poolthrough the
    weblogic.jdbc.JdbcServices (please see the attached file), but the reset()method
    has no effects...
    My configuration is WebLogic6.0 server with Service Pack 2 installed. Maybe that
    the JdbcServices are deprecated in this version.
    Thank you very much!
    Mauro
    "Slava Imeshev" <[email protected]> wrote:
    Hi Mauro,
    Have you turned TestOnReserve on?
    Regards,
    Slava Imeshev
    "Mauro De Santis" <[email protected]> wrote in message
    news:3b2e2557$[email protected]..
    My WebLogic server is configurated with two connection pools towardsan
    Oracle
    and a Sql db servers.
    Unfortunately, when a DB server goes down the WebLogic connection poolis
    not
    refreshed until I RE-START the WebLogic server.
    In particular, it seesms that a db failure causes WebLogic connectionpool
    to
    have bad connections ("connection CLOSED", in jdbc log...) that arenot
    good to
    execute Stored Procedures.
    Have anyone find this problem?
    Could someone recommend me a solution to face to this problem?
    Thank you very much in advance!
    Mauro

  • What's the difference between using a connection pool and a datasource

    Howdy. I figure this is a newbie question, but I can't seem to find an
    answer.
    In the docs at bea, the datasource docs say
    "DataSource objects provide a way for JDBC clients to obtain a DBMS
    connection. A DataSource is an interface between the client program and the
    connection pool. Each data source requires a separate DataSource object,
    which may be implemented as a DataSource class that supports either
    connection pooling or distributed transactions."
    In there it says the datasource uses the connection pool, but other than
    that, what is the difference between a connection pool and a datasource?

    Thanks for the info. I think it makes some sense. But it's a bit greek.
    I'm sure it'll make more sense the more I work with it. Thanks.
    "Chuck Nelson" <[email protected]> wrote in message
    news:3dcac1f5$[email protected]..
    >
    Peter,
    Here is a more formal definition of a DataSource from the Sun site
    "A factory for connections to the physical data source that thisDataSource object
    represents. An alternative to the DriverManager facility, a DataSourceobject
    is the preferred means of getting a connection. An object that implementsthe
    DataSource interface will typically be registered with a naming servicebased
    on the JavaTM Naming and Directory (JNDI) API.
    The DataSource interface is implemented by a driver vendor. There arethree types
    of implementations:
    Basic implementation -- produces a standard Connection object
    Connection pooling implementation -- produces a Connection object thatwill automatically
    participate in connection pooling. This implementation works with amiddle-tier
    connection pooling manager.
    Distributed transaction implementation -- produces a Connection objectthat may
    be used for distributed transactions and almost always participates inconnection
    pooling. This implementation works with a middle-tier transaction managerand
    almost always with a connection pooling manager.
    Does that help clarify the distinction?
    Chuck Nelson
    DRE
    BEA Technical Support

  • Physical Tables from multiple connection pools

    Hi all,
    we have in our RPD file two connection pools (let's say A and B), each connecting to a different source DBs.
    Thus, each physical table resides either in source DB A or B (xor).
    The specified connections work in Admin tool, and also direct database requests work in OBIEE 11G if we explicitly
    provide the correct connection pool. The connection pools are specified in order A,B in the Admin tool.
    However, using OBIEE answers always results in following error message if data from the connection pool B
    is to be queried:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000]
    [nQSError: 10058] A general error has occurred.
    [nQSError: 43113] Message returned from OBIS.
    [nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist at OCI call OCIStmtExecute.
    [nQSError: 17010] SQL statement preparation failed. (HY000)
    If we exchange the order of connection pools to B,A in Admin tool, we get the same error if we query
    data from connection pool A.
    It seems that each connection pool needs to be able to access all physical tables. Is that correct?
    Thanks, Thomas
    Edited by: user13376481 on Mar 4, 2013 3:08 AM

    Hi Thomas.
    I have the same escenario...
    you tried the solution? worked?
    Thanks.
    Hamilton T

  • Read data using 2 diff connection pool for same DB folder in physical layer

    Hi All,
    i am using two connection pool which have different dsn connection information (both are directed to different database name or database server)..
    so if i view the data of any table, a prompt will come asking for the connection pool, so how do i automize it....?
    how do i set the different connection pool for different tables?
    please let me know if u need further informtaion to understand my problem..
    thnx...

    thnx Stijn..
    yupe that i know...
    actually i have total of around 300 tables in physical layer (in both the schemas..) , around 12 fact and 100 dimension tables in bmm and same in the presentation layer...
    so i think u can guess how many joins and other stuff, i have made in my bmm layer..
    if now i will start modifying all this it will take lot of time...
    i am just wondering that there is no alternative for this...
    as when i check my data from the physical layer then a prompt ask for the connection pool (i have already made two connection pool..) so there could be some alternative way to automize the default connection pool setting for the tables/schemas folders in case if more than one connection pool exits under the same database in the physical layer...
    isn't it?
    thnx again..

  • Is possible to work with both Connection Pool?

    Hello,
    I would like to know if is it possible to work with both Connection Pools: Active Directory and DWH User? If it's yes, how can I specify to work with both simultaneously?
    Thank you and regards,
    Mónica.

    Hello Gayathri,
    The version is OBISE1 10.1.3.2.1
    The scenario is the following:
    I have two connection pools
    - One is mapping the DWH and it is using the System's variables :USER and :PASSWORD. Then I have an Initialization Block that get these values and I have created the logins as users in the database.
    - The other is mapping the DWH tables.
    I want to create directly users into the repository. The problem is the users of the repository cann't do the login because the first connection pool is trying to validate then against the database.
    Would be possible to validate the users against the connection pool and the repository simultaneously?
    Thank you and regards,
    Mónica.

  • Purpose of  Enable connection pooling

    Hi Gurus,
    What is the purpose of Enable connection pooling in the connection pool of the physical layer.If we gave Enable connection pooling time out as 5 minutes and our report query is taking 1 hr time to execute a report what it will happens weather query will execute or not.
    Thanks,
    Rafi

    Enable Connection Pooling allows a single DB connection to remain open for specified time so that the future query requests could route through the same connection. It saves the overhead of opening and closing new connections and if this option is unchecked then we for each query the DB need to open a new connection.
    Timeout specifies the time for which the connection to data source remains open after the request completes. During this time the new requests make use of this connection instead of opening a new connection. If timeout value set to 0 then connection pooling is disabled.
    your Query will executes,Time out 5 min means if the execution completes with in 5 min then connection will remain open for new Requests,no need to open a new one.
    Mark it if correct
    Edited by: User on Sep 18, 2012 11:57 PM

  • Query about multiple connection pools under one database

    Hi,
    I have s query about connection pool, now we have a requirement,
    we have two schemas in one db, some data store in one schema, some in another schema,
    all tables are the same, but data is different, we want to retrive all data under two schemas,
    so we need two connection pools under one database,
    I have set two system DSN, and each connection pool was mapping to one DSN,
    but after I importing tables into RPD, when I view data, there is a dialog let me select connection pool. so If this, when we drag columns in answer, it will definitely get wrong.
    so how to realize this function about multiple connection pools under one database and we can get data normally.

    Hi,
    Try this step
    1)Better to create two different DSN for the same database with different user id and password
    2)now create multiple connection pool in the same database in u r RPD physical layer .
    also refer this link : for imporving performance
    http://obiee101.blogspot.com/2009/01/obiee-multiple-connection-pools.html
    http://gerardnico.com/wiki/dat/obiee/connection_pool
    Thanks
    Deva

Maybe you are looking for

  • Modal JDialog editor in JTable

    I'm using a JDialog as an editor in a JTable. It instatiated from a class that extends TableCellEditor. When I select a value in the dialog, I call the fireEditingStopped method of the editor. The table then calls the editor's getCellEditorValue meth

  • Package Management for CodeExchange ABAP projects

    Hi CodeExchange ABAP Contributors, according to the size of ABAP in the [https://cw.sdn.sap.com/cw/codex/projects|CodeExchange Project Directory Tag cloud] most of the Projects are ABAP based. Some of them like Twibap, ABAP JSON and ABAP OAuth depend

  • HD doesn't operate when the ambient temperature is too high

    Hi I've got an iBook 800 and the internal drive starts to click when the temperature in the room is a little, or so it appears. Is there any known issue with this? I think I am about ready to replace the drive but some insight would be great. I would

  • Calling webservice from Peoplecode to upload pictures

    Hi, I need to create and call a webservice from Peoplecode to upload pictures from a SQL server database. Has anybody done this before? Does anybody have a sample peoplecode which calls a webservice? We are on PS 9.1 using Oracle 11g database. Any he

  • Problem with re-install​ing windows/re​covery

    Good Morning,        I have a NB305-n600 Laptop, that would no longer start up, so i used my flash recovery drive and began installing windows. When it gets to the partition/drive selection part of the installation it says no drives are listed. ive t