Search your topic in Java2share
Home > FAQs
eXTReMe Tracker

Weblogic Application Server FAQs

101.How can I enable Oracle Advanced Security encryption on the JDBC Oracle Thin driver with a WebLogic JDBC Connection Pool?
Oracle Advanced Security encryption relies on features available through connection properties in the JDBC driver from Oracle. You can specify connection properties in a WebLogic JDBC connection pool in the Properties attribute. This attribute is available on the JDBC Connection Pool —> Configuration —> General tab in the Administration Console. When WebLogic Server creates database connections for the connection pool, it passes the properties to the JDBC driver so that connections are created with the specified properties.
For example, to enable Oracle Advanced Security encryption, you may want to specify the following options:
Properties:  user=SCOTT                    
Note: See the Oracle documentation for details about required properties for Oracle Advanced Security encryption. Properties listed above are for illustration only.

The resulting entry in the config.xml file would look like:
Note: Line breaks added for readability.

102.When should I use a TxDataSource instead of a DataSource?
When you select Honor Global Transactions in the Administration Console, you create a JDBCTxDataSource in the config.xml file (the default). If you clear the Honor Global Transactions check box, you create a JDBCDataSource in the config.xml file. See "When to Enable Global Transactions in a Data Source" in the Administration Console Online Help.
103.Can I enable requests to a JDBC connection pool for a database connection to wait until a connection is available?
Yes. You can set two JDBC connection pool properties to enable connection requests to wait for a connection:

  • ConnectionReserveTimeoutSeconds
  • HighestNumWaiters

104.What happens when my database is restarted or becomes unreachable? Does my connection pool stick around?
Yes. The pool is independent of its ability to communicate with to the DBMS. All connections in the connection pool may become defunct, but the connection pool still exists. You can configure the connection pool so that WebLogic Server tests the connections in the pool and replaces bad connections when it can.

To manually restart the connection pool using the Administration Console after a database failure, you can undeploy the connection pool by removing all of its deployment targets, and then redeploy the connection pool by adding deployment targets.

To do this from the command line using "weblogic.Admin", set the "Targets" attribute of the pool to an empty string ("") and then set it to the desired set of targets.
105.When should I use MultiPools?
You can use MultiPools in one of two ways
1)  For high availability in the event a database connection fails, or
2)  For load balancing between JDBC connection pools. Because you can choose only one option, you need to determine the primary purpose of your MultiPool.

Note: If you implement Multipools for a JDBC application, do not configure driver-level load balancing or failover for the connection pools used by the MultiPool—the MultiPool provides the same functionality as configuring driver-level load balancing or failover.
106.What is JDBC?
JDBC is an API for accessing databases in a uniform way.
JDBC provides:

    • Platform-independent access to databases
    • Location transparency
    • Transparency to proprietary database issues
    • Support for both two-tier and multitier models for database access

The Java Database Connectivity (JDBC) specification:

    • Is a platform- and vendor-independent mechanism for accessing and updating a database
    • Provides transparency from proprietary vendor issues
    • Requires the use of a driver

JDBC drivers are supplied by WLS or your database vendor.
107.What is the use of Data Source in Weblogic?
Data sources:

    • Allow database connectivity to be managed by the application server
    • Use a dynamic pool of reusable database connections
    • Are obtained by applications from the server’s JNDI tree

108.What is the scope of the Data Source in Weblogic server?

    • Each data source configuration or “module” is persisted as a separate XML document.
    • The system modules that are created with the console or WLST are:
      • Stored in the domain's config/Jdbc directory
      • Available to all applications in the domain
    • Application-specific modules are:
      • Deployed as part of Java EE enterprise applications
      • Accessible only by the containing application

109.List default Weblogic provided JDBC Drivers?

    • Oracle and third-party drivers are included in WLS installation for many popular database products:
      • Oracle 9i, 10g, and 11g
      • Sybase Adaptive Server
      • Microsoft SQL Server
      • IBM DB2
      • Informix
      • MySQL
      • PointBase
    • By default, these drivers are added to server’s classpath.

110.What is a Data Source?

    • A data source object provides a way for a JDBC client to obtain a database connection from a connection pool.
    • A data source:
      • Is stored in the Oracle WebLogic Server JNDI tree
      • Can support transactions
      • Is associated with a connection pool