Monday 18 June 2012

WEBLOGIC SERVER FAQ(ANS)--12

weblogic interview questions and answers

181.Explain about WebLogic Production Redeployment?


1.     Production redeployment:
1.     Allows two versions of a single Web application or module to run simultaneously
2.     Requires you to include unique version information either:
§  Within the application’s META-INF/MANIFEST.MF file
§  As part of the deployment process
2.     When a new version is redeployed, WLS automatically:
§  Routes existing clients to the prior (retired) version
§  Routes new clients to the new version
§  Undeploys the prior version when all existing clients finish their work or their conversations time out

182.What are the Requirements and Restrictions for Production Redeployment in WLS?

1.     Production redeployment is supported for:
§  Stand-alone Web Application (WAR) modules and Enterprise Applications (EARs) whose client accesses the application via a Web application (HTTP)
§  Enterprise Applications that are accessed by inbound JMS messages from a global JMS destination, or from inbound JCA requests
§  All types of Web Services, including conversational and reliable Web Services
2.     Production redeployment is not supported for:
§  Stand-alone EJB or Resource Archive (RAR) modules
§  Applications that use JTS drivers
§  Applications that obtain JDBC data sources via the DriverManager API instead of using the JNDI lookup
§  Applications that include the EJB 1.1 container-managed persistence (CMP) EJBs
3.     A deployed application must specify a version number.
4.     WLS can host a maximum of two different versions of an application at one time.
5.     When you are redeploying a new version of an application, the following features cannot change:    
§  Deployment targets
§  Security model
§  Persistent store settings

183.Redeploying Versus Distributing an applications in WLS?

1.     Distributing is an alternative to deploying an application.
§  Distributing an application prepares it for deployment by copying its files to all target servers and validating the files.
§  You can start a distributed application in Administration mode. Access to the application is then restricted to a configured Administration channel.
2.     Distributing a new version of the application makes it available for testing before being released for general consumption.
3.     Redeploying a new version of an application places the application immediately into use and makes it available to new client requests.

184.How will you Distributing a New Application Version in WLS?

1.     Use the weblogic.Deployer –distribute command.
2.     After the application is distributed, start the application in Administration mode.
3.     Test the application.
4.     When ready, start the application (without using –adminmode).
5.     Optionally set a retirement timeout for the older version of the application.

185.How will you Create MANIFEST.mf file for Production Redeployment?

1.     Create MANIFEST.mf with the following contents: 
Name: java/util/
 
Specification-Title: Java Utility Classes
 
Specification-Version: 1.2
 
Specification-Vendor: Sun Microsystems, Inc.
 
Implementation-Title: java.util
 
Implementation-Version: build57
 
Implementation-Vendor: Sun Microsystems, Inc.
2.     Then add an entry for WLS versioning:
                Weblogic-Application-Version: Version1.0Beta 

186.What is a cluster Definition?

1.     A cluster is a group of Oracle WebLogic Server instances that work in coordination.
2.     Clustering provides:
§  High availability
§  Load balancing
§  Scalability

187.What Is a Cluster? 

A cluster:
1.     Is a logical group of Oracle WebLogic Servers within a domain
2.     Supports features to 
provide high
 
availability for:
§  Whole servers
§  Web applications/services
§  EJB applications
§  JMS
3.     Is transparent to a client

188.What are the Benefits of Clustering?

1.     There are two main benefits of clustering together Oracle WebLogic Servers:
1.     Scalability
2.     High availability
2.     Scalability is the ability to provide more capacity for an application, in this case, by adding additional servers without having to make major architectural changes.
3.     High availability ensures that when a server (in a cluster) fails, there are other servers to take over the work, so that the client is not affected.
 
189.What are the Key Capabilities of clustering?

The key capabilities of a WebLogic cluster are:
1.     Application failover
§  When an object in an application that is performing a task becomes unavailable, another object takes over and finishes 
the job.
2.     Site failover
§  When all the services and applications in a single site fail, they can switch to a separate site and continue processing.
3.     Server migration
§  When a server fails, pinned services can be migrated to another server in a cluster.
4.     Load balancing
§  Tasks and communications are evenly distributed across multiple servers.

190.Explain about Cluster Architecture?

                Applications are generally broken into multiple tiers, each representing its distinct functionality:
1.     Web tier
2.     Presentation tier
3.     Business or object tier
                WebLogic provides clustering support for all three tiers.
                Other services, such as JMS and JDBC, can take advantage of clusters but load-balancing and failover is a little different.

