How to use more than one connection pool to 2 different databases ??? (Weblogic 5.1)

Hello,
In my application, I must use two different databases to retrieve
informations...
My application use EJB so I created two pool of connection named pool1 and
pool2...
But when I yet used the pool1 to connect to first database and I try to use
the pool2 (to connect to the second database), an SQLException occurs :
"java.sql.SQLException: Connection has already been created in this tx
context for pool named <first pool's name>. Illegal attempt to create
connection from another pool: <second pool's name>"
I have found the answer in www.bea.com
http://e-docs.bea.com/wls/docs61/faq/JTA.html#738373
Anybody can help me and give me the more easy,quickly and the more efficient
way to use two database with two different connection pool..
Thanks..
Dephi

Hi
You need to configure TxDataSource with XA connection pool.
More information can be found here:
http://e-docs.bea.com/wls/docs61/jta/thirdpartytx.html
Regards,
Slava Imeshev
[email protected]
"Philippe Da Cunha" <pdacunha@@webraska.com> wrote in message
news:3bfcd6ee$[email protected]..
Hello,
In my application, I must use two different databases to retrieve
informations...
My application use EJB so I created two pool of connection named pool1 and
pool2...
But when I yet used the pool1 to connect to first database and I try touse
the pool2 (to connect to the second database), an SQLException occurs :
"java.sql.SQLException: Connection has already been created in this tx
context for pool named <first pool's name>. Illegal attempt to create
connection from another pool: <second pool's name>"
I have found the answer in www.bea.com
http://e-docs.bea.com/wls/docs61/faq/JTA.html#738373
Anybody can help me and give me the more easy,quickly and the moreefficient
way to use two database with two different connection pool..
Thanks..
Dephi

