URGENT: Pool vs. Cache From JDBC

JDBC forum is pretty empty, so I'll try here. I have a database layer that is configurable to allow admin to choose Oracle JDBC connection pooling or connection caching. Here are the results:
OracleConnectionPoolDataSource.getPooledConnection().getConnection(): fast, and scalable
OracleConnectionCacheImpl.getConnection: fast, but can crash with a max threads error if lots of connections are created in a loop
Do I have my cache configured incorrectly? I've tried with and without setting the max size. When I've worked with cached connection before, the cache automatically managed queuing requests when the cache max was reached. Oracle's implementation does not seem to be doing this, since I can crash the implementation (rather than slow it down) by throwing lots of getConnection requests at it. The pool implementation slows down, but eventually returns all requests.

Hey buddy, it's you again. Just let you know that you are right. The problem is caused by mis-match between jdbc date and oracle date (that procedure is used to do some date calculation). My co-worker suggested me to add this statement in the procedure, and it did solved problem:
================
DBMS_SESSION.SET_NLS( 'NLS_DATE_FORMAT', '''DD-MON-RRRR''' );
================

Similar Messages

  • URGENT: index not used from jdbc

    Hi,
    This is for java app and sybase database.
    I have a 'select' query for which index is properly created. If I use plain jdbc connection, index is used and result comes pretty fast. but if I use connection from my app, it does not use index and takes long time.
    I am using PreparedStatement in both cases. I have compared all connection properties for both cases and they are exactly same. also, if I run that query using any sql tool like isql, result comes out pretty fast.
    Am I missing any other parameter related to connection?

    akshay_crest wrote:
    I have a 'select' query for which index is properly created. If I use plain jdbc connection, index is used and result comes pretty fast. but if I use connection from my app, it does not use index and takes long time."Plain" meaning like a little test application that runs the same query?
    Most likely reasons.
    1. If the answer to the above is yes, then you probably are not running the same query.
    2. You are not timing them in the same way and something else is slowing it down.
    3. Network problem.
    4. Not connecting to the same database/table.

  • Memory pool Code Cache increasing over time

    Hi,
    We are using JConsole to monitor some of our servers which are running JCAPS. We have a couple of JCAPS applications deployed on these servers. We are using JConsole to monitor this server and we can see that the Memory pool Code Cache seems to be increasing over time. It is around 21M at the moment and has gone up from 18M 3 days back. Is this accepted behavior? Should it not be a varying graph, going down coming back up again?
    Any help in this direction is much appreciated.
    Cheers,
    Suchitra

    This might be due to this bug raised for JDBC Client/Server connection
    Bug 12969330 : MEMORY LEAK IN JDBC CS FOR CALLABLE/PREP STATEMENT W/ NUMPARM % 4 != 0
    There is a leak in JDBC driver which seems to affect only C/S; it does not seem to affect direct or batch. ** This bug has been there since 11.2.1.6.0.
    Here are few conditions which are needed for this bug to occur:
    1. Application must be using a Client/server connection
    2. Applications repeatedly does the following:
    1. Create a PreparedStatement or CallableStatement
    2. set or register IN, OUT or IN OUT parameters
    3. Number of parameters is not an integral multiple of 4. It is the total number of parameters which matter; parameter type does not matter. JDBC driver leaks memory if the number of parameters in a PreparedStatement/CallableStatement are not an integral multiple of 4.
    3. On a close 1-3 parameters can be leaked.
    If your application deals with above scenario then there is a possible chance of the bug being hit. An example of a scenario :-
    The below PreparedStatement has 1 parameter (so it's not an integral multiple of 4):
    preparedStatement = connection.prepareStatement("SELECT col1 FROM Tab1 WHERE col2 = ? "); <===== Possible memory leak here
    To workaround the bug, you can add 3 dummy parameters -- SELECT col1 FROM Tab1WHERE col2 = ? and 1=? and 1=? and 1=? and set parameters 2,3 and 4 to 1.
    preparedStatement = connection.prepareStatement("SELECT col1 FROM Tab1WHERE col2 = ? and 1=? and 1=? and 1=? ");
    I've seen this bug a couple of times now. I don't think there is a release yet which includes a fix.

  • Connection Pool Name Missing from Drop Down when Creating a New Datasource

    Hi All,
    I'm running Weblogic Server 8.1. I've successfully created a connection pool for DB2 using the Non-XA JDBC driver from IBM (Version 7.1). When I attempt to create a datasource for this pool and un-check the "Honor Global Transactions" checkbox, the connection pool is missing from the dropdown on the next page of the wizard. If I check the checkbox, the connection pool appears in the list.
    I experience this behavior on one instance of Weblogic Server, but not on another (I can see the pool whether or not the check box is checked).
    Is there some setting on the connection pool that could cause this behavior?
    Any help would be appreciated.
    Thanks,
    Steve

    Steven Grant wrote:
    Hi All,
    I'm running Weblogic Server 8.1. I've successfully created a connection pool for DB2 using the Non-XA JDBC driver from IBM (Version 7.1). When I attempt to create a datasource for this pool and un-check the "Honor Global Transactions" checkbox, the connection pool is missing from the dropdown on the next page of the wizard. If I check the checkbox, the connection pool appears in the list.
    I experience this behavior on one instance of Weblogic Server, but not on another (I can see the pool whether or not the check box is checked).
    Is there some setting on the connection pool that could cause this behavior?
    Any help would be appreciated.
    Thanks,
    SteveI can't reproduce this on 8.1sp5...
    I would have you compare the JDBCConnectionPool entry
    between the two instances.

  • HOW TO  FIND OUT TABLE DESCRIPTION FROM JDBC?

    HOW WILL FIND OUT TABLE DESCRIPTION FROM JDBC?

    Have a look at ResultSetMetaData
    getColumnCount()
    getColumnName(int)
    getColumnTypeName(int)
    getColumnDisplaySize(int)
    ***Annie***

  • Clear wsdl cache from java

    hi ,
    I am trying to clear wsdl cache from java , some errors are coming,
    Please any one help me
    this is my code
    package bpeltest;
    import com.oracle.bpel.client.BPELProcessId;
    import java.util.Properties;
    import com.oracle.bpel.client.IBPELDomainHandle;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.ServerException;
    public class UnDeployBPELProcess {
    public static void main(String[] args) throws ServerException {
    UnDeployBPELProcess unDeployBPELProcess = new UnDeployBPELProcess();
    //Properties with BPEL server connection information
    Properties props = new Properties();
    props.put("orabpel.platform", "ias_10g");
    props.put("java.naming.factory.initial", "com.evermind.server.rmi.RMIInitialContextFactory");
    props.put("java.naming.provider.url", "opmn:ormi://EC3-VEDARRA:6005:home");
    props.put("java.naming.security.principal", "oc4jadmin");
    props.put("java.naming.security.credentials", "oracle1");
    props.put("dedicated.connection","true");
    //Get a locator in default domain
    Locator locator = new Locator("default","oracle1",props);
    //Get a handle to the domain
    IBPELDomainHandle iBPELDomainHandle = locator.lookupDomain();
    iBPELDomainHandle.undeployProcess(new BPELProcessId("default","MyUndeployedBPELProcess"));
    System.out.println("iBPELDomainHandle" + iBPELDomainHandle);
    iBPELDomainHandle.clearWSDLCache();
    compilation errors:
    C:\jdevstudio10131\jdk\bin\javaw.exe -client -classpath C:\jdevstudio10131\jdev\mywork\javatest\BPELTest\classes;C:\product\10.1.3.1\OracleAS_1\bpel\lib\orabpel.jar;C:\product\10.1.3.1\OracleAS_1\bpel\lib\orabpel-common.jar;C:\product\10.1.3.1\OracleAS_1\j2ee\home\lib\oc4j-internal.jar;C:\product\10.1.3.1\OracleAS_1\opmn\lib\optic.jar;C:\jdevstudio10131\j2ee\home\lib\ejb.jar -Dhttp.proxyHost=157.204.22.4 -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts=*.2o7.net|32.85.*|chipsndip|157.204.*|localhost|127.0.0.1|*.wlgore.com|EC3-VEDARRA|tigger -Dhttps.proxyHost=157.204.22.4 -Dhttps.proxyPort=8080 -Dhttps.nonProxyHosts=*.2o7.net|32.85.*|chipsndip|157.204.*|localhost|127.0.0.1|*.wlgore.com|EC3-VEDARRA|tigger bpeltest.UnDeployBPELProcess
    Exception in thread "main" java.lang.Exception: Failed to create "ejb/collaxa/system/FinderBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/FinderBean not found
         at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.oracle.bpel.client.util.BeanRegistry.lookupFinderBean(BeanRegistry.java:337)
         at com.oracle.bpel.client.Locator.getFinder(Locator.java:920)
         at com.oracle.bpel.client.Locator.lookupDomain(Locator.java:228)
         at bpeltest.UnDeployBPELProcess.main(UnDeployBPELProcess.java:29)
         at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:82)
         at com.oracle.bpel.client.Locator.getFinder(Locator.java:926)
         at com.oracle.bpel.client.Locator.lookupDomain(Locator.java:228)
         at bpeltest.UnDeployBPELProcess.main(UnDeployBPELProcess.java:29)
    Caused by: java.lang.Exception: Failed to create "ejb/collaxa/system/FinderBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/FinderBean not found
         at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.oracle.bpel.client.util.BeanRegistry.lookupFinderBean(BeanRegistry.java:337)
         at com.oracle.bpel.client.Locator.getFinder(Locator.java:920)
         at com.oracle.bpel.client.Locator.lookupDomain(Locator.java:228)
         at bpeltest.UnDeployBPELProcess.main(UnDeployBPELProcess.java:29)
         at com.oracle.bpel.client.util.BeanRegistry.lookupFinderBean(BeanRegistry.java:351)
         at com.oracle.bpel.client.Locator.getFinder(Locator.java:920)
         ... 2 more
    Process exited with exit code 1.
    and one more
    where we find thiis value
    "java.naming.factory.initial"= "com.evermind.server.rmi.RMIInitialContextFactory"
    Regards
    janardhan

    I think there is error with this line in code
    props.put("java.naming.provider.url", "opmn:ormi://EC3-VEDARRA:6005:home");
    Please see the post for details
    http://oraclebpelindepth.blogspot.com/2008/08/bpel-context-properties-for-client-api.html
    The value should be
    props.put("java.naming.provider.url", "opmn:ormi://EC3-VEDARRA:6005:home/orabpel");
    Every Little Helps
    Kalidass Mookkaiah
    http://oraclebpelindepth.blogspot.com/

  • How to clear the cache from Mac Book Pro

    What is the simplest way to clear out the cache from my Mac Book Pro?

    I will also endorse Thomas_r's comments.  If anything, I would use OnyX, which is a well known maintenance tool.
    Beware that there is also an "onyxmac" website, which is malware and to be avoided...
    The OnyX developer is Titanium software, here:
    http://www.titanium.free.fr/downloadonyx.php

  • I'm having 10.8.3 and today 17-Apr I had installed latest java 7 update. Now when ever I test java page it just redirects the page to Java download on both Firefox and safari. I tried deleting the cache from Java Sec Panel - temp ile but still same proble

    I'm having 10.8.3 and today 18-Apr Thursday I had installed latest java 7 update. Now when ever I test java page it just redirects the page to Java download on both Firefox and safari. I tried deleting the cache from Java Sec Panel - temp ile but still same prob.

    Make sure that the plugin is not automatically disabled in Firefox:
    Clinton

  • Oracle Function call from JDBC Adapter

    Hi,
      Is it possible to call Custom Oracle Function from JDBC Adapter? 
    I know we can call stored procedure but I need to call Oracle function. Please explain how?
    Regards,
    Shweta.

    You'll need to provide a column alias for the function call:
    select func(val) as alias from dual

  • Stored procedure call with REF CURSOR from JDBC

    How can I call a SP with a REF CURSOR OUT parameter from JDBC?

    This is a breeze.
    CallableStatement oraCall = oraConn.prepareCall("BEGIN PKG_SOMETHING.RETURNS_A_SP(?);END;");
    oraCall.registerOutParameter(1,oracle.jdbc.driver.OracleTypes.CURSOR);
    oraCall.execute();
    ResultSet rsServList = (ResultSet) oraCall.getObject(1);
    ... use ResultSet ...
    rsServList.close();
    oraCall.close();
    slag

  • How to clear cache from a 11503

    I have a few web servers and a 11503 that is setup to load balance between the web servers. I have turned off my servers for testing and I still see the web content. It doesnt look like my browser, for I can refresh it and the web content still comes up. Im thinking that the 11503 must have cached it and is providing the content. How can I go in and delete that cache from the 11503? Thanks.

    Well read this http://www.cisco.com/en/US/customer/products/hw/contnetw/ps792/products_configuration_guide_chapter09186a008077186c.html#wp1056262
    About the cache ability of CSS it's not that it stores the data locally it can help cache serves to be more efficent and make decisions on weather to send the reques to the cache server or send the request to the server itself with content.

  • Performance problem with slow VIEW from JDBC (fast from SQL Developer)

    Hi all,
    I'm experiencing following problem and would like to know if someone else also hit this one before and has a suggestion how to solve it:
    I have a pretty complicated SELECT statement that per definition returns only a few rows (~30). With no further optimization it takes ~20 seconds to return the full dataset in Oracle SQL Developer. If you add the */+ PUSH_PRED(name_of_some_inner_view) /* hint (hint is correct, stars got eaten by the OTN-forum syntax), the statement takes less than 0.5s to execute (still in SQL Developer). I saved the statement with the hint as VIEW. Selecting from the VIEW in SQL Developer is also fast.
    Now if I call the statement from JDBC (Tomcat webapp), I can see from the server console that the statement is 1:1 100% the same as the one I execute in SQL Developer. Nevertheless it takes about 20 seconds to complete.
    Here my details:
    SELECT banner FROM v$version;
    BANNER                                                                        
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production             
    PL/SQL Release 11.2.0.2.0 - Production                                          
    CORE     11.2.0.2.0     Production                                                        
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production                         
    NLSRTL Version 11.2.0.2.0 - Production                                          
    JDBC Driver used: some old odbc14.jar as well as current odbc6.jar for 11.2.0.2.0 from http://www.oracle.com/technetwork/da...10-090769.html
    SQL Developer: current version 3.2.20.09From my reading this could go wrong:
    - JDBC doesn't know the VIEW's column data types and Oracle behaves mysterious because of this (=there must be more to the SELECT than just the string, some meta-information)
    - For some reason the hint inside the VIEW is not used (unlikely)
    I also tried a Table Function/Pipelined table and selected from it as a workaround, but the result is the same: Selecting from Function is fast from SQL Developer, but slow from JDBC. All other statements that come from JDBC are as fast as they should be. I really don't know what to think of this and where the error might be.
    Is there some setting that tells Oracle not to use hints when called from JDBC?
    Thank you & Best regards,
    Blama

    Hi Bawer,
    that's what I'm thinking. Unfortunately I can't post it, as it is library code (not my lib). But in the debug-output I can see the SQL-String sent to the DB (which does include the hint).
    But I find the 2nd option you mention more likely anyway: Even if I put the hint into a VIEW and select from the view, the time-difference is there (it's even there if I use Table Functions/Pipelined table and select from the function).
    So I'd think it is more likely that something else is happening (e.g. Oracle is configured in a way that it does not use hints when called from JDBC or similar. Or the library sets some session options in order to prevent the usage of hints). But I don't know if there is even the possibility of doing so.
    Does the Oracle JDBC driver have the option to set these options?
    Does the Oracle DB have the option to set sth. like "ALTER SESSION SET dontUseHints = 'Y';"

  • Slicers Removed from Template: "Removed Records: Slicer Cache from /xl/slicerCaches/slicerCache3.xml part (Slicer Cache)"

    Product: Microsoft Office Professional Plus 2010
    I have created a template file with a data table, 2 pivot tables, and each of those 2 pivot tables has a pivotchart and 2 slicers.  I have some code that updates the pivot table ranges.  When that occurs the pivot tables, pivotcharts and slicers
    all update successfully.  
    The problem comes after saving the .xlsm file.  Upon opening the file I receive a message saying "Excel found unreadable content in 'myTemplate.xlsm'. Do you want to recover the contents of this workbook? If you trus the source of this workbook,
    click Yes."
    I then get a list or removed records and the repair that was done.
    Removed Records: Slicer Cache from /xl/slicerCaches/slicerCache3.xml part (Slicer Cache)
    Removed Records: Slicer Cache from /xl/slicerCaches/slicerCache4.xml part (Slicer Cache)
    Removed Records: Slicers from /xl/slicers/slicer2.xml part (Slicer)
    Removed Records: Drawing from /xl/drawings/drawing4.xml part (Drawing shape)
    Repaired Records: Named range from /xl/workbook.xml part (Workbook)
    Most of the file is OK with the exception of my last worksheet.  The pivot table and chart get updated, but the slicers are gone.  Any idea why this is happening?  Can something be done to prevent this?
    Thanks,
    Rich

    Hi Rich,
    Based on your description, my understanding is that slicers are removed after you get the error messages and repair it. You wonder to know why slicers are lost after repairing, it seems that the corrupted file caused the issue.
    Please try to update the  pivot table ranges manually without macros. According to my test, the slicers won’t be lost without macros. Please test this method in your own environment. If it
    works fine after disable macros, please check your code.
    If my understanding is incorrect, could you upload a sample via OneDrive and be at bit more precise explain your problem, so that we can get more accurate solutions to this problem. I am glad to help and forward to your reply.
    Hope it’s helpful.
    Regards,

  • How to clean the IE browser cache from the jsp?

    I have my own web application running on my IE browser, Also we have created this application shortcut URL link on my desktop.(i.e just we have created some short cut for the URL http://localhost:8080/app ). If we accidently closes the browser with out log out option , then if we opens the new browser with the shortcut browser link, it maintains the session and it holds all the data which we ran before.
    The main issue is,In Internet Explorer (IE 5.x) If we closes the browser while running the appliaction using Alt-F4 or using X(close) option.After that if we open that application's shorcut link it opens with same session, could you please give me some suitable solution for to remove the cache from the Internet Explorer?
    I have used :
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
    and all the possible meta option , It does't work for me to clear the client side cache.
    thanks
    vijay

    It's not clear what goal you're trying to reach. Do you need session at all? Is it browser's caching that bothers you?
    If I remember correctly IE keeps session even after all its windows closed. Mozilla does just the opposite.

  • Is it possible to create triggers in sybase from jdbc (java application)?

    We are in the need to create a triggers in the database (sybase) from JDBC (java application)?
    Please send me pointers or articles related to this.
    Thanks in advance,
    Kri

    A trigger is NEVER explicitly called, from any environment.
    It is implicitly called when you invoke the operation that it's a trigger for.
    Whether you're using Java or anything else to invoke that operation makes no difference whatsoever.

Maybe you are looking for

  • HELP!!! iphone 3gs stuck in recovery mode

    I tried doing the latest iphone system software update and the **** thing got stuck in recovery mode! The 291 MB update downloads fine and it made a backup and then i assume it removed the old software and started installing the new software. It goes

  • How do i make my form "smarter"?

    Hi, I am trying to convert a currently used Excel form into a Web based form using Form Central. Currently in Excel, i can enter the quantity and model number and it will populate product description and pricing per unit utilizing VLookup. Also, once

  • Can't play .mov file!!

    hello, i'm having some trouble playing .mov-files.. I can watch trailers on apple.com but when I have a mov-file on the pc, it opens with a flashy green screen and pressing play will only give my a static (mostly green) and no noise.. this goes also

  • Hiding SQL code in query

    When you have executed a query, you are able to click the arrow and hide the SQL. The system queries always run with this hidden, it appears to be not possible to do the same with user queries? Sometimes the SQL code takes up a lot of the page so it

  • Creating new Photo Ablum

    Hi, I have 16 gb, original iphone, and I want to creat new photo albums with different names in my iphone, but when I syncing the new photo folder, all of them going into the same folder in iphone. Is there any way to create different albums in iphon