Statement cache  in connection cache

In my application , i have implemented connection cache mechanism using OracleConnectionImpl class, my application
gets the connection from connection cache and it makes JDBC calls(SELECT,UPDATE),and returns connection back to connection cache.
i am doing above steps repedetily, i am trying to implement statement cache mechanism for performance reasons, is statement cache
mechanism is suitable for above scenario.
i learned that statement chache is associated with a physical connection, in my case i am getting physical connection instances from a connection cache ,
using the connection for making JDBC calls and return back to cache. i am using several physical connection instances using connection cache,
is statement cache suitable for my application?
i need some help
thanks

Hi Elango,
Thank you, I have downloaded latest jdbc driver (9.2) as u suggested, now it's working well, but i found another problem in my application, as am using CLOB datatypes in my application, when i changed my driver classes to above one i am getting following problem while working with CLOB.
here i am giving my error stack:
java.io.IOException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:716)
at oracle.jdbc.driver.OracleClobWriter.flushBuffer(OracleClobWriter.java:270)
at oracle.jdbc.driver.OracleClobWriter.close(OracleClobWriter.java:232)
my application code as follows
BufferedReader xmlReader = new BufferedReader(new StringReader(clobXML)); //my xml string
CLOB clob = ((OracleResultSet) dbresultset).getCLOB(1);
Writer writer = clob.getCharacterOutputStream();
// writing xml into clob
String xmlString = "";
while ((xmlString = xmlReader.readLine()) != null) {
writer.write(xmlString);
xmlReader.close();
writer.close(); //problem here
when i am trying to close or flush the stream,it's giving above problem, otherwise it's working fine, but no data is stored in database.
the above code was working fine with my old driver classes.
any idea?
Thanks,
Sasi

Similar Messages

  • Connection Caching and Connection pooling

    Hi,
    I have question its about a concept which has been introduced by oracle called as connection caching (not sure if its a accepted in other app servers). I had a look at it and it is similar to wht a connection pool does. So can anyone out there explain me wht is the actual difference between these ?
    Thanks!

    i would ignore the idea all together, unlessyour
    connection has state or something, here readthis:
    http://nikhilb020875.wordpress.com/2006/05/24/cache-vs
    -pool/Hard to say for sure but I would guess your response
    is meaningless. It certainly isn't clear to me why
    you think that link is relevant.if you had read the first 2 lines from the page..I read the entire link.

  • Invalid connection cache name error while invoking a bpel process

    while invoking a service via DB adapter ,it gives invalid connection cache name orabpel 00000 error. the JCA connection is set properly and its reffered via jndi name in code. i tested the connection in EM and its working fine.
    Few transactions have passed and thereafter i'm getting this error.
    is there any parameter that needs to be set. Someone can help here!!

    Have got the same problem. Scenario at my end is little different though.
    I am trying to invoke a BPEL process from an ESB Service.
    I am trying to look into it..
    However, would be grateful, if someone can give some insight into this since many are running into this issue without being able to fix.
    Ashish.

  • Invalid or Stale Connection found in the Connection Cache

    Hi, all.
    I try to use Oracle MapViewer 11g to display real-time GPS data - JavaScrip API refreshes FOI every 10 seconds. And I get every 3-4 minutes "Invalid or Stale Connection found in the Connection Cache" error. Does anybody know how to prevent it?
    Thanks,
    Ihor.
    P.S. Here is the stack trace from mapviewer.log:
    24-Nov-2009 2:41:15 PM oracle.sdovis.theme.DynGeomThemeProducer prepareData
    SEVERE: Error fetching data.
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:41:15 PM oracle.sdovis.LoadThemeData2 run
    SEVERE: Exception fetching data for theme GPS_MESSAGES.
    Message:null
    Description: Nested exception is:
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:41:18 PM oracle.sdovis.theme.DynGeomThemeProducer prepareData
    SEVERE: Error fetching data.
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:41:18 PM oracle.sdovis.LoadThemeData2 run
    SEVERE: Exception fetching data for theme GPS_MESSAGES.
    Message:null
    Description: Nested exception is:
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:41:21 PM oracle.sdovis.theme.DynGeomThemeProducer prepareData
    SEVERE: Error fetching data.
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:41:21 PM oracle.sdovis.LoadThemeData2 run
    SEVERE: Exception fetching data for theme GPS_MESSAGES.
    Message:null
    Description: Nested exception is:
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:41:21 PM oracle.lbs.foi.FOIServlet doPost
    SEVERE: MAPVIEWER-06009: Error processing an FOI request.
    Message:Error fetching theme based FOI data.
    Tue Nov 24 14:41:21 EST 2009
    Severity: 0
    Description:
    Message:null
    Description: Nested exception is:
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:46:15 PM oracle.sdovis.theme.DynGeomThemeProducer prepareData
    SEVERE: Error fetching data.
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:46:15 PM oracle.sdovis.LoadThemeData2 run
    SEVERE: Exception fetching data for theme GPS_MESSAGES.
    Message:null
    Description: Nested exception is:
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:46:15 PM oracle.lbs.foi.FOIServlet doPost
    SEVERE: MAPVIEWER-06009: Error processing an FOI request.
    Message:Error fetching theme based FOI data.
    Tue Nov 24 14:46:15 EST 2009
    Severity: 0
    Description:
    Message:null
    Description: Nested exception is:
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:48:04 PM oracle.sdovis.theme.DynGeomThemeProducer prepareData
    SEVERE: Error fetching data.
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:48:04 PM oracle.sdovis.LoadThemeData2 run
    SEVERE: Exception fetching data for theme GPS_MESSAGES.
    Message:null
    Description: Nested exception is:
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:48:04 PM oracle.lbs.foi.FOIServlet doPost
    SEVERE: MAPVIEWER-06009: Error processing an FOI request.
    Message:Error fetching theme based FOI data.
    Tue Nov 24 14:48:04 EST 2009
    Severity: 0
    Description:
    Message:null
    Description: Nested exception is:
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:50:45 PM oracle.lbs.foi.ThemeAbortingThread run
    WARNING: Aborting theme: killing the theme rendering thread forcefully.
    24-Nov-2009 2:50:54 PM oracle.sdovis.theme.DynGeomThemeProducer prepareData
    SEVERE: Error fetching data.
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)
    24-Nov-2009 2:50:54 PM oracle.sdovis.LoadThemeData2 run
    SEVERE: Exception fetching data for theme GPS_MESSAGES.
    Message:null
    Description: Nested exception is:
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
    java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:403)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:374)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:178)
         at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
         at oracle.sdovis.ds.NativeOracleDataSource.getConnection(NativeOracleDataSource.java:306)
         at oracle.sdovis.ds.DSUtil.getDBConnection(DSUtil.java:103)
         at oracle.sdovis.theme.DynGeomThemeProducer.prepareData(DynGeomThemeProducer.java:307)
         at oracle.sdovis.Theme.prepareData(Theme.java:183)
         at oracle.sdovis.LoadThemeData2.run(LoadThemeData2.java:67)
         at oracle.sdovis.DBMapMaker.prepareThemes2(DBMapMaker.java:2289)
         at oracle.sdovis.DBMapMaker.prepareThemes(DBMapMaker.java:2221)
         at oracle.lbs.foi.FOIDataProducer.getFoiData(FOIDataProducer.java:143)
         at oracle.lbs.foi.ThemeRenderingThread.getFeatures(ThemeRenderingThread.java:742)
         at oracle.lbs.foi.ThemeRenderingThread.render(ThemeRenderingThread.java:244)
         at oracle.lbs.foi.ThemeRenderingThread.run(ThemeRenderingThread.java:159)

    The error looks like a generic jdbc/database problem. Will the error go away if you restart mapviewer?

  • Connection Cache change from 8.1.6 to 8.1.7?

    We are using Oracle's ConnectionCacheImpl class for our connection cache in an 8.1.6.3 application. When we move the app to 8.1.7.1 it seems like the app is only letting one connection through at a time.
    Are there any changes in connection pooling or cacheing between 8.1.6 and 8.1.7?
    System is SPARC Solaris 8, Thanks!

    I have no any problems after upgrade from 8.1.6 to 8.1.7.
    To ensure correct work of spatial functions, do not forget to validate packages and procedures in MDSYS user after upgrade :)))

  • Question on Oracle's Connection Cache

    Hi,
    I am using JSP's Javabean to connect to the database using Oracle's OracleConnectionCacheImpl for Connection Cache.
    My question is if I should synchronize the methods to initialize the Cache and to return the Connection object using the the cache? Thanks.

    I am facing problems with using Oracle's Implicit Connection cache and it returns 'null' connection from OracleDataSource when the maxLimit is reached and what I noticed is the OracleConnectionCache doesn't seem to return cached connections between running multi-thread requests.
    Scenario to produce the problem:
    1) Create a sample JSP file that uses 2 connections and close the 2 connections in 'finally' clause (print the active and idle connections before and after the datasource.getConnection()). Make sure you set the connectionCachingEnabled to true on your datasource.
    2) Define the maxLimit and other connectioncache properties in your context.xml file
    3) Run the test plan using JMeter and you can see that the connection becomes 'null' even though you are closing the connections right after its being used.

  • Oracle 9i - Invalid or Stale Connection found in the Connection cache

    Hi all,
    I did the following steps:
    1. Deployed my application in Jboss and started the jboss and my application.
    2. Re-started my database when the application is alive and running.
    3. Tried to login to the application.
    4. I got the following exception:
    NO MORE DATA TO READ
    5. Then i set the Oracle Data Source property DB_VALIDATE_CONNECTION=true via my application.
    6. But still i get the following exception when i log in first time to the application. But not in subsequent attempts. I am able to login to the application except for the first time.
    “java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache”.
    Please let me know why this exception occurs.
    Thanks!!

    The error looks like a generic jdbc/database problem. Will the error go away if you restart mapviewer?

  • Oracle 10 Connection Cache (another question)

    Hi all,
    We have a large web app which currently uses JRun connection pooling. This is causing some problems so we'd like to try the Oracle Connection Cache mechanism. The thing is, each time a client gets a database connection, it runs a connection factory which looks up the datasource with jndi then creates the connection. So, in order for the Oracle 10 Connection Cache to work, do I need to change the logic so the datasource is static & we just do the look up once & set the cache-related properties at that point so every connection uses the same datasource object? This seems to me the way to go.
    Thanks very much,
    Jim Greetham

    Perfectly Yes. If we try using Oracle's own Cahceing mechanism, it is out of our control. But if we custom deploy our own cacheing mechanism according to our need like you said, we need to develop our own codes using ojdbc6 driver available from Oracle.

  • 10g (10.2.0.2) driver XA Connection Cache / xa connection pooling

    According to this table: http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14355/overvw.htm#BABEAJHG, the XA Connection Cache was implemented in the 10.2 driver. However, I can't seem to get this to work. I noticed another user posted regarding this exact same problem about a month ago. Has anyone had any luck with this? Once I enable caching, I always get this exception:
    SQLException: Can not use getXAConnection() when connection caching is enabled.
    My code follows the code found here: http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14355/concache.htm#CACDBBJI. Basically:
    OracleXADataSource ods = new OracleXADataSource();
    ods.setConnectionCachingEnabled(true);
    ods.setConnectionCacheProperties(properties);
    ods.getXAConnection(); // <---- throws exception

    I would try connecting using an Oracle 8i client. Using a 10g client to connect to an 8i database is asking for trouble.
    For example, someone in the following link got the same error as you, apparently through using an unsupported version of TOAD. It doesn't prove that your error is also due to an incompatible client, but I would start there. If you still get the same error when using an 8i client, we can look at other possibilities.
    http://dbaspot.com/oracle-tools/411067-not-able-create-tables-using-toad.html
    Edited by: karluk on May 12, 2011 3:07 PM

  • How Long Can I cache JMS Connection ?

    Hi
    My servlets need to send messages to queues. For speed, I am creating and caching JMS connection and queue session in the servlet's init() method. The questions are
    1) Will the queue session or connection time out after a couple of days , assumimg the servlet never gets unloaded/reloaded in that period?
    2)Is there a way to figure out a connection /session status before trying to create a sender and catching exceptions ?
    Regards
    -m

    Hi,
    The connections do expire after few days hence the easiest way would be to have a double check ....ie.. as you are caching the connection and when ure trying to create a session from the connection keep a try-catch to determine if the connection has expired and if yes then you can create a new connection and cache it again. Now you can use this cached connection to create the sessions .
    Hope this helps
    neo

  • Keeping a connection cache alive between program executions (pool)?

    Hey all,
    I am using the Oracle Connection Cache to maintain a connection pool. I have a java application that simply retrieves a document from an Oracle 8.1.7 database during each execution. In order to avoid the overhead of establishing a connection every time this simpe application executes, I'd like to use a connection pool/cache. However, I am not sure how to keep this connection cache "alive" between executions of my program. Basically, I would like to keep a connection cache to the database for an infinite amount of time. Does anyone know how I would do that? This way, my Java application will never have to make a new physical connection to the database in order to retrieve a document. I would really appeciate any help as I have spent a lot of time searching/reading/testing.
    Thanks,
    Marcus

    An application server would be the easiest solution, at least from a high level. Application servers exist to provide services like connection pooling to Java applications-- they're very good at it.
    If we're talking about code that's already been designed and written and whose deployment would be adversely affected by going to an application server, converting the process to a deamon would probably be the easiest approach.
    If you were to go down this road, you'd first have to identify what precisely should trigger the application to run. Perhaps it's a GUI, perhaps it's the creation of a file in a certain directory, etc. Then, you'd need to have a thread that monitored that (or registered as a listner for the appropriate event if we're talking about a GUI) and "woke up" the application.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com

  • Oracle Connection Cache

    Hi Guys,
    i�ve just downloaded the ojdbc14.jar library from Oracle Site and i am kind of lost using it.
    What i want to do is when a physical connection isn�t in use anymore the application or the connection cache drop that connection.
    Can anybody help me !?

    I wrote my code like this:
    ods = new OracleConnectionCacheImpl(ocpds);
    ods.setCacheScheme(OracleConnectionCacheImpl.FIXED_WAIT_SCHEME);
    ods.setURL(strURL);
    ods.setUser(strUserName);
    ods.setPassword(strPassword);
    ods.setMaxLimit(2);
    ods.setMinLimit(1);
    ods.setCacheInactivityTimeout(1);
    ods.setCacheFixedWaitIdleTime(1);
    I�m not sure in how to use the last two lines (setCacheInactivityTimeout and setCacheFixedWaitIdleTime) and i don�t know if the parameter "1" is one minute or one second.
    Thanx in advance.

  • Restore state of listview connected with CollectionViewSource

    Hi it's 10 days that I'm stuck on saving and restoring state of ListView connected to collection ViewSource
    there's nothing special... the problem is that when I try to restore state save scrollview(extracting from ListView) position (VerticalOffset), then restoring, the position of scroll is wrong, so for eg. items in the middle of the listview are wrong.
    In few words all seem works, I mean saving and restoring,  but actually the scroll position is completely wrong, when I try to restore scrollposition near middle of the list, if the position to restore is near bottom or top it works fine.
    So, I mean, if I scrolled near item in the middle, then suspending and resuming the position is not right but is some items down...
    the listview is groupped with albums (group ) and songs (item), nothing special, here's a piece of code
    restore
    /// <summary>
           /// Invoked when this page is about to be displayed in a Frame.
           /// </summary>
           /// <param name="e">Event data that describes how this page was reached.
           /// This parameter is typically used to configure the page.</param>
           protected override void OnNavigatedTo(NavigationEventArgs e)
               //RESTORE
               if (!string.IsNullOrWhiteSpace(_pageKey)) return;   //vuol dire che lo stato è caricato e non necessita altro
               this._pageKey = "PageSongView";
               var frameState = SuspensionManager.SessionStateForFrame(this.Frame);
               if (frameState.ContainsKey(_pageKey))
                   var pageState = frameState[_pageKey] as Dictionary<String, Object>;
                   if (pageState.ContainsKey("AlbumListIn.VerticalOffset"))
                       var v_offset = (double?)pageState["AlbumListIn.VerticalOffset"];
                       AlbumListIn.Loaded += (snd, arg) =>
                           var scroll_viewer = VisualTreeHelperEx.ScanVisualTree<ScrollViewer>(AlbumListIn).First();
                           scroll_viewer.Loaded += (snd2, arg2) =>
                              scroll_viewer.ChangeView(null, v_offset, null, false);
    save
    protected override void OnNavigatedFrom(NavigationEventArgs e)
    //SAVE
    var frameState = SuspensionManager.SessionStateForFrame(this.Frame);
    var pageState = new Dictionary<String, Object>();
    _saveState(pageState);
    frameState[_pageKey] = pageState;
    private void _saveState(Dictionary<string, object> pageState)
    var scroll_viewer = VisualTreeHelperEx.ScanVisualTree<ScrollViewer>(AlbumListIn).First();
    pageState["AlbumListIn.VerticalOffset"] = (double?)scroll_viewer.VerticalOffset;
    var k = 0;
    in the xaml
    <ListView x:Name="AlbumListIn"
    ItemsSource="{Binding Source={StaticResource AlbumCollection}}"
    XamlHlp:XamlHelper.SetItemsCommand="{Binding Path=VM.SongItemControl.SelectedSongItemsCommand, Source={StaticResource SongService}}"
    SelectionMode="{Binding Path=VM.SongItemControl.IsMultipleSelection, Source={StaticResource SongService},Converter={StaticResource BoolSelMode}}"
    Style="{StaticResource AlbumSongZoomInStyle}"
    >
    <ListView.GroupStyle>
    <GroupStyle HeaderTemplate="{StaticResource AlbumListGroupHeaderDT }">
    </GroupStyle>
    </ListView.GroupStyle>
    </ListView>
    please help me I'm really stuck and I don't find any solution...

    >In few words all seem works, I mean saving and restoring,  but actually the scroll position is completely wrong, when I try to restore scrollposition near middle of the list, if the position to restore is near bottom or top it works fine.
    I think this may be due to cached UI layout, this need to measure again manually: 
    https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.uielement.measure.aspx?f=255&MSPPError=-2147217396
    https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.uielement.arrange.aspx
    If the above methods are not working, share a demo.
    Best Regards,
    Please remember to mark the replies as answers if they help

  • JRE Cache ignores the "Expire" and "Cache-Control: no-cache" directives.

    My applet is using HttpURLConection to retrieve data from a server with Caching enabled. The cache contents are "revalidated" (via "if-modfied-since") each time the applet is started. However, subsequent requests to retrieve the same resource are always read from the cache with no validation even if the resource has expired.
    The server is sending a valid "Expires:" tag and "Cache-Control: no-cache" tag in the response; but, the JRE refuses to recheck for an updated version of the resource even after the file has expired.
    The JRE does seem to understand the "Cache-Control: no-store" tag; but, this is inefficient (no caching at all) when I'm tring to get it to not refetch the resource unless there's a change. Is there some other tag that the JRE is expecting to see?

    I have a similar problem except that I want my pages to not cache at all. The server is setting the Cache-Control: max-age to 0 and the Expires to "now" but JRE seems to ignore these settings, but only sometimes. Sometimes pages are fetched from cache and sometimes from the server.
    In my applet I'm using a normal URLConnection like this:
    URLConnection uc = new URL("http://<server>/method").openConnection();
    uc.connect();
    InputStream is = uc.getInputStream();
    is.read();When my request headers look like this:
    accept-encoding: gzip
    Host: <server>
    Cache-Control: no-cache
    Pragma: no-cache
    User-Agent: Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_13
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-alivethe page will not be cached and is requested again but this time without the accept-encoding, Pragma and Cache-Control. The adding (and removal) of the headers seems to happen inside the JRE, though. I'm not explicitly setting them.
    The response header of the first request looks like this:
    HTTP/1.1 200 OK
    Date: Wed, 20 May 2009 12:55:07 GMT
    Server: Apache/2.2.11 (Win32) mod_jk/1.2.26 PHP/5.2.8
    Cache-Control: max-age=0
    Expires: Wed, 20 May 2009 12:55:07 GMT
    Vary: User-Agent,Accept-Encoding
    Content-Encoding: gzip
    Keep-Alive: timeout=120, max=79
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html;charset=iso-8859-1When the request is made with this header:
    User-Agent: Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_13
    Host: <server>
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-aliveThe response headers looks like this:
    HTTP/1.1 200 OK
    Date: Wed, 20 May 2009 12:55:07 GMT
    Server: Apache/2.2.11 (Win32) mod_jk/1.2.26 PHP/5.2.8
    Content-Length: 1016
    Cache-Control: max-age=0
    Expires: Wed, 20 May 2009 12:55:07 GMT
    Vary: User-Agent,Accept-Encoding
    Keep-Alive: timeout=120, max=83
    Connection: Keep-Alive
    Content-Type: text/html;charset=iso-8859-1And in this case the JRE sometimes fetches the request from the server and sometimes from cache. I have not been able to determine how the JRE decides to refresh, or why it sometimes sends an accept-encoding and Pragma header and sometimes not.
    any help would be appreciated.
    Alex

  • Increase the size of the cache using the cache.size= number of pages ?

    Hi All,
    I am getting this error when I do load testing.
    I have Connection pool for Sybase database that I am using in my JPD. I am using Database control of weblogic to call the Sybase Stored procedure.
    I got following exception when I was doing load testing with 30 concurrent users.
    Any idea why this exception is coming ?
    thanks in advance
    Hitesh
    javax.ejb.EJBException: [WLI-Core:484047]Tracking MDB failed to acquire resources.
    java.sql.SQLException: Cache Full. Current size is 2069 pages. Increase the size of the cache using the cache.size=<number of pages>
         at com.pointbase.net.netJDBCPrimitives.handleResponse(Unknown Source)
         at com.pointbase.net.netJDBCPrimitives.handleJDBCObjectResponse(Unknown Source)
         at com.pointbase.net.netJDBCConnection.prepareStatement(Unknown Source)
         at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1133)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:917)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:905)
         at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:350)
         at weblogic.jdbc.wrapper.JTSConnection.prepareStatement(JTSConnection.java:479)
         at com.bea.wli.management.tracking.TrackingMDB.getResources(TrackingMDB.java:86)
         at com.bea.wli.management.tracking.TrackingMDB.onMessage(TrackingMDB.java:141)
         at com.bea.wli.management.tracking.TrackingMDB.onMessage(TrackingMDB.java:115)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

    hitesh Chauhan wrote:
    Hi All,
    I am getting this error when I do load testing.
    I have Connection pool for Sybase database that I am using in my JPD. I am using Database control of weblogic to call the Sybase Stored procedure.
    I got following exception when I was doing load testing with 30 concurrent users.
    Any idea why this exception is coming ?
    thanks in advance
    Hitesh Hi. Please note below, the stacktrace and exception is coming from the
    Pointbase DBMS, nothing to do with Sybase. It seems to be an issue
    with a configurable limit for PointBase, that you are exceeding.
    Please read the PointBase configuration documents, and/or configure
    your MDBs to use Sybase.
    Joe
    >
    javax.ejb.EJBException: [WLI-Core:484047]Tracking MDB failed to acquire resources.
    java.sql.SQLException: Cache Full. Current size is 2069 pages. Increase the size of the cache using the cache.size=<number of pages>
         at com.pointbase.net.netJDBCPrimitives.handleResponse(Unknown Source)
         at com.pointbase.net.netJDBCPrimitives.handleJDBCObjectResponse(Unknown Source)
         at com.pointbase.net.netJDBCConnection.prepareStatement(Unknown Source)
         at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1133)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:917)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:905)
         at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:350)
         at weblogic.jdbc.wrapper.JTSConnection.prepareStatement(JTSConnection.java:479)
         at com.bea.wli.management.tracking.TrackingMDB.getResources(TrackingMDB.java:86)
         at com.bea.wli.management.tracking.TrackingMDB.onMessage(TrackingMDB.java:141)
         at com.bea.wli.management.tracking.TrackingMDB.onMessage(TrackingMDB.java:115)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

Maybe you are looking for

  • I can't see my screen! What's the deal?

    Oh yeah, hi everyone. I'm new to the forums. So yeah, I have an ibook g4 that I use almost every day. It's fairly new (not quite 7 months) and it's already having problems. I've dealt with Apple and their product service before with my iPod, and i'm

  • How do I download a movie from my zip drive

    I have a movie my husband got for me from his work, how do I get it from my zip drive to my I tunes movie section, and how do I get my home video in the home vidieo section?

  • WS-Addressing in case of Adapter Services

    How can I use WS-Addressing to dynamically bind Adapter Services (JMS / File), etc? Because obviously here, the EndpointReference cannot be serialized as SOAP Headers (as SOAP is not used). What needs to be done in this case? Is there a way of serial

  • View CR in Interactive mode

    Hi, Can anyone tell me if we can view a Crystal Report in infoview in interactive mode just like viewing a webi report in interactive mode. I have changed the mode to interactive under webi in InfoView preferences, but there is nothing like that for

  • Great Customer Care

    Wasn't really sure where I could put this but wanted to tell the story if I could. Basically I have been on a roller coaster of iPhone problems. My first iPhone's touch screen started crapping out on me very intermittently so I called support and sen