Get and close connections many times in an EJB transaction drains pool

I have run into an odd bug in OC4J, and I'm hoping someone out there has the solution for it.
If I am inside an EJB transaction and call datasource.getConnection() and connection.close() more than (10 * max-connections) times, I can no longer get a connection from the datasource. Instead, I get this message:
java.sql.SQLException: Timed out waiting for an available connection after 60 seconds (connection pool reached max-connections which was set to 100)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].sql.OrionPooledDataSource.waitForConnection(OrionPooledDataSource.java:1012)
Note the message says that max-connections is set to 100, when it is in fact set to 10. The figure is always 10 times the max-connections value.
These connections are not being held, each is released before the next is fetched.
The OC4J output looks like:
[java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@d042d7 to pool (Pool size: 1)
[java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@702936 to pool (Pool size: 2)
[java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@1c0db6a to pool (Pool size: 3)
[java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@616f6c to pool (Pool size: 98)
[java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@19d83c7 to pool (Pool size: 99)
[java] com.evermind.sql.DriverManagerConnectionPoolDataSource@1d4e49a: Releasing connection com.evermind.sql.DriverManagerPooledConnection@16ad2fd to pool (Pool size: 1)
[java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@c1ec95 to pool (Pool size: 100)
[java] com.evermind.sql.OrionPooledDataSource@46bb9f: Cache timeout, closing connection (Pool size: 0)
[java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 99)
[java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 98)
[java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 2)
[java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 1)
[java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 0)
Since often the number of times a connection is required in my application is data driven, I really need a general solution for this problem. Can anyone make a suggestion?

We are facing the problem as given below.please advice.
We have developed an application wherein we are calling DB functions using Type-4 connections. We have deployed it on Oracle AS OC4J 10.1.2.0.2. When the function executes we get the below error in the log file.
When this error msg comes the application is unable to fetch the desired results.
How do we solve this issue?
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 13)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 12)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 11)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 10)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 9)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 8)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 7)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 6)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 5)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 4)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 3)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 2)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 1)
com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 0)
com.evermind.sql.OrionCMTDataSource@1326b07a: Cache timeout, closing connection (Pool size: 2)
com.evermind.sql.OrionCMTDataSource@1326b07a: Cache timeout, closing connection (Pool size: 1)
com.evermind.sql.OrionCMTDataSource@1326b07a: Cache timeout, closing connection (Pool size: 0)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 1)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 2)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 3)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 4)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 5)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 6)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 7)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 8)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 9)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 10)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 11)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 12)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 13)
null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 14)

