Top 50 Weblogic Interview Questions You Must Prepare 19.Mar.2024

The usual process is that in case of any difficulty for the manager server to get connected to any administration server at the time of start up, there is an option for the managed server to retrieve the configuration related to it from the configuration files as well as other files involved. The information thus retrieved cannot be altered and it is possible only when the administration server is really available. When the administration server is unavailable, then the managed server enters into its independence mode for carrying out its operations.

Stage deployment is a kind of process in which the admin gets a physical copy which is distributed to the other instances.

Port number can be checked by using netstat-na|grep connected.

A server is an instance of weblogic.Server executing in a Java Virtual Machine (JVM).
A server:
1) Runs on a designated Oracle WebLogic Server machine
2) Has a dedicated amount of RAM
3) Is multithreaded
Two types of servers:
1) Administration Server
2) Managed Server

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.

config.xml is the central configuration repository for a domain. every resource you have configured from admin console or by command line or by any other tool registered under this file.WLS 9.x onwards, this file contain references to other xml configuration files also those are under your domain/config folder ( further sub folder under it for respective resources ).

These are the basic weblogic components
1)Domains
2)Admin Server
3) Managed Server
4) Node Manager
5) Weblogic Server Cluster

Managed servers communicate each other using t3 protocol internally.

Mulicast : Multicast is easier to explain over Unicast. Multicast is a broadcast UDP option for sending a packet/announcement over to a group that is listening on a specific multicast address and port over which the announcement is sent.There is a defined range for valid Multicast address (224.0.0.1 to 239.255.255.255). Everyone listening on the given address hears the announcement just like following a Twitter post. Some limitations with Multicast is the TTL (time to live) across machines/subnets/routers needs to be adjusted and the routers configured to retransmit the multicast packet across subnets
Unicast : Unicast is more of a point to point UDP option to send the packet to a specific member and not everyone. That way, unicast is more of a private conversation between two individuals while multicast is more of a shout to a group or room. Both are UDP based, so there can be losses unlike TCP that handles retransmissions on message loss. But Unicast can span across routers and does not have to worry about TTL without the everyone hearing the announcement. So, Network Admins in general prefer to go with Unicast over Multicast for these reasons

WebLogic Server uses two mechanisms to determine if a given server instance is unavailable. Each WebLogic Server instance in a cluster uses multicast to broadcast regular “heartbeat” messages that advertise its availability. By monitoring heartbeat messages, server instances in a cluster determine when a server instance has failed. The other server instances will drop a server instance from the cluster, if they do not receive three consecutive heartbeats from that server instance WebLogic Server also monitors socket errors to determine the availability of a server instance. For example, if server instance A has an open socket to server instance B, and the socket unexpectedly closes, server A assumes that server B is offline

 

boot.properties is the file used by admin or managed server during startup for username and password. it exist under your domain/servers/server_name/security folder.

WebLogic Server installs the following script that you can use to set the classpath that a server requires:
WL_HOMEserverbinsetWLSEnv.cmd (on Windows)
WL_HOME/server/bin/setWLSEnv.sh (on UNIX)

At the time of the creation of domain, the wizard for setting configuration asks for the details like user name, password etc. from the user who is logging in for the first time as an administrator. If the domain is created in development mode, the configuration wizard saves the encrypted password as well as the username inside an identity file. This file is available for reference during the time of booting so that in the absence of this file, system can prompt the user for the purpose of entering credentials. A new boot – identity file can be created if you want to change the use credentials or else if you are having the requirement of creating domain in the production mode.

By default weblogic admin server configured on port 7001 and SSL is on 7002.

In the WebLogic console, in the left navigation tree, click on "Environment", then "Servers". Then click on one of the servers in the list. Then click on the "Monitoring" tab. Look at the "WebLogic Version" field.

1) Domain is a logically related group of Oracle WebLogic Server resources that are managed as a single unit 
2) Domain Provides one point of administration 
3) Can logically separate:
         A) Development, test, and production applications
         B) Organizational divisions

When you create a domain, the Configuration Wizard prompts you to provide the username and password for an initial administrative user. If you create the domain in development mode, the wizard saves the username and encrypted password in a boot identity file.
A WebLogic Server instance can refer to a boot identity file during its startup process. If a server instance does not find such a file,it prompts you to enter credentials.
If you create a domain in production mode, or if you want to change user credentials in an existing boot identity file, you can create a new boot identity file.

