Does anyone know about this !!!!!!

hi all,
I am using Tomcat 4.0 and wanted to setup a database connection pool to a oracle database server. I am able to configure a datasource and get the connection using the web.xml (resource-ref) and server.xml (ResourceParam) tags.
My questions are
1. Does tomcat provide a connection pool impl. or is it left to the database driver provider to do that???
2. if i put a ejb-ref entry in the web.xml how can i specify the ResourceParam entries in the server.xml so that i can point to a weblogic or jboss app server running on a different machine.
regards,
venky

I am using Tomcat 4.0 and wanted to setup a database connection pool to a oracle database
server. I am able to configure a datasource and get the connection using the web.xml
(resource-ref) and server.xml (ResourceParam) tags.I never done that (using web.xml & server.xml to define the DB), however I'm used to work with oracle connection pool.
Here's an example (I'm using the latest JDBC drivers of Oracle available on the OTN) :
public static class DbConnectionPool {
  private static OracleConnectionCacheImpl myConnectionPool;
  private static OracleConnectionPoolDataSource myDataSource;
  public void initConnectionPool(){
    try{
      //Create & configure datasource
      myDataSource = new OracleConnectionPoolDataSource();
      myDataSource.setDriverType("thin");
      myDataSource.setNetworkProtocol("tcp");
      myDataSource.setServerName  ("hostname or ip address");
      myDataSource.setDatabaseName("oracle instance");
      myDataSource.setPortNumber  ("1521 is the installation default");
      myDataSource.setUser        ("scott");
      myDataSource.setPassword    ("tyger");
      //Create & configure pool
      myConnectionPool = new OracleConnectionCacheImpl(myDataSource);
      myConnectionPool.setMaxLimit(20);
      myConnectionPool.setMinLimit(2);
      myConnectionPool.setCacheScheme(OracleConnectionCacheImpl.DYNAMIC_SCHEME);
    }catch (Throwable ex){
      log.error("initConnectionPool() - Exception catched:",ex);
  public OracleConnection getDatabaseConnection(){
    try{
      return myConnectionPool.getConnection();
    }catch (Throwable ex){
      return null;
  public void closeDatabaseConnection(OracleConnection connection){
    try{
      connection.close();
    }catch (Throwable ex){
      log.error("getDatabaseConnection() - Exception catched: " , ex);
}Hope it will help,

Similar Messages

  • Hello i just got a suspect sms telling me that a have won a prize from apple and have to go to hhp://apple.ni.rc9.cc/?p=01131641739832 and fill in a code to win a prize is this a scam? Or does anyone know about this?

    Hello i just got a suspect sms telling me that a have won a prize from apple and have to go to hhp://apple.ni.rc9.cc/?p=01131641739832 and fill in a code to win a prize is this a scam? Or does anyone know about this?

    How to delete text messages from the iPhone | How To - CNET

  • Does anyone know about this user interface?

    I just came across a few videos on Youtube showing a kind of LabVIEW user interface. I think there should exist a sort of template project for this, because I have seen more than one person using this. Does any one know where can I find it?

    It sure would have been nice if you posted a link to the youtube video instead of a screen shot of it.
    Since I can't see how it works I will go based on how it looks.  It appears to be a modified version of this GUI inspired by Ubuntu.
    http://forums.ni.com/t5/LabVIEW/GUI-inspired-by-Ub​untu-Netbook-remix/td-p/1155965
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • My I Pod touch....after charging it...asked me for a pass code..I have owned it for 4 years now...I have never set up a Password to turn it on...suddenly It is asking me for one...does anyone know about this problem?...now It is disabled...please help

    Cannot open my Ipod touch...never set it up to open with a password...suddenly it is asking for one...Now it is disabled,can anyone help...??

    iOS: Wrong passcode results in red disabled screen: http://support.apple.com/kb/HT1212
    If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone, iPad and iPod touch software.
    iOS: Unable to update or restore

  • HI my name is Luca. I have heard about workshops that apple stores are offering on LOGIC PRO X. I live in london but unfortunately nobody offers such workshop anymore. Does anyone know about this?

    Hi
    my name is Luca, I live in London.
    Is there any workshop I can book for Logic Pro X?
    Has Apple stopped to offer such workshops? It doesn tm appear to be on their list anymore..
    Where can I find it? Who should I contact?
    The store regent street referred me on their online workshop list being unaware that the logic workshop doesn t appear there.......mmm

    Apple Stores are allowed to offer these workshops if and when they can. Some of them do, but not all of them.
    The One To One program is excellent if you are looking to get trained on Logic at the Apple Store.
    http://www.apple.com/retail/learn/one-to-one/

  • Apple Campus Rep - does anyone know about doing this in Canada?

    Hi Guys,
    I was looking on the American Apple website and noticed the opportunity for students to be a "apple campus rep'. I couldn't find this on the Canadian website. Does anyone know if this is available in Canada?
    Any info would be greatly appreciated.
    Thanks,
    Brandon

    HI Brandon,
    I looked on Google without any results except the American site for this. Very bottom right side of the page http://store.apple.com/ca click where it says Contact Us.
    Also, check Macintosh User Groups. They might be able to answer your question. http://appleusergroups.com/locator/find/locate.cgi?country=4
    Carolyn

  • I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is j

    I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is just a plain photoshop file, a watermark is added, then save as jpeg - the jpeg is saved to a different folder than the original photoshop file.)  It happens for about 10 of 30/40  files approximately . Thank you, Kathryn

    I believe I have figured it out - I need to flatten the image, even though there are no layers except for layer 0, first.

  • Cannot download songs get error 5002.  Does anyone know why this is happening?

    I was able to download about 4 new songs today, but then started to get an error 5002 when trying to download a few more.  Does anyone know why this happening and how to resolve?  I've already shut down and restarted my phone, logged out of itunes and relogged in...neither solved the issue.

    It didnt do anything for me...
    just to make sure... of the correct step...
    rm -rf  ./.itmstransporter
    then
    sudo /Applications/iTunes\ Producer.app/Contents/MacOS/iTunes\ Producer
    About that folder, I searched for it, but couldnt find it, is it inside the Itunes Producer packages?
    is there a way to localize it in finder?

  • I have a related but different problem... I prefer that the photos/events on my iPhone and iPad be in "date created" order. Does anyone know if this is possible? Apple...please give us some options.

    I have a related but different problem... I prefer that the photos/events on my iPhone and iPad be in "date created" order. Does anyone know if this is possible? Apple...please give us some options!!!

    This response is a little late as I just read about your problem. I have a 2012 Dodge Charger and a 2012 Chrysler Town and Country and both worked flawlessly with the iPhone 5s my wife and I had. However, we just upgraded to the iPhone 6 and Uconnect will receive calls but you cannot answer them. You can callout successfully, however. the annoyance being the inability to answer incoming calls in the HandsFree mode.

  • TS4291 I can't send mail from my iPad apps, I just get the error message, 'The recipient- was rejected by the server because it does not allow relaying.' Does anyone know what this means and how to fix the problem.

    I can't send mail from my iPad apps, I just get the error message, 'The recipient… was rejected by the server because it does not allow relaying.' Does anyone know what this means and how to fix the problem.

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Using a POP account with multiple devices
    http://support.apple.com/kb/ht3228
    iOS: Adding an email account
    http://support.apple.com/kb/HT4810
    iOS: Setting up an Outlook.com, Hotmail, Live, or MSN email account
    http://support.apple.com/kb/ht1694
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say "Cannot Connect to Server"?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    How to Sync Contacts with Your iPad Using iTunes
    http://www.dummies.com/how-to/content/how-to-sync-contacts-with-your-ipad-using- itunes.html
    iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    eMail Groups - You can use a third party app that many users recommend.
    MailShot -  https://itunes.apple.com/us/app/mailshot-pro-group-email-done/id445996226?mt=8
    Group Email  -  https://itunes.apple.com/us/app/group-email!-mail-client-attachments/id380690305 ?mt=8
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
    http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • I was told in the shop i bought my iPhone 5 that Apple offer connection adaptator for docks to whom buy a 5 to replace à 4,  i am surprise, does anyone know about it?

    I was told in the shop i bought my iPhone 5 that Apple offer connection adaptator for docks to whom buy a 5 to replace à 4,  i am surprise, does anyone know about it?

    Restore the phone using iTunes. First time restore your backup. If the problem is not fixed restore again, and this time set up as New.

  • A year ago I brought a 1 TB hard drive (My Passport), I have not used it for over 4 months and now when I use the USB cord to connect it to my mac, it does not register the hard drive.  Does anyone know why this is happening?

    A year ago I brought a 1 TB hard drive (My Passport), I have not used it for over 4 months and now when I use the USB cord to connect it to my mac, it does not register the hard drive.  Does anyone know why this is happening?

    The beeps could be caused by something as simple as a loose internal wire or connection.  If it is under warranty (not sure how long that is, as WD drives range from 1 to 5 years depending on the model's series - I think "my passport" drives are 3 years) you could contact WD and ask them about it.
    If it is out of warranty, you could also try opening the case and check the connections - the drive may be fine, and there have been posts on TomsHardware forums of people getting the beeps, opening up the case and the drive is fine, just some wire worked loose.

  • My iPad 2 randomly had a line going down the screen when I switched it on today, does anyone know why this is or how to get rid of it ?

    My iPad 2 randomly had a line going down the screen when I switched it on today, does anyone know why this is or how to get rid of it ?

    Hello there, Adavidson137.
    The following Knowledge Base article offers some great clarification on display anomalies:
    About LCD display pixel anomalies for Apple products released in 2010 and later
    http://support.apple.com/kb/ht4044
    The following steps for troubleshooting iPhone display issues can also be useful for your iPad as well:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/ts2802
    Display image issues
    This can include bright or dark pixels, lines in video, or sections of video missing.
    Try turning iPhone off and then on again.
    Verify the issue is not content related, by viewing different content.
    If the image is too dark, adjust the brightness. In General Settings choose Brightness and Wallpaperand slide the slider.
    My issue is still not resolved. What do I do next?
    Contact Apple Support.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Does anyone know about the JTF_PF_REPOSITORY table & its purpose?

    Hi folks,
    Does anyone know about the JTF_PF_REPOSITORY table & its purpose? we looked at the data in this table and it seems like it is storing a whole bunch of page related data.
    Can this table can be purged?
    Any pointers will be very helpful.
    Thanks!

    Hi,
    Why do you want to purge this table?
    If you want to delete your personalization or pages just use functional Administrator responsibility or use jdr_utils.delete_document().
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Does anyone know about the Mackeeper? Is it needed to protect my mac?

    Does anyone know about mackeeper? And is it needed to protect my macbook?

    Don't download mackeeper!
    1st: when you get the pop-ups, they will get worse over time. I heard from other people they even could'nt open their Safari anymore. The problem with mackeeper pop-ups is that they you can't view a website before you press some buttons of them (wich leeds to problems) and that they aren't pop-ups from the site you're viewing (so the site you're viewing don't get paid for it).
    To avoid this pop-ups: download glimmerblocker!
    Really search on internet if you can trust it (I also did), but you'll see it's safe. Really great software. Since I downloaded it, and put it on, I never got these problems anymore!
    I never downoaded mackeeper but still the pop-up would show up more frequntly over time, really frustrating.
    2nd: When you download it, you got some serious problems. It isn't good software at all. It slows your mac to a new level. I don't know what to do  in this case.

Maybe you are looking for

  • FileReference#download() and filename question

    On the server side I set a HTTP header as Content-Disposition: attachment; filename=myfilename.txt Is it possible to get this information in Flex client? The FileReference#download() function gives a possibility for a name to set on the file browser,

  • Time Machine does manual backups but not automatic.

    Time Machine skips automatic hourly backups but will do a backup if I click "Backup Now".  Any idea why automatic backups are not working and how to enable them?  Thanks.

  • GR posting using inbound Idoc against Outbound delivery

    Hi, We are doing SAP ISR integration with third party POS and there we have a scanario where we have to post GR against outbound delivery using inbound Idoc. Can anybody help me out, how can we do it. In SAP processing would happen using MIGO against

  • Back ground user

    All, How to trace back gorund user?

  • Cannot play songs in i Tunes

    Hi ..and help... In order to free up space for iMovie projects I did trash some I tunes files I found in my documents folder. I thought they were just titles of songs so I deleted them. Anyway I did free up a lot of space but my entire iTunes library