191.How the Server will communicate in a Cluster?

The Oracle WebLogic Server instances in a cluster communicate with one another using two different techniques:
1.     Unicast/multicast (UDP)
2.     Sockets (peer-to-peer TCP)
·          The server instances use IP unicast or multicast to broadcast the availability of services and heartbeats that indicate continued availability.
·          IP multicast broadcasts one-to-many communications among clustered instances.
·          IP unicast is an alternative to multicast to handle cluster messaging and communications. The unicast configuration is much easier because it does not require cross-network configuration that multicast requires.
·          IP sockets are used for peer-to-peer communications between server instances.

192.Explain about Cluster Communication in WLS?

Members of a cluster cooperate to achieve high availability using the following:
1.     Broadcast messages such as “heartbeats”
2.     Peer-to-peer IP sockets
You can configure broadcast communication to use either:
1.     IP unicast
2.     A dedicated IP multicast address (224.0.0.0 through 239.255.255.255) and port
If heartbeats are not received from a cluster member, the server is marked as “failed” and its services are not used.

193.How the Weblogic Server detect a server Failure?
1.     
WebLogic clusters detect the failure of a server instance in the following ways:
1.     Through the use of IP sockets
2.     Through the Oracle WebLogic Server heartbeat
2.     If a server in the cluster unexpectedly closes its socket, it is marked as “failed” and its services are not used.
3.     Server instances use multicast to broadcast heartbeats every 10 seconds to the other server instances in the cluster.
     If three heartbeats are missed from a peer server, the server is marked as “failed” and its services are not used.

194.Explain about One-to-Many Communications in WLS?

Oracle WebLogic Server uses one-to-many communication for:
1.     Clusterwide JNDI updates
2.     Cluster “heartbeats”
                Because all one-to-many communications occur over IP multicast, when you design a cluster, consider the following factors:
1.     If your cluster spans multiple subnets, your network must be configured to reliably transmit messages.
2.     A firewall can break IP multicast transmissions.
3.     The multicast address should not be shared with other applications.
4.     Multicast storms may occur.

195.Explain about Peer-to-Peer Communications in WLS?

Oracle WebLogic Server uses peer-to-peer communications for:
                Accessing the nonclustered objects that reside on a remote server instance in the cluster
                Replicating HTTP session states and stateful session EJB states between a primary and a secondary server
                Accessing the clustered objects that reside on a remote server instance (typically, in a multitier cluster architecture)

196.Explain about Multitier Communications in WLS?

Multitier clusters require more IP sockets than a combined-tier cluster:
1.     One socket for replicating session states
2.     One socket for each Oracle WebLogic Server in the EJB cluster, for  accessing remote objects
                As an example, using a three-node cluster, the worst-case scenario would be five open sockets per server:
1.     One primary and secondary replicated session
2.     Each server simultaneously invokes a remote EJB method on each node in the cluster.

197.How many cluster Configuration Options are available in WLS?

There are multiple ways to create and configure an Oracle WebLogic Server cluster:
                Administration Console
                Configuration Wizard
                WebLogic Scripting Tool (WLST)
                Using the Cluster MBean

198.Explain about Two-Phase Deployment?

Applications are deployed using two-phase deployment (TPD).
Applications are copied to the cluster and activated in two phases:
     Phase 1: Application components and modules are distributed to the server.
     Phase 2: The application is deployed if phase 1 is successful and client access is permitted.
This ensures that an application is available and active on each node before clients can access it.

199.How will you Deploy Applications to a Cluster?

                All nodes must be running before an application is deployed to a cluster.
                If phase 2 of the two-phase deployment fails, the application is still deployed to other nodes in the cluster.
                WebLogic allows partial deployment of applications to a partitioned server.
                Session replication for deployed applications may fail if a node is partitioned at the time of deployment.
§  Avoid this by using the enforceClusterConstraints tag with weblogic.Deployer.
§  Or select the Enable Cluster Constraints check box in the console.
                Do not change cluster membership while deploying applications to the cluster.

200.Explain about HTTP Session Failover?

                Web applications use HTTP sessions to track information in server memory for each client.
                By default, when a client fails over to another server in the cluster, its session information is lost.
                Oracle WebLogic Server supports several Session Replication strategies to recover sessions from failed servers:
1.     In-memory replication
2.     JDBC replication
3.     File replication
                Replication is configured for each Web application within its weblogic.xml file.
                Similar options are available for stateful EJB applications.

0 comments:

Post a Comment