How can I use the Connection Pool with DB2

Hi All,
I am facing the problem with the usage for the Connection Pool.
I want to use DB2 via JNDI lookup.
But when starting the Weblogic server, Error occured with the following message.
<Error> <JDBC> <Cannot startup connection pool "MyJDBCPool" Cannot load driver class : com.ibm.db2.jdbc.app.DB2Driver>
DB2 and Weblogic are on the same machine.
In case of the use of remote DB2 database, I also encountered the same error.
Configurations are as follows.
<JDBCConnectionPool DriverName="com.ibm.db2.jdbc.app.DB2Driver"
MaxCapacity="10" Name="MyJDBCPool"
Password="{3DES}gCGsOfD9M6iwOtgL2v/NpA==" Targets="myserver"
TestConnectionsOnReserve="false" TestTableName="test" URL="jdbc:db2://localhost:6789/yongjoo"/>
<SNMPAgent Name="mydomain"/>
<JDBCDataSource JNDIName="acsdb" Name="acsdb" PoolName="MyJDBCPool" Targets="myserver"/>
Could you please give some information about this problem? I will appreciate your kindness.

Hi Joe,
Thanks your help.
Perhaps It's my fault for Weblogic console's setting.
After I reset the target server in console, Error message disappeared.
But, when I call the TestCode, I encountered another error message. The error
is NameNotFoundException.
When lookingup the JNDI name, NameNotFoundException errer occured. I tried to
change my setting and JNDI name, but the results are the same.
Would you please give me some information about this one more time? I will be
appreciated for your help.
Follows are Config.xml
<JDBCConnectionPool DriverName="com.ibm.db2.jdbc.app.DB2Driver" MaxCapacity="10"
Name="MyJDBCPool" Password="{3DES}gCGsOfD9M6iwOtgL2v/NpA==" Targets="myserver"
TestConnectionsOnReserve="false" TestTableName="test"
URL="jdbc:db2://localhost:6789/yongjoo"/> <SNMPAgent Name="mydomain"/>
<JDBCDataSource JNDIName="acsdb" Name="acsdb" PoolName="MyJDBCPool"
Targets="myserver"/>
and follows are TestCode,
url = "t3://localhost:7001"; //default URL
datasource = "jdbc/acsdb";
Context ctx = null;
Hashtable p = new Hashtable();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL, url);
try{
ctx = new InitialContext(p);
System.err.println("initialContext(p)"+ctx); <-- success
ds = (DataSource)ctx.lookup("java:comp/env/jdbc/acsdb");
}catch(NameNotFoundException ne){
throw new ConnectionException(); .
}catch(NamingException ne){
throw new ConnectionException();

Similar Messages

  • How can i use the connection pool in JDBC2.0

    Thanks

    Hi,
    You can use DbConnection broker which directly returns connection to DB
    Try http://www.javaexchange.com/
    In that you can specify max and min pool connection pool size
    see example below:
    DbConnectionBroker dbBroker = new DbConnectionBroker(strDBDriver, strDBURL,strDBUser, strDBPassword, iMinPoolSize,     iMaxPoolSize, strLogFile, dblTimeInMillisBetResets);

  • I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    Contacts are designed to be synced to a supported application on the computer or a cloud service.
    Pictures taken with the device are designed to regularly be copied off the device to a computer as would be done with any digital camera.
    If you have failed to use the device as designed it may be too late to recovery anything.
    Is the device regularly backed up to a computer via iTunes?  If so, the most recent backup (when restored to a replacement iOS device) should contain all contacts and pictures as of when the backup was created.

  • How can I use the QR codes with my iPad 2. do I need to download first an app ?

    How can I use the/read the QR codes with my iPad 2 ? Do I need to download an app ?

    Yes.  There are quite a few available for free in the app store

  • How can I use the iPhone 4S with no SIM card?

    How can I use the 4s with
    no SIM card
    Just for photo and internet

    Using an iPhone without a wireless service plan - Support - Apple

  • How can I implement the connection pool in my java stored procedure

    my java stored procedures (in database 'B') have to connect to another oracle database ,let's say 'A'. And how can I implement the behavior like the so-called connection pool in my java stored procedure in 'B', as below.
    1. database B, has 2 java stored procedures sp1 and sp2
    2. both sp1 and sp2 connects to databse 'A'
    whatever I call the sp1 and sp2 and the database 'A' always only one connected session from sp1 and sp2 in database 'B'.
    THANKS A LOTS...

    my problem is I have a lots of java stored procedures need to cnnect to the remote oracle db, and I hope the remote db can only have a connected session from my java stored procedures in my local db. I try as below
    class sp{
    static Connection conn=null; //the remote db connection,
    public static void sp1(){...}//procedure 1, using conn
    public static void sp2(){...}//procedure 2, using conn,too
    I can 'see' the 'conn' variable if I invoke the sp1() and sp2() from the same client application(maybe sqlplus). But if I invoke the sp1() from client 'A' and invoke sp2() from client 'B' then the sp1() and sp2() can not see the 'conn' variable for each other. I think it's because the two clients cause oracle to create two instances of the class 'sp' and the sp1() and sp2() located in different instance seperately. Thus the sp1() and sp2() can not see 'conn' for each other. They can only see its own 'conn'.
    To connect to the remote db from the java stored procedure is easy but is it possible to connect to the remote db via database link from the java stored procedure at my local db ? If so, then I also archive my goal .
    BTW , thanks a lots...
    andrew :-)

  • How can I use the setup utility with my gaming adapter?

    How can I use this program (the cd that came with my netgear wireless game adapter) to setup my gaming adapter? I want to configure my gaming adapter but it seems like i cannot do so? How can I achieve this?

    Hi again,
    thought a bit about this...
    This thing looks to me like a special sort of wireless router with one ethernet port, which also is a bit old I guess.
    With nowadays wireless router, the configuration usually is made using a Web-Browser like Safari or Firefox and accessing the router through a built-in webpage.
    The IP adress of the router is also usually 192.168.0.1.
    Have a look inside the Netgear-Documentation, to see if this also possible here.
    Stefan

  • How can I switch the connection pool dynamically during on load happens

    HI,
    I have two data bases which holds same data. i.e Prod_db, Prod_db1,
    I want to switch the connection pool dynamically during load happens
    Ex: During load happens i want to hit prod_db1, after load completes i want to hit prod_db. How to achieve this.

    create dynamic repository variable for DSN using init block so that value is changes based on your timings and use this in connection pool.
    If you use same user and passwords for both the databases that would be easy or else need to follow the same for uid and pwd.
    That should work, if not update.
    If helps pls mark correct/helpful

  • How can i use the visual j++ with the sun jdk or sumting more update than

    what the j++ have

    i did what wrote there
    now i can compile but when i press !
    to run it
    it writs
    Unable to locate-system-class: java/lang/object
    what can i do
    (the resone that i use j++ is that i have p 166 mhz
    and when i compile whit say kawa / Jcreator ..
    it took 20 second but in j++ it took 3 second
    thanks to all that help me

  • How can I use the green screen with iMovie?

    Hey guys! I was wondering how does the green screen effect work with iMovie 11? I need to use green screen in iMovie in school for a project and I am trying to troubleshoot the problem.
    Help is appreciated.
    Thanks,
    Ben

    Record a video against a green screen and import it to imovie.
    Then place the green screen footage ON TOP of the background you want and a list should come up. Select green screen. Also, before you do any of that make sure that your advanced tools are selected under preferences in imovie.

  • How Can I Use the Onboard VGA WITH a PCI-E Display Adapter?

    Hi everyone,
    My machine is a HP ProDesk 490 G2 MT and i have AMD Radeon HD 8490 DP (1GB) PCIe x16 Crd E1C64AA as my graphic. I'm newbie in this kind of hardware stuff. but my question is if i have a several plugs on my computer why i just can display one monitor?
    Is there a way to use at least two monitors on my machine without buying new graphic cards?
    Thanks in advance.

    MrZogs, welcome to the forum.
    I believe that you would get more responses to your question if you start a thread here.  They are the members who know your computer best.
    Please click the "Thumbs up + button" if I have helped you and click "Accept as Solution" if your problem is solved.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • How can I use the tabbed panel with the accordion panel options of close all panels and over/not overlap the items below?

    Ideas for features in Adobe Muse

    I assume this is what you want to achieve in the footer....
    Make sure in Muse before you export that the panel is closed, and also as Brad suggested, make sure Overlap Items Below is unchecked. I would also check the "Can Close All" button.

  • How can I use the insight-Cam with Skype

    The insight-cam is not working with Skype or gotomeeting. What is to do?

    OS X 10.8.5 update.
    Wait for a solution from Apple. They are investigating the issue.
    For the latest:
    http://support.apple.com/kb/TS5216
    Best.

  • How can I use the built-in Isight camera with an external camera (usb/firewire) at the same time?

    How can I use the built-in Isight camera and an external video camera at the same time?
    I'm wanting to stream over Oovoo/Skype/etc. using 2 cameras.
    Thanks

    Simple question with a not so simple answer.
    (a) If you mean that you want to run multiple apps simultaneously using a different camera with each app, you may encounter computing power limitations.  Digital video is processor intensive.  The only way to know if your Mac can do this it to try it.  If the video does not work together but each app works when it it the only app running, you are likely overloading your Mac's ability to process and/or move all the required data in your data bus.  You can get a better indication of whether this is the case by watching your Activity Monitor utility while running the apps you want to use.
    (b) If you mean that you want to have more than one compatible camera connected to your Mac simultaneously for ease of changing between video sources, some, but not necessarily all, apps you are using to operate your camera(s) allow you to select between your cameras.
    How you select among connected cameras depends on which application you are using. Here is how camera selection works in a few examples:
    (1) For iChat, you can choose which iSight you use in the "Camera:" choices bar in iChat > Preferences... > Audio/Video that appears when more than one compatible camera is connected. Although your camera choices will be different, the choices bar will look something similar to the Preferences settings shown here:
    If you cannot see the "Camera" choices bar, your Mac is recognizing only one (or none) of your cameras. In that case, consider the suggestions fromhttp://support.apple.com/kb/HT2090 for iSight problems or refer to your other camera's documentation for help.
    This particular choices bar solution applies ONLY to iChat. Most other applications also have settings that allow you to choose which camera to use. However, they do not all work the same way.
    (2) For instance, iMovie HD's camera choice is NOT set via Preferences. When you have more than one compatible camera connected, iMovie6 HD uses a drop-down menu choice something like this (depending on which version of iMovie you use):
    Note: Because I had no built-in iSight connected when I made this example, and because my external iSight was not connected, the drop-down menu showed only "Time Lapse." Because your Mac has a built-in iSight, your built-in iSight would show in the drop-down menu even when no other camera is connected. Connecting an additional Mac compatible webcam should allow you to choose either camera.
    Other iMovie versions work slightly differently.
    iMovie 9 (from iLife '11) uses a different camera choice button shown in this article:
      http://docs.info.apple.com/article.html?path=iMovie/9.0/en/mov39f84285.html
    iMovie 8 (from iLife '09) is slightly different as explained in this article:
      http://docs.info.apple.com/article.html?path=iMovie/8.0/en/10172.html
    In general, you can use your Mac's help for the application in use to find out how to select among more than one connected camera.
    (3) Photo Booth in Snow Leopard 10.6.x and later uses the Photo Booth > Camera menu command to select which camera to use.
    Note for readers with older Mac OS X: The previous version of Photo Booth that came with Tiger (10.4.x) is such a simple, basic app that it offers no menu selectable choice. Unless your built-in iSight is already occupied as the camera being used by some open application before you launch Photo Booth, Photo Booth will use ONLY your built-in iSight.
    However, you can use the trick from ¶ 4 of http://docs.info.apple.com/article.html?artnum=302781 to let Photo Booth use an external camera.
    (If you have an external Firewire camera connected, it may be used in preference to any USB webcam. If that is a problem for you, merely disconnect the problem Firewire device.)
    (4) For FaceTime, launch the app and click the Video menu item.
    If your Mac recognizes more than one connected compatible camera, a "Camera" section listing the cameras from which you can choose will appear there. Clicking on the desired camera name will let you select the one you want as shown in this image from my Mac Pro and LED Cinema Display:
    If your Mac recognizes only one compatible camera, the "Camera" section will not appear in the Video menu, but FaceTime will automatically use the connected camera that is recognized by OS X.
    (5) I do not use Skype oir Oovoo.  For those or other apps, see Help for each app for info on how to select your desired camera.
    Message was edited by: EZ Jim

  • How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    read this
    https://discussions.apple.com/message/20429789#20429789

Maybe you are looking for