Programming JDBC for Oracle WebLogic Server

Oracle® Fusion Middleware Programming JDBC for Oracle WebLogic Server Programming JDBC for Oracle WebLogic Server Oracle Fusion Middleware Programming JDBC for Oracle WebLogic Server, 11 g Release 1 (10.3.1) E13726-01 Copyright © 2007, 2009, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property …
Note: The code above uses one of several available procedures for obtaining a JNDI context. For more information on JNDI, see Oracle Fusion Middleware Programming JNDI for Oracle WebLogic Server Pooled Connection Limitation Using WebLogic JDBC in an Application 2-3 2.1.3Possible Exceptions When a Connection Request Fails The weblogic.jdbc.extensions package includes the following exceptions that can be thrown when an application request fails. Each exception extends java.sql.SQLException. ? ConnectionDeadSQLException—generated when an application request to get a connection fails because the connection test on the reserved connection failed. This typically happens when the database server is unavailable. ? ConnectionUnavailableSQLException—generated when an application request to get a connection fails because there are currently no connections available in the pool to be allocated. This is a transient failure, and is generated if all connections in the pool are currently in use. It can also be thrown when connections are unavailable because they are being tested. ? PoolDisabledSQLException—generated when an application request to get a connection fails because the JDBC Data Source has been administratively disabled. ? PoolLimitSQLException—generated when an application request to get a connection fails due to a configured threshold of the data source, such as HighestNumWaiters, ConnectionReserveTimeoutSeconds, and so forth. ? PoolPermissionsSQLException—generated when an application request to get a connection fails a (security) authentication or authorization check. 2.2Pooled Connection Limitation When using pooled connections in a data source, it is possible to execute DBMS-specific SQL code that will alter the database connection properties and that WebLogic Server and the JDBC driver will be unaware of. When the connection is returned to the data source, the characteristics of the connection may not be set back to a valid state. For example, with a Sybase DBMS, if you use a statement such as “set rowcount 3 select * from y”, the connection will only ever return a maximum of 3 rows from any subsequent query on this connection. When the connection is returned to the data source and then reused, the next user of the connection will still only get 3 rows returned, even if the table being selected from has 500 rows. In most cases, there is standard JDBC code that can accomplish the same result. In this example, you could use setMaxRows() instead of set rowcount. Oracle
Download Programming JDBC for Oracle WebLogic Server.Pdf
