crystal report barcode ean 13 CONNECTION POOLING AND CACHING in Font

Encode Code 39 in Font CONNECTION POOLING AND CACHING

CHAPTER 14 CONNECTION POOLING AND CACHING
Code 3 Of 9 Maker In None
Using Barcode printer for Font Control to generate, create ANSI/AIM Code 39 image in Font applications.
www.OnBarcode.com
Making PDF 417 In None
Using Barcode creation for Font Control to generate, create PDF-417 2d barcode image in Font applications.
www.OnBarcode.com
SERVER --------------DEDICATED DEDICATED DEDICATED DEDICATED
Code 128 Encoder In None
Using Barcode creation for Font Control to generate, create Code 128 image in Font applications.
www.OnBarcode.com
Generating ECC200 In None
Using Barcode creation for Font Control to generate, create Data Matrix 2d barcode image in Font applications.
www.OnBarcode.com
SERVER_PID -----------2460 3528 3288 2132
Painting Denso QR Bar Code In None
Using Barcode encoder for Font Control to generate, create Quick Response Code image in Font applications.
www.OnBarcode.com
Drawing Code 39 In None
Using Barcode drawer for Font Control to generate, create Code 39 Extended image in Font applications.
www.OnBarcode.com
USERNAME ---------SCOTT SCOTT SCOTT BENCHMARK
Barcode Encoder In None
Using Barcode generation for Font Control to generate, create Barcode image in Font applications.
www.OnBarcode.com
Encode 4-State Customer Barcode In None
Using Barcode creation for Font Control to generate, create Intelligent Mail image in Font applications.
www.OnBarcode.com
Finally, we press Enter again and see After closing the first connection. Press Enter to continue... After the first connection is closed, when we execute the preceding query, we get the same results as before (four connections). This is, of course, because closing the logical connection does not result in a closing of the physical connection. To manage your implicit caches, Oracle provides you with an API in the form of the class OracleConnectionCacheManager we ll look at it in the next section.
Code 39 Full ASCII Scanner In Visual Basic .NET
Using Barcode scanner for .NET Control to read, scan read, scan image in VS .NET applications.
www.OnBarcode.com
Code39 Creation In C#
Using Barcode encoder for .NET framework Control to generate, create Code 39 image in .NET applications.
www.OnBarcode.com
The OracleConnectionCacheManager Class
Universal Product Code Version A Decoder In C#
Using Barcode decoder for .NET framework Control to read, scan read, scan image in VS .NET applications.
www.OnBarcode.com
Barcode Generation In Objective-C
Using Barcode printer for iPad Control to generate, create Barcode image in iPad applications.
www.OnBarcode.com
OracleConnectionCacheManager provides methods for the middle tier to centrally manage one or more connection caches that share a JVM. Each cache is given a unique name (implicitly or explicitly). The OracleConnectionCacheManager class also provides information about the cache, such as number of physical connections that are in use and the number of available connections. The following sections describe some of the more commonly used methods that this class provides, with short descriptions. For a complete list of supported methods, please refer to Oracle Database JDBC Developer s Guide and Reference (for 10g).
GS1-128 Generation In Objective-C
Using Barcode creator for iPad Control to generate, create GS1 128 image in iPad applications.
www.OnBarcode.com
Encoding DataMatrix In Objective-C
Using Barcode printer for iPad Control to generate, create ECC200 image in iPad applications.
www.OnBarcode.com
createCache()
PDF 417 Generator In Java
Using Barcode drawer for Android Control to generate, create PDF 417 image in Android applications.
www.OnBarcode.com
Making QR Code JIS X 0510 In Objective-C
Using Barcode creation for iPad Control to generate, create QR Code image in iPad applications.
www.OnBarcode.com
Using createCache(), you can create a connection cache with a given DataSource object and a Properties object. It also allows you to give a meaningful name to the cache, which is useful when you are managing multiple caches in the middle tier. The second variant listed generates a name for the cache internally. public void createCache(String cacheName, javax.sql.DataSource datasource, java.util.Properties cacheProperties ); public void createCache(javax.sql.DataSource datasource, java.util.Properties cacheProperties );
Scanning Data Matrix ECC200 In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Printing EAN / UCC - 13 In Java
Using Barcode generation for Java Control to generate, create GS1-128 image in Java applications.
www.OnBarcode.com
removeCache()
EAN-13 Printer In Java
Using Barcode generation for Java Control to generate, create EAN 13 image in Java applications.
www.OnBarcode.com
Matrix Barcode Creator In Visual Basic .NET
Using Barcode generation for .NET Control to generate, create Matrix image in .NET applications.
www.OnBarcode.com
This method waits timeout number of seconds for the in-use logical connections to be closed before removing the cache. public void removeCache(String cacheName, int timeout);
CHAPTER 14 CONNECTION POOLING AND CACHING
reinitializeCache()
This method allows you to reinitialize the cache with the new set of properties. This is useful in dynamically configuring the cache based on runtime load changes and so forth. public void reinitializeCache(String cacheName, java.util.properties cacheProperties)
Caution Invoking reinitializeCache() will close all in-use connections.
enableCache() and disableCache()
These two methods enable or disable a given cache. When the cache is disabled, in-use connections will work as usual, but no new connections will be served out from the cache. public void enableCache(String cacheName); public void disableCache(String cacheName);
getCacheProperties()
This method gets the cache properties for the specified cache. public java.util.Properties getCacheProperties(String cacheName)
getNumberOfAvailableConnections()
This method gets the number of connections in the connection cache that are available for use. public int getNumberOfAvailableConnections(String cacheName)
getNumberOfActiveConnections()
This method gets the number of in-use connections at a given point of time for a given cache. public int getNumberOfActiveConnections(String cacheName)
setConnectionPoolDataSource()
This method sets the connection pool data source for the cache. All properties are derived from this data source. public void setConnectionPoolDataSource(String cacheName, ConnectionPoolDataSource cpds)
CHAPTER 14 CONNECTION POOLING AND CACHING
An Example of Using the OracleConnectionCacheManager API
Let s look at the program DemoOracleConnectionCacheManager, which illustrates using some of the methods of the OracleConnectionCacheManager class. First, we import the classes and set up OracleDataSource as usual: /* This program demonstrates using the Oracle connection cache manager API. * COMPATIBLITY NOTE: runs successfully against 10.1.0.2.0 */ import java.sql.Connection; import java.util.Properties; import oracle.jdbc.pool.OracleDataSource; import oracle.jdbc.pool.OracleConnectionCacheManager; class DemoOracleConnectionCacheManager { public static void main(String args[]) throws Exception { OracleDataSource ods = new OracleDataSource(); ods.setURL ( "jdbc:oracle:thin:@rmenon-lap:1521:ora10g" ); ods.setUser("scott"); // username ods.setPassword("tiger"); // password We then enable implicit connection caching: // enable implicit caching ods.setConnectionCachingEnabled( true ); Next, we set the connection cache properties and print them out: // set cache properties (use a properties file in production code.) Properties cacheProperties = new Properties(); cacheProperties.setProperty( "InitialLimit", "2" ); cacheProperties.setProperty( "MinLimit", "3" ); cacheProperties.setProperty( "MaxLimit", "15" ); ods.setConnectionCacheProperties(cacheProperties); System.out.println("Connection Cache Properties: "); System.out.println("\tInitialLimit: 2"); System.out.println("\tMinLimit: 3"); System.out.println("\tMaxLimit: 15"); We create the connection cache and explicitly give it a name (CONNECTION_CACHE_NAME is a constant defined later in the file): // create the connection cache OracleConnectionCacheManager occm = OracleConnectionCacheManager.getConnectionCacheManagerInstance(); occm.createCache( CONNECTION_CACHE_NAME, ods, cacheProperties ); System.out.println( "Just after creating the cache, " + "active connections: " + occm.getNumberOfActiveConnections( CONNECTION_CACHE_NAME ) + ", available connections: " + occm.getNumberOfAvailableConnections( CONNECTION_CACHE_NAME ) );
Copyright © OnBarcode.com . All rights reserved.