Monday 18 June 2012

WEBLOGIC SERVER FAQ(ANS)--8

weblogic interview questions and answers

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             
oracle.net.encryption_client=ACCEPTED            
oracle.net.encryption_types_client=RC4_256             oracle.net.crypto_checksum_client=ACCEPTED             
protocol=thin
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:
<JDBCConnectionPool    
DriverName="oracle.jdbc.driver.OracleDriver"    
Name="oraclePool"    
Password="{3DES}1eNn7kYGZVw="    
Properties="user=SCOTT;    
oracle.net.encryption_client=ACCEPTED;    
oracle.net.encryption_types_client=RC4_256;    oracle.net.crypto_checksum_client=ACCEPTED;   
 protocol=thin"    
URL="jdbc:oracle:thin:@server:port:sid"/>
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
111.What is a Connection Pool?
    • A connection pool is a group of ready-to-use database connections associated with a data source.
    • Connection pools:
      • Are created at Oracle WebLogic Server startup
      • Can be administered using the Administration Console
      • Can be dynamically resized to accommodate increasing load
112.What are the benefits of having Data Sources and Connection Pools in Weblogic?
    • The following are some advantages of this approach:
      • Time and overhead are saved by using an existing database connection.
      • Connection information is managed in one location in the Administration Console.
      • The number of connections to a database can be controlled.
      • The DBMS can be changed without the application developer having to modify the underlying code.
  • A connection pool allows an application to “borrow” a DBMS connection
113.How Data Sources are used in Weblogic?

A client retrieves a data source through a JNDI lookup and uses it to obtain a database connection.

114.What is Multi Data Sources?
    • Multi data source:
      • Is an abstraction around a group of data sources
      • Determines which data source to use to satisfy the request depending on the algorithm selected in the multi data source configuration:
        • Load balancing or failover
      • Is bound to the JNDI tree
    • XA support for multi data sources:
      • The WLS JDBC supports using multi data sources in XA transactions.
      • You can configure the data sources contained within the multi data source to use XA JDBC drivers.
115.What is the functionality of “Message-Oriented Middleware”?
  • Message-oriented middleware refers to an infrastructure that supports messaging.
  • Typical message-oriented middleware architectures define the following elements:
  • Message structure
  • The way to send and receive messages
  • Scaling guidelines
116.Explain about Point-to-Point (Queue)?

Many producers can serialize messages to multiple receivers in a queue.

117.Explain about Publish-Subscribe (Topics)? 

Publishing and subscribing to a topic decouples producers from consumers.

118.Explain about Oracle WebLogic Server JMS Features? 

Oracle WebLogic Server JMS supports:
    • PTP and pub/sub domains
    • Guaranteed and transactional message delivery
    • Durable subscribers
    • Distributed destinations
    • Recovery from failed servers
119.How will you implement “Messaging Service” in Weblogic?
    • In Oracle Weblogic Server, the messaging service is implemented through a JMS server.
    • A JMS server receives and distributes messages.
120.What is the user of “Connection Factories” in JMS?
    • JMS connection factories are used to set default client connection parameters, including:
      • Message priority
      • Message time-to-live (TTL)
      • Message persistence
      • Transactional behavior
      • Acknowledgement policy
      • Flow control
    • WLS provides a default client connection factory that:
      • Uses WebLogic’s default connection settings
      • Is located on the server JNDI tree at weblogic.jms.ConnectoryFactory

0 comments:

Post a Comment