Similar Messages

  • How to use more than one connection in forms 6.0

    Hello to all,
    I'm working with FORMS 6.0 and tried to open a second connection which should only be opened at once when Fomrs is starting and closed when FORMS is closing.
    The following code is working very well: (I've cut the defines and the exceptionhandling)
    Connection_Id := EXEC_SQL.OPEN_CONNECTION (Connection_String);
    cursor_number := EXEC_SQL.OPEN_CURSOR(Connection_Id);
    EXEC_SQL.PARSE(Connection_Id, Cursor_number, sql_string);
    ret := EXEC_SQL.EXECUTE (Connection_Id, cursor_number);
    EXEC_SQL.CLOSE_CURSOR (Connection_Id, cursor_number);
    EXEC_SQL.CLOSE_CONNECTION (Connection_Id);
    My problem is, that I want to use this connection from different scripts (procedures / packages and triggers) of my application. This means opening and closing the connection should be done not in the same function than accessing the SQL-command.
    The only way I could find to create a variable is to use :global.varname. The ConnectionId I get as returnvalue is of the type EXEC_SQL.ConnType. You can not define globals of this type.
    So, does anybody know how to define a variable from this type, so that it is accessible from each script in froms?
    Thanks in advance.
    Susanne

    Susanne,
    database links are named connections to other databases established between databases. So if you are working against database1 but require access to a schema in database2 then you can access this through database1 using the database link.
    however this doesn't solve your problem and unfortunately nothing will solve your problem. Forms uses internal caching and automated locking that doesn't allow Forms to recover if the database you are connected to goes down. All you can do is to setup the database in that a user that disconnects due to the administrator shutting down the database (naughty boy) will be connected to another database when restarting the application.
    For the authorized actions, I suggest to wrap these actions in stored procedures and grant access privileges through database roles. This way a user that tries to perform an action that he isn't allowed to do will get an Exception that you can gracefully handle in Forms. The stored procedure can handle the logging as well.
    Another really cool feature of the Oracel database is fine grained access control akna (Virtual private Databases VPD). Using VPDs a user specific context is set when the user connects so that he can't see what he isn't allowed to and cannot do what he isn't authorized. If you have the chance to read the database documentation, its fairly easy to implement.
    Fran

  • Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes? Both my daughters have ipods, my wife has one

    Dear All
    Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes. My daughters have a different generation 'nano' each & my wife a 'shuffle'?
    Many thanks

    Click here for options.
    (69081)

  • How to use more than one JCo in one project?

    hi all,
    I want to use more than one r/3 systems and want to switch between them while running the application.
    For that, how can I use more than one JCo connection in one project and how to activate/deactivate them so as to switch in between them? And if that possible then what am I suppose to do in order to fetch the data from activated R/3 while running the application.
    Regards,

    Hi,
    Try this threads
    Multiple Client Logon in JCO
    Multiple JCO client connections
    Regards
    Saravanan K

  • How to use more than one device under same apple ID?

    How do you you use more than one device under same apple ID? say for facetime?

    You don't. One Device and one Apple ID.

  • How to use more than one application server during initial load?

    Hi,
    we plan to use more than one application server in CRM during initial download in order to increase the number of parallel requests and to decrease the time for the initial load. Is there a way to allocate requests to more than one server? Is is possible via multiple rfc connections for consumer CRM in CRMRFCPAR?
    Thanks.
    Alexander Schiffer

    Hi Naresh,
    thanks for your answer. It has solved my problem. SMLG is the transaction that I was looking for.
    Two more OSS notes that helped me to guide our basis into the right direction:
    OSS 593058 - New RFC load balancing procedure
    OSS 1413986 - SMLG: Possibility to select a favorite type for Ext.RFCs
    Thanks again.
    Alexander Schiffer

  • How to use more than one dataset?

    Hi,
    Is there any way to use more than one dataset in one report?
    Thanks..

    Yes, we can use more than one dataset..
    We can group the data sets using group feature and or(|) condition, like below
    <?for-each-group:/DATA/TOTAL_DEP/TOTAL_DEP_ROW|/DATA/FA_DATA/FA_DATA_ROW?>

  • How to use more than one ipod from one computer

    I've got my 30gb ipod set up and working fine from my pc. I've got my wife an ipod nano and want to set her's up totally separately. How can I do this?

    When the iPods belong to different people, there are basically three ways of using multiple iPods on a computer and these involve:
    a) Sharing a single iTunes library
    b) Creating Multiple Libraries in a single Mac or Windows user account
    c) Creating multiple Mac or Windows user accounts.
    Note: When you are sharing an iTunes library, you don't have to set each iPod to update in the same manner, you can mix and match from the options below as each iPod has it's own update settings
    Sharing a Library and/or User Account
    If you want to share the one library, you can set either or all of the iPods so that they only get updated with only certain playlists (you can update from more than one if you wish): iPod - Syncing Music
    Choosing the update option "Sync Music - Selected playlists" allows you to create a playlist specifically for the iPod and drag the tracks you want into it. If you tire of the list and want to change it, you just add or remove the songs you don't want. The ones you take out out remain in the library to be used some other time if you choose. You can read more about playlists at these links:
    iTunes: Creating playlists of your favorite songs
    How to create a Smart Playlist with iTunes
    Or you can choose to update any or all of the iPods manually and just drag whatever content you want to them: Managing content manually on iPod and iPhone
    Multiple Libraries
    It's also possible to have multiple libraries in a single account. To create or access a second (or more) library, hold down the Shift key in Windows when launching iTunes. In the resulting dialogue you will get the option to create a new library or navigate to the other Library.
    Note: You can only have one Library open at a time and iTunes will default to the last library opened if you don't use the keyboard command to choose one. This can prove tricky when using multiple iPods, if you don't use the keyboard command you can risk syncing to the wrong library: Using multiple iTunes libraries -Windows
    Separate User Accounts
    Another option is to create a separate User account for each person on your PC or Mac. Different accounts by definition would give you completely separate libraries. Each account has it's own iTunes folder, Library and iTunes Music folder and you load it with CDs etc just as you did with your original one. The iPod can be set to update however the owner chooses, sync all, manual or sync specific playlists
    I don't use Windows so I can't give you a step by step on that one, however I can point you to another web page which should help you out. You can read about Windows user accounts here: Create A New User Account In Vista

  • How to use more than one page to design a form-like report???

    Hi
    I am designing a form-like report. and widening the repeating frame to contain all the page or the window like this page:
    Image: !http://up1.m5zn.com/photo/2008/12/21/07/e728mos12.jpg/jpg!
    Now there is no space at the window to complete designing the report!
    How to make the repeating frame to contain more than one page or one window to complete designing the report?

    change Vertical Panels per Page to 2 (or more as needed) for the Main Section of Layout Model.

  • How to use more than one condition together?

    Dear,
    I want to set more than one condition type and use it together for any objects in page, for example page item,page button and etc.
    Is it possible to handle in "PL/SQL Experssion" at condition type?(e.g =>"Request= Expression" and "Current page!= Expression 1",..) if no is answer, please tell me other ways.
    Regards,
    Saeed.

    Hi Saeed,
    Saeed Hassanpour wrote:
    I'd like to know about CGI and Browsers conditions. Can I refer to document or essay about condition type in pl/sql?
        Yes, you can also refer CGI Environment Variables and Browser conditions in "PL/SQL Expression".
        For example :
    The condition type "When cgi_env SERVER_NAME = Expression 1" can be transformed to "PL/SQL Expression" as:
    OWA_UTIL.GET_CGI_ENV('SERVER_NAME') = 'MyServer'
    The condition type for Browser condtions can be can be transformed to "PL/SQL Expression" as:
    instr(upper(OWA_UTIL.GET_CGI_ENV('HTTP_USER_AGENT')),upper('Firefox/37.0')) > 0
        Following is old but comprehensive documentation about Condition Types:
        https://docs.oracle.com/cd/E14373_01/appdev.32/e11838/condition.htm#HTMDB25942
        Hope this helps!
    Regards,
    Kiran

  • How to use more than one ":1" in a ViewObject query

    I have a ViewObject,which has a SQL glued below.In this sql I am using ":1" twice but while I try to run this sql I am getting this error message
    "JBO-29000: Unexpected exception caught: oracle.jbo.SQLStmtException, msg=JBO-27122: SQL error during statement preparation."
    SELECT * FROM ACTIVITIES
    WHERE
    SUB_TYPE_CODE =
    case
    when(:1 IS NULL) THEN SUB_TYPE_CODE ELSE :1
    END
    If I remove one :1 then it is working fine.
    Can any one help me out plss?

    Hi,
    you can use the bind variable more than once. Can you put your SQL into another query tool such as SQL Developer and run it?
    ps, looking at your code what you may actually want its:
    SELECT * FROM ACTIVITIES
    WHERE
    SUB_TYPE_CODE = NVL(:1, SUB_TYPE_CODE )
    bit simpler?
    Brenden

  • How to use more than one region 'Conditional Display'

    Hi,
    I use a region and i want to use 2 Conditional Display for this region:
    . Fisrt when 'Request Is Contained within Expression 1' ==> 'Val1,Val2'
    . Second when 'Inline Validation Errors Displayed'
    Is it possible.
    Thanks

    Hi,
    The first one is relatively straightforward as there is a Condition Type available for that.
    The second one is a bit more complicated but can still be done. Have a look at Re: how to use wwv_flow.g_inline_validation_error_cnt? This will tell you how many validations failed. If there were any failures, you can set a hidden page item to 1, for example, and then use this page item in your condition
    Andy

  • How to use more than one indirect valuation module for the same wage type

    Is it possible and how to use the u201CIndirect valuation based on master data: ICOMPu201D configuration to default the NUMBER and at the SAME TIME to use u201CDefine valuation of base wage types usingu201D to default the AMOUNT from one/two WTs ?

    You can use the the same wage type for both number and amount but you can't assign 2 indirect valuation method for the same wage type at 1 time. I would rather suggest you to go for some customer specific indirect valuation instead of the standard one. You can use BAdI HR_INDVAL for the same.

  • How to create more than one connections between my host and server

    Hi,
    I want to create multiple connections(at least, two connections) between my host and the server.
    And use them to transfer data at the same time.
    Could you help me, and could you give me a sample code example?
    ^-^
    Thank you very much

    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.net.*;
    import java.io.*;
    import java.nio.channels.*;
    import javax.swing.*;
       This program shows how to interrupt a socket channel.
    public class InterruptibleSocketTest
       public static void main(String[] args)
          JFrame frame = new InterruptibleSocketFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setVisible(true);
    class InterruptibleSocketFrame extends JFrame
       public InterruptibleSocketFrame()
          setSize(WIDTH, HEIGHT);
          setTitle("InterruptibleSocketTest");
          JPanel northPanel = new JPanel();
          add(northPanel, BorderLayout.NORTH);
          messages = new JTextArea();
          add(new JScrollPane(messages));
          busyBox = new JCheckBox("Busy");
          northPanel.add(busyBox);
          startButton = new JButton("Start");
          northPanel.add(startButton);
          startButton.addActionListener(new
             ActionListener()
                public void actionPerformed(ActionEvent event)
    //               startButton.setEnabled(false);
                   cancelButton.setEnabled(true);
                   connectThread = new Thread(new
                      Runnable()
                         public void run()
                            connect();
                   connectThread.start();
          cancelButton = new JButton("Cancel");    
          cancelButton.setEnabled(false);
          northPanel.add(cancelButton);
          cancelButton.addActionListener(new
             ActionListener()
                public void actionPerformed(ActionEvent event)
                   connectThread.interrupt();
                   startButton.setEnabled(true);
                   cancelButton.setEnabled(false);
              new Thread(new TestServer(Port)).start();
          Connects to the test server.
       public void connect()
           new Thread(new Client(Port)).start();
    //       Port++;
       class Client implements Runnable{
               Client(int port){
                   this.port = port;
               private Scanner in;
           private int port;
            public void run() {
                    try
                       SocketChannel channel = SocketChannel.open(new InetSocketAddress("localhost", port));
                       try
                          in = new Scanner(channel);
                          while (true)
                               try{
                                  if (in.hasNextLine())
                                     String line = in.nextLine();
                                     System.out.println(line + "  " + channel);
         //                            messages.append(line);
         //                            messages.append("\n");                       
                                  else Thread.sleep(100);
                               }catch(Exception e){
                                    e.printStackTrace();
                       }finally
                            messages.append("Socket closed\n" + channel);
                          channel.close();
                    catch (IOException e)
                       messages.append("\nInterruptibleSocketTest.connect: " + e);
          A multithreaded server that listens to port 8189 and sends random numbers to the client.
       class TestServer implements Runnable
              ServerSocket s;
              private int port;
              TestServer(int port){
                  this.port = port;
                  try {
                   s = new ServerSocket(port);
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
          public void run()
             try
                int i = 1;
                while (true)
                   Socket incoming = s.accept();
                   Runnable r = new RandomNumberHandler(incoming);
                   Thread t = new Thread(r);
                   t.start();
             catch (IOException e)
                messages.append("\nTestServer.run: " + e);
          This class handles the client input for one server socket connection.
       class RandomNumberHandler implements Runnable
             Constructs a handler.
             @param i the incoming socket
          public RandomNumberHandler(Socket i)
             incoming = i;
          public void run()
             try          
                  int i = 0;
                OutputStream outStream = incoming.getOutputStream();
                PrintWriter out = new PrintWriter(outStream, true /* autoFlush */);
                while (true)
                   out.println(i);  
                   i++;
                   Thread.sleep(100);
             catch (IOException e)
                messages.append("\nRandomNumberHandler.run: " + e);
             catch (InterruptedException e)
                messages.append("\nRandomNumberHandler.run: " + e);
          private Socket incoming;
       private JButton startButton;
       private JButton cancelButton;
       private JCheckBox busyBox;
       private JTextArea messages;
       private TestServer server;
       private Thread connectThread;
       public static final int WIDTH = 300;
       public static final int HEIGHT = 300;
       public static int Port = 8848;

  • How to use more than one FLVPlayback?

    I am creating a website in Flash. I have a page with 3
    buttons on it to allow people to see 3 videos i have created. Each
    button moves the flash file to a separate frame. On each frame is a
    new FLVPlayback instance. Each one refers to a different externally
    referenced .flv file.
    Only the first FLVPlayback video will play. If i go to the
    second frame, the FLVPlayback video will not play.
    If i delete the first FLVPlayback frame, then the second
    frame will play its video.
    How do i fix this?

    You could perhaps use different FlvPlayback instances on
    different frames but, the absolute best way to do it is to use one
    FlvPlayback instance and when clicking a button tell it (with
    actionscript) to load another flv-file.

Maybe you are looking for

  • Urgent! Cancel or delete an WI in other Fork's leg

    Friends, Now, I need to find a better way to do a Cancel/Reexecute process. I'm developing in 46C and I've got some Sub-wf's in sequence... Receive's Protocol -> MIGO -> MIRO, that are called in this sequence in the Super-WF. This flow has to be prep

  • Vertical Scrollbar not resetting in Song View

    I'm sure this happened from iTunes 11 onwards and is very irrating. When in Song View and using the Column Browser to select particular artists I scroll halfway through Artist A's songs and then click on Artist B and the scrollbar is still scrolled h

  • Just wow...

    As I stated in my last post, I'm new to the Apple world. My iTouch alone has replaced 90% of my Windows use and I'm looking to completely closing that "window" soon. So here is my question... I have the portability I need with the touch, so now I nee

  • How to stop SSID broadcasting

    Where do I find the option to stop SSID broadcasting in my Actiontec MI424WR Rev. F Router? The user guide is located here: http://onlinehelp.verizon.net/consumer/bin/pdf/ActiontecMI1424WRUserManual.pdf and it shows where that option is but the scree

  • Displaying Menus in Abap webdynpro

    Hi!!!!!           I want to create abap dynpro and wanna to add some custom menus.Below is the example of wat actually i want to create.. Home  MasterDetails        Logoff            Vendor Master           Customer Master                  |