OracleConnectionCacheImpl

I am trying to instantiate the OracelConnectionCacheImpl in a method of and RMI object. When I try to start the rmi object, I get the following error:
Exception in thread main" java.lang.NoClassDefFound: javax/naming/Referenceable
In reading the connection cache docs, I didn't see anything about importing javax.naming unless using JNDI. I am not using JNDI. Can anyone provide some insight?

You are right - it's a very poor implementation. I've addressed this issue weeks ago in this list (June 13), but got no response ...
Thanks to the OracleDev people, I'm very impressed.
My suggestion: Forget it, do it yourself.
Thomas

Similar Messages

  • OracleConnectionCacheImpl setter values for instance properties

    Hi!
    I'm using OracleConnectionCacheImpl to cache my connections to the Oracle 8i (8.1.7.4)
    The JDBC driver that I'm using is 9.2.x
    I've read through the SQLJ/JDBC documentation and learned that it is possible to use certain properties for controlling the behaviour of connection cache.
    Only thing is that the documentation does not specify whether the values for the properties should be milliseconds, seconds, minutes or something else. The long type of the parameter value would indicate milliseconds but according my minimal testing at least some of the values propably are not milliseconds. Help is greatly appreciated. Below is the list of the properties I'm interested in:
              // Controls how often cache thread check whether a physical connection has become available
    /*ods.setThreadWakeUpInterval(threadWakeUpInterval);
    // How long the logical connection can be used before forced back to the cache pool and all
    // resources are freed.
    ods.setCacheTimeToLiveTimeout(cacheTimeToLiveTimeout);
    // How long the physical connection can be unused before it is closed and all the resources are freed.
    ods.setCacheInactivityTimeout(cacheInactivityTimeout);
    // How long the connection request will be waiting before EOJ_FIXED_WAIT_TIMEOUT is thrown.
    ods.setCacheFixedWaitTimeout(cacheFixedWaitTimeout);
    // How long the cache waits before polling for an available connection
    ods.setCacheFixedWaitIdleTime(cacheFixedWaitIdleTime); */
    Best Regards:
         Aapo Romu

    Hello Radhakrishna D S,
    The note you provided did not fit our problem. The bootstrap.maxheapsize in the instance.properties file is already 128MB. Thanks anyway!

  • OracleConnectionCacheImpl - "Setting the user name and passwwdd"

    Does anyone know how to disable (or suppress, or redirect) the message...
    "Setting the user name and passwwdd"
    ... when using OracleConnectionCacheImpl?
    null

    This is bug 1317673
    null

  • Does OracleConnectionCacheImpl cache physical or logical db connections?

    Hello -
    Can anyone tell me if the "cache" in oracle.jdbc.pool.OracleConnectionCacheImpl is of logical or physical database connections?
    (My app selectively enables roles (depending on end user) on the connections it gets - trying to determine if I can use OracleConnectionCacheImpl as a data source...)
    -- Thanks

    Logical connection

  • NullPointerException with OracleConnectionCacheImpl

    I get the following exception from the OracleConnectionCacheImpl.getConnection() method when a number of threads are using the Cache:
    java.lang.NullPointerException
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java, Compiled Code)
    at oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java, Compiled Code)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java, Compiled Code)
    at oracle.jdbc.pool.OraclePooledConnection.getConnection(OraclePooledConnection.java, Compiled Code)
    at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java, Compiled Code)
    at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java, Compiled Code)
    Why is this happening. I thought the OracleConnectionCacheImpl etc. was thread safe.
    Any help would be greatly appreciated.
    null

    What is Interface?? Its hard to run the prog w/o that...

  • Statement cache bug in OracleConnectionCacheImpl

    Hi,
    Did you guys ever try setStmtCacheSize() in OracleConnectionCacheImpl? When I enable statement cache in connection cache, I always get "close connection error". It seems connection.close() did not clean up the statement associating with this conneciton.
    This is my code piece:
    //occ is object of OracleConnectionCacheImpl
    Conection conn1 = occ.getConnection();
    doSomeDBWork(conn1);
    conn1.close();
    Connection conn2 = occ.getConnection();
    doSomeDBWork(conn2); <-- SQLException
    Thank you
    Jason

    I found out the problem. The JDBC team should set the stmtCacheSize 0 before reusePooledConnection. This is the only way we can do without phsically close the connection.

  • OracleConnectionCacheImpl violating MAX_LIMIT

    Hi,
    I am using OracleConnectionCacheImpl for conection pooling in my application. I have set the Min and Max limits as 30 and 100 respectively. I am using DYNAMIC_SCHEME for connection pooling.
    But whenever there is heavy load on my application the number of conections is exceeding the MAX_LIMIT of 100. So in a way the OracleConnectionCacheImpl does not seem to be taking care of the MAX limit on the number of conections.
    And the application reaches to a point where it does n't seem to recover the unused connections. Is it anything to do with the scheme that we are using?
    Please help. Thanks in advance ..:-)

    JDBC (on a JSP for instance) will usually do the query and close the connection when the command close() is called. However, this doesn't mean that the connection is closed at the database. Since there's no wait, or no resources being used anymore by the connection, the connection goes to INACTIVE state.
    If you are inside Oracle's intranet, take a look at this:
    http://bigbird.us.oracle.com:7777/dbadmin/session_test.jsp
    This page queries the sessions table on a database (using a cached connection). Each time you refresh the page, you see a new inactive session (used to generate the previews page), and a new ACTIVE session used to generate the current page. You'd think the cached connection (bean) would always use the same connection. But it doesn't. Hit REFRESH on the browser 20 times and you will see 20 INACTVE connections from LUCIO @ bigbird.
    The MAX limit is set to 150. But since those 20 inactive sessions have no jobs waiting, before you get to 150 sessions on the list, a bunch of them will suddenly disappear, as they are automatically released so the Database can allocate resources to new sessions.
    If you are getting the MAX sessions reached error, make sure you issue the close() function from your Connection object in every JDBC application that creates a new session. If you don't, they will accumulate as active sessions and won't be released.

  • Clearing up the cache for OracleConnectionCacheImpl

    Hi,
    I am using the OracleConnectionCacheImpl pool with the following settings:
    cached = new OracleConnectionCacheImpl(getConnectionPoolDataSource(dataSourceBindName));
    cached.setDescription(dataSourceBindName.toString());
    cached.setCacheInactivityTimeout(1);
    cached.setConnectionCleanupInterval(1);
    I was not sure from the documentation if 1 is in millisecs, secs, mins, hours... so assumed it was minutes. Essentially I was the cache cleaned out of connections which have been inactive for a defined period of time.
    Currently using the settings above in a test app I check out 5 connections from the pool and check them back in (close the logical Connection) shortly after. I then loop and every 25 seconds print out the size of the cache from getCacheSize(). As expected at first this is 5. After 1 minute I expected this to change to 0. it did not. In fact nothing changed for 15 minutes and at that point the cache size changed to -1.
    Can anyone help explain how I can get the cache to reduce in size (close the inactive physical connections sooner) or if not why the cache size becomes -1 and not 0. After the cache size becomes -1 it does not change even when I check out new connections from the pool.
    Thanks for any help,
    James

    hi,
    I just had the same problem. But clearing every type of caches on the client side did not help. Anyway I don't think this could help, because the localization is not done on the client side.
    At the end the following steps helped:
    - remove all the the properties from the bundle file
    - save the bundles
    - open the website showing the properties (now the keys are shown instead of the translations)
    - add the properties again to the bundle file
    - save the bundles
    Afterwards the missing properties are shown correctly.
    Best regards
    Gerhard

  • OracleConnectionCacheImpl ignores minLimit ?

    Hi there !
    I am trying to use OracleConnectionCacheImpl and I noticed that even if a set the minLimit to 3 after a while all the connections are closed (I watch the sessions in Enterprise Console).
    Here is a sample from my code:
    OracleConnectionCacheImpl ocacheimpl = new OracleConnectionCacheImpl(cp);
    ocacheimpl.setCacheScheme(OracleConnectionCacheImpl.DYNAMIC_SCHEME);
    ocacheimpl.setMinLimit(3);
    ocacheimpl.setMaxLimit(10);
    ocacheimpl.setThreadWakeUpInterval (1);
    ocacheimpl.setCacheInactivityTimeout (5);
    When I set set minLimit to 3 I want to have always at least 3 connections in cache but , as i said, after a time all the connections are closed. Does anybody knows why is this happening or what I am doing wrong ? Is OracleConnectionCacheImpl working in a different manner (cause I did not find any documentation on it ) ?
    Thanks,
    Dan

    It happens because even if you want to keep a minimum of 3 connections in the cache their idle times are exceeded and they get cleaned up.

  • OracleConnectionCacheImpl recycle unused connections?

    Hi all,
    Does anyone know if the OracleConnectioCacheImpl has any sort of mechanism that recycles unused connections when traffic decreases?
    From my tests, it seems to create connections fine up to the maximum, or past it depending on the cache scheme used, but it doesn't seem to recycle back down to the minimum or anything.

    My own experience and I understand from Metalink there is a known bug (internal) with the 8.1.7 driver that causes setMaxLimit to be a real hard limit even if you use the DYNAMIC scheme.
    ie no connections are made above the limit and it therefore will never reduce back down.
    Discovered after pulling my hair out as to why our apps performance sucked big time... try running 700 users on a pool with 3 connections :-))
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Derek Wichmann:
    When you say "take them down to the cache size that you specified," I take it that this is the limit specified with OracleConnectionCacheImpl.setMaxLimit()?<HR></BLOCKQUOTE>
    null

  • Improve the performance of the OracleConnectionCacheImpl

    Hi,
    I have used the OracleConnectionCacheImpl to implement the connection pool. It require about 500ms to get and return the connection. Is there are any method to improve the time to get or return the connection?
    Thank You

    I haven't looked at it in a while,
    but it was much faster than that. Are
    you sure it's caching connections
    and not opening a new one each time?
    That is the only explanation I can
    think of, from what I saw when I tested
    it out.
    null

  • Console message using OracleConnectionCacheImpl

    I just converted my JDBC connection mechanism to use an OracleConnectionCacheImpl. This is in a servlet-based app. Suddenly, I see a message on the console:
    Setting the user name and passwwdd zzzz zzzzThe zzzz's are my user id and password that I passed to the getConnection method of the OracleConnectionCacheImpl. I do not have any System.out.println statements (or any other statements) with this message in them. Is it coming from the OracleConnectionCacheImpl? If so, how can I turn it off? Obviously I don't want my database credentials printed clear text in my server logs!
    John H.

    I just converted my JDBC connection mechanism to use an OracleConnectionCacheImpl. This is in a servlet-based app. Suddenly, I see a message on the console:
    Setting the user name and passwwdd zzzz zzzzThe zzzz's are my user id and password that I passed to the getConnection method of the OracleConnectionCacheImpl. I do not have any System.out.println statements (or any other statements) with this message in them. Is it coming from the OracleConnectionCacheImpl? If so, how can I turn it off? Obviously I don't want my database credentials printed clear text in my server logs!
    John H.

  • Connection  Closed:- OracleConnectionCacheImpl

    WE are bulding an application to run 24/7 . We are using the connection the above class for connection pooling. This is the code the for the connection pooling
    public void SQLConnPool( OracleConnectionCacheImpl ocp) throws SQLException, Exception {
    OrclConn = ocp;
    OrclConn.setURL("jdbc:oracle:thin:@DEVL:1532:DEVL");
    OrclConn.setUser("SCOTT");
    OrclConn.setPassword("TIGER");
    OrclConn.setMaxLimit( 3);
    The database goes down in the night for backup. When we access the database for the first time in the morning , it is throwing an SQL exception from wherever it is trying to get the connection ( getConnection()). Bu if I try to access it again , it is going throu. Dont know whats happening. We are using 8.1.7 JDBC driver .
    Can anyone help me where i'm making wrong?.Also would like to know what this method will do ?
    setStmtCacheSize(int size)

    Hi,
    I've had the same problem. When the DB goes down OracleConnectionCacheImpl looses reference to all the connections it had open. If you attempt to get a connection from the pool after this, you should receive a SQL Exception: Closed Connection.
    I have not found any documentation on how the connections are handled after this, but from experience it seems that you will get the above error for as many connections you had in the Cache. So if you had 3 connections created, you will receive the error 3 times, after which a new connection is created and placed in the cache (hence no more errors). I am using a cache with 2 connections, but after the above happens, only 1 connection is recreated (not 2). I am using DYNAMIC_SCHEME but have not tried the others. Anyone have any other info on this?
    Thanks.
    Mauro

  • Synchronization for OracleConnectionCacheImpl

    Is the class oracle.jdbc.pool.OracleConnectionCacheImpl thread save? We got EmptyStackExceptions when calling getConnection() from different threads. After synchronizing those calls with a lock object the exceptions disappeared.
    If OracleConnectionCacheImpl is not thread save, how do I synchronize access to the cache and must closing a returned connection be synchronized, too?
    null

    After reading further back, this is
    a known issue, at least with 8.1.6,
    though officially it is thread safe
    (this is a bug).
    Suggestions I've seen:
    > use 8.1.7
    > synchronize on the occi object
    when calling getConnection.
    ch

  • OracleConnectionCacheImpl Behaviour

    Hi,
    I've got a J2EE application that's regularly failing to get a connection to a database.
    The application uses the Oracle JDBC 9.2 thin driver and is deployed on App Server 10g (9.0.4.0.0, JDK 1.4). This behaviour also happened when the application ran against 9iAS (9.0.3, JDK 1.3.1_02).
    I use an OracleConnectionCacheImpl connection cache (fixed wait scheme) and was previously getting problems if the application tried to get a connection and couldn't (cache connections stale, network problem etc.). I raised this as a TAR and was told that I may be hitting bug no. 2221358. The workaround was to set up a thread that connected to the database every couple of minutes, thus refreshing the connection cache and ensuring there are no stale connections.
    The thread workaround works fine but actually getting the connection is now the problem.
    I set up a loop so the application could try to get a connection 100 times before giving up and stopping. This is where I'm getting my problem. A couple of times a day now the application reports that it can't get a connection and is retrying. When it does get another connection, the number of connections in the cache has shot up.
    Here's an example of my connection code:
    for (i=0; i < 100; i++)
    try
    conn = oci.getConnection();
    break;
    catch (Exception e)
    if (this.log != null)
    log("Failed to get connection, retrying...");
    As this is happening a few times a day now, I'm concerned it's masking another more serious issue. The upshot for the user is that they sometimes are getting an HTTP error returned as the application can't get connected to return some data. In the worst case, the application becomes basically unavailable and I have to restart the OC4J container.
    As I mentioned, I use a thread to refresh the cache every few minutes and another thread to write to a log the number of connections in the cache. I've noticed that sometimes these threads appear to stop working for 20 - 30 minutes around the time of these connection failures.
    I appreciate this problem may be difficult to decipher but any help would be appreciated.
    Tks,
    Paul.

    Paul,
    Allow me to suggest the Oracle Application Server - General and OC4J forums as more appropriate.
    In any case, for a J2EE application, OC4J will handle the connection pooling for you -- you just need to correctly configure the "data-sources.xml" file (in the "j2ee/home/config" subdirectory of the OC4J installation).
    Here is a snippet from my "data-sources.xml" file:
    class="com.evermind.sql.DriverManagerDataSource"
    name="OracleDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/OracleDS"
    pooled-location="jdbc/OraclePoolDS"
    max-connections="10"
    min-connections="1"Also, "OracleConnectionCacheImpl" class is going to be deprecated, anyway.
    Good Luck,
    Avi.

  • OracleConnectionCacheImpl problems

    Hi,
    I've detected some problems when using the OracleConnectionCacheImpl.
    First, I'm using a FIXED_WAIT_SCHEME and the Cache timeout parameters don�t seem to work. The CacheInactivityTimeout work but doesn't�t respect the time specified by me.
    The CacheTimeToLiveTimeout doesn�t work at all. I use an UPDATE to lock a table and maintain the connection alive, the time expired and the connection doesn�t close until I released the table. Meanwhile all the inactive connection that expired during this experience doesn�t die until I released the lock on the earlier table. Someone can help me on this.
    When a connection was closed during an (UPDATE, INSERT) with autoCommit(false) the operation was committed. Why this happens? How could I change the connection parameters to in case of this happens rollbacks the session.
    Thanks,

    Just replying to my own mail....
    We've decided that currently there are too many problems with oracle and websphere working togather, so we're implementing a websphere + db2 solution.
    cheers,
    -- Anant

Maybe you are looking for

  • HT201303 How do i delete my credit card off my account?

    I dont have a credit card no more and its not letting choose the option of using my account without one.... I have already done this: Changing your payment information using a computer Open iTunes. Choose Store > Sign In. Enter your Apple ID and pass

  • Cloud vs physical

    Help with more information regarding the new Cloud vs physical copy. What best? Do I have to be online yo use my programs when using the monthly fee cloud service or can I be offline and only be online to recieve updates for the program? Sorry for th

  • UNIX Pipe(tail command) and java

    I want to read from a LOG file, which is being appended periodically. I have written a java program which can process on the addition made to the LOG file and display the result (as soon as something is added to the LOG file) My prgram works fine if

  • What I Import is not what I exported (IDML CS5)

    Hi, I'm evaluating Indesign Version 7. I have received an indd file and could read it in CS5 without any problem. I exported it to the IDML format in purpose of translating it. When reimporting it I noticed differences in the layout. After some tests

  • BT infinity 2 Random Disconnects

    Hi I have had BT infinity 2 for almost 3 weeks now but I have been disconnecting from install till today. The disconnects are random and I can disconnect 3 times a day or its stable for 4 days straight before disconnecting. My speed however stays clo