![]() |
User Authentication Using Cloudconnector
|
|
Using a Connection from a Connection PoolTo use a connection from a connection pool in your client application:
The following simple example opens a connection to BEA WebLogic, sets up a Properties object, and then opens a series of connections from the "eng" connection pool created in a previous example. Class.forName("COM.cloudscape.core.WebLogicDriver").newInstance(); // Set the weblogic.t3.connectionPoolID to specify // the connection pool to use the connection from; // specify userName and passwd for this connection. // Properties tengahProps = new Properties(); tengahProps.put("weblogic.t3.connectionPoolID", "eng"); tengahProps.put("user", "fred"); tengahProps.put("password", "fredPasswd"); Connection conn = DriverManager.getConnection( "jdbc:cloudscape:weblogic://localhost:7001"+ "&weblogic.t3.cacheRows=0", tengahProps); // Do some database work // Release the connection conn.close(); Note that the client releases the JDBC connection and returns it to the pool before disconnecting. When the JDBC connection is returned to the connection pool, all outstanding JDBC transactions are rolled back and closed. |
|
![]() Cloudscape Version 3.6 For information about Cloudscape technical support, go to: www.cloudscape.com/support/.Copyright © 1998, 1999, 2000 Informix Software, Inc. All rights reserved. |