Similar Messages

  • All of a sudden my itunes wont come up when i hit the desktop icon. un and re installed many times, tried new users, it finally gave me "you need to reinstall sqmapi.dll " im a noob and i have know idea what that is or where i can get it. i cant open any

    all of a sudden my itunes wont come up when i hit the desktop icon. un and re installed many times, tried new users, it finally gave me "you need to reinstall sqmapi.dll " im a noob and i have know idea what that is or where i can get it. i cant open any file or library that has anything to do with itunes except safari and quicktime are fine. im about to pull out whats left of my hair.

    Okay, that's got one thing ruled out at least.
    Can you check something for me, big? I'd like to see if iTunes launches with the Bonjour Service disabled.
    In your Start menu, right-click Computer and select "Manage".
    Expand "Services & Applications".
    Open "Services". (Perhaps maximise the screen to better see what's going on.)
    Right-click the Bonjour Service and select "Properties".
    In the General tab, set the Startup type to "Disabled":
    ... and click OK.
    Restart the PC and try launching iTunes. Does it open this time?

  • My macbook is going to sleep while I'm working or viewing something. I will sometimes have to open and close it several times to get it to "wake up" again. Any suggestions?

    my macbook is going to sleep while I'm working or viewing something. I will sometimes have to open and close it several times to get it to "wake up" again. Also, no sound comes out of my Macbook. I only hear with earbuds or headphones. Any suggestions?

    If you have more than one user account, you must be logged in as an administrator to carry out these instructions.
    Triple-click anywhere in the line below to select it:
    syslog -k Sender kernel -k Message CSeq "Previous Shutdown" | tail | open -f -a TextEdit
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.
    A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.

  • My ipad has a passcode but i forgot it and i tried many times and it says "Ipad is disabled connect to itunes" so i did that and it pops up and says "you must enter your passcode to access this itunes account"

    my ipad has a passcode but i forgot it and i tried many times and it says "Ipad is disabled connect to itunes" so i did that and it pops up and says "you must enter your passcode to access this itunes account"

    THave you looked at this link  http://support.apple.com/kb/HT1212

  • What is the better way to open and close connection in bean

    Hello, may i ask about the best way to open and close the connection?
    At the first, the connection code is store in Conn class bean. The JSP page will call a method in Process bean to process the query and update of database. the Process bean is using th Conn to connect to database.
    In my process bean, it have a method for each type of sql like select, insert, update, and delete for each tables. Each method will call the Conn to open and close the connection. The jsp page can simply call a method retrieve or update records.
    However, when calling the processUpdate method, it is a method that update a group of tables base on the query result of another group of tables and calculation. If I calling the query method in the same bean file, it will open and close the connection many times (more than 1000 times). After open and close the connection several times, the connection to mySQL will be fail.
    Currently, i include 2 method in Process that is only calling the Conn to open the connection and close connection. When calling the openConnection method, it will also set the boolean connected in the class to true and call Conn to open connection. When calling the closeConnection method, it will also set the boolean connected in the class to false and call Conn to close connection.
    After that, i add some change to the query method which is when the connected is false, it will open the connection by calling the Conn and close the connection themself. If the connected is true, it will not call the Conn to open and close the connection because it already connected to the database.
    Now, i when i calling the query method in jsp, it can open the connection and close the connection individually. When i call the processUpdate in the jsp, this method will calling the openConnection before calling the query and calling closeConnection at the end. It not only faster the process(less open and close), it also no cause the connect to mySQL fail error again. However, it also make the coding in the bean file more longer and complex.
    Is there have any better solution?

    Use connection pooling. This will put the connection management in the hands of the webserver, not your code. Check out this post:
    http://forum.java.sun.com/thread.jspa?threadID=741788&messageID=4252932#4252932

  • WRT54G loses connection many times an hour

    For some reason, I loose connection to the router config and the internet, many times during a normal web surfing session. I noticed it usually happens when I am 'clicking-thru" web pages quickly. The only way to restore normal function is to cycle the power plug. If i remove the router and go back to my old slower router or direct computer to cable modem connection, I have no problems. I am using the Ver 6 of the router and I am at firmware level V 1.01.0.
    This happens from either one of my 2 wired computers.
    Please help, I can't return the router because I tossed the box in the trash. I have had the unit for about 2 months.
    If I can't fix this, I am going to get another router

    Use a static IP address instead of DHCP.
    Open your Wireless Connection Properties, click on Internet Protocol (TCP/IP), Properties, Use the Following IP Address.
    In the fileds below enter:
    IP Address:  192.168.1.x  where x is any number between 2 and 255.
    Subnet Mask:  255.255.255.0
    Default Gateway:  192.168.1.1
    Then select Use the Following DNS Server Addreses and enter the IP addresses for the Preferred DNS server and the Alternate DNS server.
    You get these numbers from the router.  Go into the router configuration and click on Status. At the biottom of the screen you will see DNS1 and DNS2.  DNS1 is your preferred server, and DNS2 is your alternate server.
    After you enter the DNS addresses, click OK, OK. Your computer will then negoitate a session with the router using the address you specified instead of the router deciding which address to use.
    Good luck!

  • HT201317 Photostream to my Windows computer has stopped working. In icloud control panel, photostream is unchecked, I check it, hit options, nothing happens. I click apply and close. Next time I  open control panel, photostream is unchecked again! What ca

    Photostream to my Windows 7 computer has stopped working. When I open icloud control panel, photostream has become unchecked even though it has been previously checked. I check it again but when I click options, nothing happens. I click apply and close, but next time I open the control panel, Photostream has become unchecked again. What can I do?

    Lisaglenoak:
    When I first downloaded iCloud to my PC a little while back, Photo Stream initially worked. I was able to check/uncheck both boxes available to me, as well as click the Options tab to the right of Photo Stream. I could make changes, click "Apply", and everything was fine and dandy.
    Within a day, I opened the iCloud Control Panel, and despite how many times I would uncheck Bookmarks, it didn't matter. I would click "Apply", and it would automatically ask me to sign in again. When I did this, Bookmarks would be checked again. Additionally, Photo Stream was grayed out; I was unable to check the box (which was unchecked), and I was unable to go to Options.
    Somehow, I managed to get my iCloud Control Panel "unstuck", and currently, it is working fine. There are 2 steps that I did to accomplish this. The 1st step listed below may be the crucial element for those whose reinstallation of the program has not succeeded, in and of itself. It is a change that I haven't come across as a possible part of a solution to this problem; I just happened to stumble upon this whilst searching my PC for possible fixes to the problem.
    Step 1: Find your iCloud File Folder. (On my PC, I clicked the Start button in the lower left corner, then clicked All Programs, and finally scrolled down to where all the folders for various "things" are.) Click the Folder and a sub-list will appear, with items such as Calendar, Mail, etc. Right-Click the iCloud Program icon, and at the bottom of the list that appears, click on Properties. At the top, there are 5 tabs. Click the Compatibility tab, and you should see, at the top, the following words: "If you have problems with this program and it worked correctly on an earlier version of Windows, select the compatibility mode that matches that earlier version." Following these words is a dropbox underneath "Compatibility Mode", and for some reason - I have no idea why this is - the box was initially checked to run the program in compatibility mode for "Windows XP (Service Pack 2)". (And from what I understand, Windows XP is not a compatible Windows Edition for iCloud, so I have no idea why this box was checked.) If the box underneath "Compatibility Mode" is checked, than it is running iCloud in compatibility mode for any number of earlier Windows' Editions. Uncheck this box, click the "Apply" button, and then click "OK".
    Step 2: Find your PC's Control Panel. (On my PC, I clicked the Start button in the lower left corner, and then clicked Control Panel in the list to the right.) In the Control Panel, click Programs. Under Programs and Features, Click "Uninstall a program" (and bear with me here, because you are actually not going to uninstall iCloud). Now, scroll down the list and find "iCloud". Double-click the "iCloud" icon, and a panel with 2 options should appear: "Repair" and "Remove". Check the "Repair" box, which will reinstall the same iCloud Control Panel, replacing missing or damaged files. ("Remove" will just .. well ... remove iCloud from the computer - or, if you prefer, uninstall the program.) Click Next, and the repairing process will begin and end. And that is it - you're done. Task Completed.
    Well, in the end, this worked for me. Photo Stream was no longer grayed out. I could permanently uncheck Bookmarks (finally). The Options tab for Photo Stream would open. Anytime that I clicked the "Apply" button after checking/unchecking boxes, it wouldn't ask me to sign in again (only to come back to a Control Panel that looked just like it did before I made any changes to it.). And, I created a Shared Photo Stream on my phone using photos from my Camera Roll (to test the program), and the Shared Photo Stream appeared on my PC's Photo Stream in no time. Hopefully, this will work for you too (regardless of the Windows Edition you are currently using).     ~ Brian

  • I can't open video file in the page , i download and install flash many time but don't work , i use firefox 5 and windows 7

    i can't open video file in the page , i download and install flash many time but don't work , i use Firefox 5 and windows 7

    My current version of Chrome is having problems, too! It's so annoying. Anyone have any suggestions now? I basically can't view or download any PDFs because of this.
    Does anyone else think this is a problem not only with Adobe? I would think Apple would have something to do with this? Wouldn't they get some idea from the developer versions that no browser can open PDFs while running Lion!? Pretty bad customer service on the part of a company that prides itself on being VERY customer-friendly. Wouldn't you say?

  • Hello guys..!! I have got my new  iphone 4 2 days ago.The same day it got a problem of auto restart in every 1, to 2 minutes. I updated and restored it many times...but of no use... can any one help me how to solve this problem..!!

    Hello guys..!! I have got my new  iphone 4 2 days ago.The same day it got a problem of auto restart in every 1, to 2 minutes. I updated and restored it many times...but of no use... can any one help me how to solve this problem..!!

    Go to Settings/General/Reset - Erase all content and settings. the connecto to iTunes and restore as a New phone. Do not restore any backup. If the problem persists you have a hardware problem. Take it to Apple for exchange.
    This assumes that the phone is not hacked or jailbroken. If it is you will have to go elsewhere on the internet for help.

  • I want to get and set windows system time through lab view

    Hi
    I want to get and set windows system time with the help of lab view 8.5.
    please help me out.
    ekanth

    You can use the call library function node. Once you drop it on your block diagram double click it and you will be able to select the dllyou want to use. Choose kernel32.dll and you will see methods listed called getsystemtime and setsystemtime. Use those
    CLA, LabVIEW Versions 2010-2013

  • My iPad mini keeps turning itself off and then the apple logo keeps flashing constantly, i have charged it fully and restored it many times. what can i do?

    My iPad mini keeps turning itself off and then the apple logo keeps flashing constantly, i have charged it fully and restored it many times. what can i do?

    If you have restored to factory settings and started as new, there is nothing more that you can do on your own. Make an appointment at an Apple Store and ask them for help. You might have a hardware problem and the Apple Store techs will be able to determine that.

  • Applescript: how to record and return how many times a number appears when using a random number generator

    I create one rng and repeat another rng that many times like so:
    set x to (random number from 0 to 250)
    repeat x times
      set rn to (random number from 1 to 10)
    end repeat
    now what i would like to do is record and return how many times 'rn' comes up with one particular number. Any ideas?

    You could set up a list and increment the contents of a particular index each time it comes up, for example:
    set how_many to {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -- 1 thru 10
    set x to (random number from 0 to 250)
    repeat x times
      set rn to (random number from 1 to 10)
      set item rn of how_many to (item rn of how_many) + 1
    end repeat
    return how_many

  • How do I enable cookies on my iPad 2 . I have went to Safari and changed it many times but a website keeps telling me to enable it I've been on this site many times before with out a problem

    How do I enable cookies on my iPad 2 . I have went to Safari and changed it many times but a website keeps telling me to enable it I've been on this site many times before with out a problem

    The website may not run properly on a mobile device. You can try another browser (search the App Store) but it may be hard-coded into the website itself.

  • Get connection  and close connection a few times in one servlet

    can I do the delete , update, srarch on one servlet? I seperate them on a few functions, I getconnection on every function, and close them on the end of the function

    S.A.Khan wrote:
    Yes u can do this and if hits the performance of getting the connection again & again u can use Singleton pattern to implement a class that will return u the object of Connection.Bad idea in a servlet.

  • Itunes does not open. I have tried to uninstall it and install it many times as i have seen on some communities but still keep on getting the Itunes was not install correctly. Please reinstall itunes. Error 7 (Windows 193). I have windows 7.

    iTunes will not open, I keep getting the error 7 (windows error 193).
    I have tried many recommendations, erasing folders, reinstalling it many time but nothing.
    I have a windows 7 Lenovo ideapad.

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    If you are running 64-bit Windows and the above steps haven't helped try installing the version of iTunes that can be downloaded from this support document. iTunes 12.1 for Windows (64-bit — for older video cards)
    tt2

Maybe you are looking for

  • Adding Special Field in the line item display

    Dears Through SPRO settings, I added the field 'Group Account Number' (ALTKT) for the GL line item display. It is now transported to Quality. When I try to see that field in the change line item layout, I could not find that field for inclusion. Howe

  • RSRV Changes in BI7

    Hi All, I am having trouble with queries on all of my infoproviders and wanted to run some checks using rsrv.  One person suggested I run the checks located under All Elementary Tests in the Query folder, but I do not have a query folder because I am

  • Elements 13 - No New People Found In Your Selection

    So frustrating to see that this bug is still present in the new version. Now it's even worse. I try to add people tags to a photo and get the infamous "No New People Found In Your Selection". I was previously on PSE 11 and I was certain that this wou

  • ALE service layer

    Hi, Can any boby tell me what the ALE service layer do in ALE.

  • Best practices for hierarchy within project?

    I am looking for some advice, here is my situation: I have am using Labview and the DSC module to create an HMI for a customer.  I am connecting through OPC to a PLC, and I have access to over 1000 tags.  I don't use them all at the same time, but th