Monday 18 June 2012

WEBLOGIC SERVER FAQ(ANS)--7

weblogic interview questions and answers

81.Why the JNDI required in Weblogic?

In Oracle WebLogic Server, JNDI serves as a repository and lookup service for J2EE objects, including:
    • Enterprise JavaBeans (EJB) home stubs
    • JDBC DataSources
    • JMS connection factories, queues, and topics
    • Remote Method Invocation (RMI) stubs
82.What is the use of Naming Services?

A naming service provides a method for mapping identifiers to entities or objects.

Term
Definition
Example
Binding
The association of an atomic name and an object
www.example.com is bound to 209.10.217.38.
Namespace
A set of unique names in a naming system
www.example.com/ products

83.Explain about Contexts and Sub-contexts in JNDI?
    • Subcontexts are referenced through the dot delimiters (.).
    • The subcontexts must be created before objects are placed into them.
    • Typically when objects are bound to a JNDI tree, subcontexts are automatically created based on the JNDI name.
 If the following context exists:  com.oracle.examples 
You cannot bind:  com.oracle.examples.ejb.SomeObject 
Without first creating:  com.oracle.examples.ejb 

84.How can I set deployment order for applications?

 WebLogic Server 8.1 allows you to select the load order for applications. See the ApplicationMBean LoadOrder attribute in Application. WebLogic Server deploys server-level resources (first JDBC and then JMS) before deploying applications. Applications are deployed in this order: connectors, then EJBs, then web Applications. If the application is an EAR, the individual components are loaded in the order in which they are declared in the application.xml deployment descriptor.

85.Can I refresh static components of a deployed application without having to redeploy the entire application? 

Yes. You can use weblogic.Deployer to specify a component and target a server, using the following syntax:
java weblogic.Deployer -adminurl http://admin:7001 -name appname -targets server1,server2 -deploy jsps/*.jsp

86.When should I use the -nostage option?

Set the staging mode to -nostage (using weblogic.Deployer or the Administration Console) if you don't want to copy deployment files but want to deploy an application from its present location. All target servers must be able to access the same set of deployment files.

87.When should I use the external_stage option?

Set -external_stage using weblogic.Deployer if you want to stage the application yourself, and prefer to copy it to its target by your own means.

88.What are the Deployment Tools for Developers?

WebLogic Server provides several tools for deploying applications and stand-alone modules:
  • wldeploy is an Ant task version of the weblogic.Deployer utility. You can automate deployment tasks by placing wldeploy commands in an Ant build.xml file and running Ant to execute the commands.
  • weblogic.PlanGenerator is a command-line tools that enables developers to export an application’s configuration for deployment to multiple WebLogic Server environments.
  • The deployment API allows you to perform deployment tasks programmatically using Java classes.
  • The autodeploy domain directory allows you to deploy an application quickly for evaluation or testing in a development environment.
89.What is the Deployment order of Weblogic Server at Server Startup time?

By default, WebLogic Server deploys applications and resources in the following order:
  • JDBC system modules
  • JMS system modules
  • J2EE Libraries and optional packages
  • Applications and stand-alone modules
  • Startup classes
Note: WebLogic Server security services are always initialized before server resources, applications, and startup classes are deployed. For this reason, you cannot configure custom security providers using startup classes, nor can custom security provider implementations rely on deployed server resources such as JDBC.

90.How will you “Kill the JVM” or running Weblogic server in different operating systems?

Each WebLogic Server instance runs in its own JVM. If you are unable to shut down a server instance using the scripts which are provided by the Weblogic (stopWeblogic.cmd/ stopManagedWeblogic.cmd), you can use an operating system command to kill the JVM.
Caution: If you kill the JVM, the server immediately stops all processing. Any session data is lost. If you kill the JVM for an Administration Server while the server is writing to the config.xml file, you can corrupt the config.xml file.
Some common ways to kill the JVM are as follows:
  • If the shell (command prompt) in which you start the server is still open, you can type Ctrl-C.
  • On a Windows computer, you can use the Task Manager to kill a JVM.
On a UNIX computer, you can use the “ps” command to list all running processes. Then you can use the kill command to kill the JVM .

91. Can I generate deployment descriptor files automatically?

Yes, WebLogic Builder automatically generates deployment descriptor files for your J2EE applications. See WebLogic Builder Online Help.

92.Can I set the deployment order for application modules? For standalone modules?

The Load Order attribute controls the deployment order of standalone modules and applications relative to other modules and applications of the same type.
For example, standalone EJBs with smaller Load Order values are deployed before those with higher values.
Modules that are deployed as part of an Enterprise Application (EAR file or directory) are deployed in the order in which they are specified in the application.xml deployment descriptor.

93.What is the difference between the WL_HOME/config/examples/applications folder and the WL_HOME/config/examples/stage folder?

The applications folder is intended for applications that are not yet ready for a production environment. WebLogic Server dynamically deploys the contents of the applications folder. The stage folder (or a folder that you create for the same purpose) is for storing copies of deployment files that are ready for deployment in a production environment (deployments that use the stage or external_stage deployment modes).

94.How do I turn the auto-deployment feature off?

The auto-deployment feature checks the applications folder every three seconds to determine whether there are any new applications or any changes to existing applications and then dynamically deploys these changes.
The auto-deployment feature is enabled for servers that run in development mode. To disable auto-deployment feature, use one of the following methods to place servers in production mode:
In the Administration Console, click the name of the domain in the left pane, then select the Production Mode checkbox in the right pane. 
At the command line, include the following argument when starting the domain's Administration Server: 
-Dweblogic.ProductionModeEnabled=true Production mode is set for all WebLogic Server instances in a given domain.

95.I downloaded the WebLogic Server installation file, but the installation program will not run. What should I do?

The installation file may have been corrupted during the download. Run a checksum on the installation file and check with technical support for the proper values.

96.Do I need to install WebLogic Server as root on Solaris?

No you don't need to be root, depending on directory permissions.

97.Can I run the Configuration Wizard outside the installer?

Yes. You can start the Configuration Wizard from the Start menu or using a script in the utils directory. See Creating Domains and Servers in Configuring and Managing WebLogic Server.

98.How do I edit the config.xml file?

The persistent configuration for a domain of WebLogic Servers and clusters is stored in an XML configuration file (config.xml). You can modify this file in the following ways:
  • Use the Administration Console. See "Using the Administration Console" in the Administration Console Online Help.
  • If you want to create scripts that automate domain management, use the weblogic.Admin utility. See "weblogic.Admin Command-Line Reference" in the .
  • If you want to create Java-based management applications, use the Java Management Extensions (JMX) Application Programming Interface (API). See the Programming WebLogic Management Services with JMX guide.
  • If you want to edit the config.xml file directly (not recommended), see the BEA WebLogic Server Configuration Reference.
99.What is the free pool?

The free pool is a data structure the EJB container uses to cache anonymous instances of a given bean type. The free pool improves performance by reusing objects and skipping container callbacks when it can.

100.Can I use the PointBase DBMS included with WebLogic Server for development or production?

PointBase Server is an all-Java DBMS product included in the WebLogic Server distribution solely in support of WebLogic Server evaluation, either in the form of custom trial applications or through packaged sample applications provided with WebLogic Server. Non-evaluation development and/or production use of the PointBase Server requires a separate license be obtained by the end user directly from PointBase.

0 comments:

Post a Comment