-
Oracle StructDescriptor caching (2 messages)
- Posted by: Steven Wood
- Posted on: April 13 2007 11:28 EDT
Hi, We are currently experienceing a performance hit creating oracle StructDescriptors. These are internally cached by oracle at the connection level so that calling StructDescriptor.createDescriptor(objectName, conn) will use a cached StructDescriptor if one exists against the given connection (the OracleConnection class actually uses putDescriptor() and getDescriptor() to do this). My question is - since we have a connection pool, it will take some time to be "warmed up" such that every connection in the pool has a cached StructDescriptor. I've tried caching the StructDescriptor in another java class and using the same one across multiple connections, this seems to work fine so far - does anyone happen to know if there would be any problems with this approach ? e.g. private StructDescriptor getStructDescriptor(String oracleObjectName, Connection conn) throws SQLException { StructDescriptor retVal = (StructDescriptor) CACHE.get(oracleObjectName); if (retVal == null) { retVal = StructDescriptor.createDescriptor(oracleObjectName, conn); ((oracle.jdbc.driver.OracleConnection) conn).putDescriptor(oracleObjectName, retVal); CACHE.put(oracleObjectName, retVal); } else { System.out.println("Using cached descriptor"); } return retVal; }Threaded Messages (2)
- Oracle StructDescriptor caching by Sudhakar Kanagarajan on January 15 2009 11:47 EST
- Need Input by malikarjun reddy on February 25 2013 04:16 EST
-
Oracle StructDescriptor caching[ Go to top ]
- Posted by: Sudhakar Kanagarajan
- Posted on: January 15 2009 11:47 EST
- in response to Steven Wood
Do someone have an answer for this? -
Need Input[ Go to top ]
- Posted by: malikarjun reddy
- Posted on: February 25 2013 04:16 EST
- in response to Steven Wood
@Steven Wood, is that approch ("caching descriptors in java"). correct?