By default, if a Managed Server is unable to connect to the specified Administration Server during startup, it can retrieve its configuration by reading a configuration file and other files directly. You cannot change the server’s configuration until the Administration Server is available. A Managed Server that starts in this way is running in Managed Server Independence mode.

There are three starting modes are available:
1) Stage mode : Administration Server copies the deployment files from their original location on the Administration Server machine to the staging directories of each target server
2) External Stage : target servers deploy using local copies of the deployment files, here the Administration Server does not automatically copy the deployment files to targeted servers in external_stage mode ; instead, you must copy the files to the staging directory of each target server before deployment.
3) No Stage : The Administration Server does not copy deployment unit files; instead, all servers deploy using the same physical copy of the deployment files, which must be directly accessible by the Administration Server and target servers

 

This is the process involving the tuning of work manager, chuck size, performance packs, chunk pool size and connection backlog buffering.

The Administration Server stores the master copy of the domain configuration, including the configuration for all Managed Servers in the domain. Each Managed Server stores a local copy of the domain configuration file. When a Managed Server starts, it connects to the Administration Server to synchronize the configuration. When the configuration is changed, the Administration Server sends the changed configuration to the Managed Servers.

These are the types.
1) Auto Deployment
2) Console
3) Command line – weblogic.deployer
4) ANT / WLST

The sun hotspot JDK default is made used for development, JRockit is the one used for production of WebLogic 11g as well as 12c. Operating system is another factor that helps in choosing the certified JDK JVM.

The WebLogic installation usually occurs in three different modes which are:

  • Graphical mode
  • Console mode
  • Silent mode.

Clustering is the process of grouping the servers together for accomplishing high percentage of scalability and availability.

When a Server crashes, the JAVA process no longer exists. When the Server is hung, it stops responding.We can use the WebLogic .ADMIN utility to ping the server. In case of a hang situation we can take multiple thread dumps and analyze the cause of hang

WebLogic clustering offers three important benefits:
@Scalability :  The capacity of an application deployed on a WebLogic Server cluster can be increased dynamically to meet demand. You can add server instances to a cluster without interruption of service — the application continues to run without impact to clients and end users.
@Load balancing : The ability to distribute requests across all members of the cluster, according tothe workload on each server.
3. High availability : A mix of features that ensure applications and services are available even if aserver or machine fails.Clients can continue to work with little or no disruption ina highly available environment. WebLogic achieves high availability using acombination of features: replication, failover, and migratable services.

 

Deployment descriptors are associated with almost all the modules as well as applications. The deployment descriptors can be seen in the form of XML documents and they are capable of describing the contents that are part of directory or the jar file. J2EE specifications usually define the standard as well as the deployment descriptors which are portable for J2EE applications and modules.

The WebLogic Server cluster broadcasts the availability of a new server instance each time a new instance joins the cluster. Cluster-aware stubs also periodically update their list of available server instances.

There are various capabilities associated with WebLogic server and they are

  • Changes in dynamic configuration
  • Production application redeployment
  • Rolling upgrades

A Java thread dump is a way of finding out what every thread in the JVM is doing at a particular point in time. This is especially useful if your Java application sometimes seems to hang when running under load, as an analysis of the dump will show where the threads are stuck.
1) Linux : kill -3 <ps_id>
2) Windows (console mode) : crtl+break
3) Windows (service) : beasvc -dump -svcname:mydomain_myserver

The major goal of performing the process of clustering is to make high scalability as well as availability of the servers possible. This process also helps in balancing the load in a proper manner and also accomplishes failover.

 

  • A WebLogic Server cluster consists of multiple WebLogic Server server instances running simultaneously and working together to provide increased scalability and reliability. 
  • A cluster appears to clients to be a single WebLogic Server instance. The server instances that constitute a cluster can run on the same machine, or be located on different machines. 
  • You can increase a cluster’s capacity by adding additional server instances to the cluster on an existing machine, or you can add machines to the cluster to host the incremental server instances. 
  • Each server instance in a cluster must run the same version of WebLogic Server.

There is no copy in the administrator but each and every server needs to contact the source directly for getting the item to be deployed.

Stubs perform the process of removing the failed instance from the list whenever there is a failure. The stub usually makes use of DNS for finding the running server and also for obtaining the list of the instances that are currently available with the application. List of the instances available with the server inside cluster gets periodically refreshment and allows in acquiring advantages associated with new servers. The advantages are gained as the server gets added to the cluster.

Secure Sockets Layer (SSL) provides secure connections by allowing two applications connecting over a network connection to authenticate the other's identity and by encrypting the data exchanged between the applications. Authentication allows a server and optionally a client to verify the identity of the application on the other end of a network connection. Encryption makes data transmitted over the network intelligible only to the intended recipient

Managed server is a server in a domain that is not the Administration server. It contacts the administration server for configuration information. It runs business application in a production environment. It is independent of all other Managed servers in a domain (unless they are not in a cluster). You can have many managed servers in a domain. Individual managed servers are typically added for capacity and application isolation.

There are many ways to start & stop weblogic Admin and managed servers:
You can start and stop Admin Server using :
1) Script
2) "Java weblogic.server "command(The weblogic.Server class is the main class for a WebLogic Server instance)
3) From startup option on windows
4) WLST with or without node manager
You can start managed servers using :
1) scripts
2) admin console
3) using WLST
4) using node manager
5) java weblogic.server command( The weblogic.Server class is the main class for a WebLogic Server instance )

Three types
1)Domain Configuration Wizard
2)Administration Console
3)Weblogic Scripting Tool

WebLogic is a J2EE application server and also an HTTP web server by Oracle , for Unix, Linux, Microsoft Windows, and other platforms. WebLogic supports Oracle, DB2, Microsoft SQL Server, and other JDBC-compliant databases.

To change Weblogic start up mode from DEV to production. One way to change it is, by simply editing setDomainEnv.cmd which resides in $root_domain/bin folder.
@Look for the line that sets the PRODUCTION_MODE script variable: set PRODUCTION_MODE
Add false to the value of the PRODUCTION_MODE variable to ensure the server starts in development 
Set true for starting in prod mode.
set PRODUCTION_MODE=false
@Save your changes and exit the text editor.

Admin Server is the central domain configuration interface which is used to create, delete and configure the resources of a domain like managed server, machine, cluster, data source, work managers etc.

 

There are two method of clustering Horizontal and Vertical.
Horizontal clustering : involves running multiple Java application servers that are run on two or more separate physical machines.Horizontal scaling is more reliable than vertical scaling, since there are multiple machines involved in the cluster environment, as compared to only one machine
Vertical clustering: however, consists of multiple Java application servers on a single physical machine.With vertical scaling, the machine's processing power, CPU usage, and JVM heap memory configurations are the main factors in deciding how many server instances should be run on one machine.

 

Node Manager is program that is used to control WebLogic Server instances. A single Node Manager instance is used to control all of the server instances running on the same physical machine or different machine.  These instances can reside in different clusters, domains, and such. You must configure each machine in your domain to communicate with Node Manager.

 

Here are some difference between Weblogic Development Mode and Production Mode:
Development Mode:
1) The default JDK for development domain is Sun Hotspot
2) You can use the demo certificates for SSL
3) Auto deployment is enabled
4) Server instances rotate their log files on startup
5) Admin Server uses an automatically created boot.properties during startup
6) The default maximum capacity for JDBC Datasource is 15
Production Mode:
1) The default JDK for production domain is JRockit
2) If you use the demo certificates for SSL a warning is displayed
3) Auto deployment is disabled
4) Server instances rotate their log files when it reaches 5MB
5) Admin Server prompts for username and password during startup
6) The default maximum capacity for JDBC Datasource is 25

MSI is nothing but Managed Server Independence. By default, Managed Servers can function independently of the Administration Server. A Managed Server instance can start in MSI mode if the Administration Server is unavailable. Configure MSI mode from the Administration Console.To start a Managed Server in MSI mode, perform the following:
Ensure that the Managed Server’s root directory contains the config subdirectory. If the config subdirectory does not exist, copy it from the Administration Server’s root directory.Start the Managed Server at the command line or by using a script.
Environment > Servers > Server_Name > Tuning > Advanced > Managed Server Independence Enabled check box

 

A cluster is part of a particular WebLogic Server domain.A domain is an interrelated set of  WebLogic Server resources that are managed as a unit. A domain includes one or more WebLogic Server instances, which can be clustered, non-clustered, or a combination of clustered and non-clustered instances. A domain can include multiple clusters. A domain also contains the application components deployed in the domain, and the resources and services required by those application components and the server instances in the domain.

The communication through cluster is made possible by the multicast IP as well as port by the process of sending periodic messages which are normally called as heartbeat messages.