Weblogic Interview Questions and Answers
1. What do you mean by WebLogic?
Weblogic server is basically a software application working on the middle tier, integrating the back-end database, related applications and the browser-based clients. A Weblogic server is an instance of a Java process and executes in a JVM. It supports all major JDBC compliant databases like Microsoft SQL Server, Oracle etc. There can be two types of Weblogic servers:
a. Administration server
b. Managed server
2. What are the major components of WebLogic?
A WebLogic server primarily comprises of the following:
- Admin server
- Managed server
- Node manager
- Weblogic server cluster
3. What are deployment descriptors?
Deployment descriptors are xml documents that are used in describing the contents of a jar file or a directory. These can be found in most of the modules and applications. The standard and deployment descriptors are defined by the J2EE applications and modules.
4. What do you mean by admin in WebLogic?
Admin server in WebLogic serves as the central point of control that allows you to gain access to configuration, monitoring and management of all resources. It is one of the instances of the WebLogic server that allows and maintains the data configuration of a given domain. It is a singleton service and every domain has at least 1 admin server.
5. What is web.xml?
Web.xml is an XML document that finds its applicability in the listing out of J2EE components and primarily used for application purposes. It also helps in the configuration of applications in J2EE module format.
6. What is a domain in web logic?
A logically related group of WebLogic server resources like Oracle and collectively managed as a single unit is called a domain. These can be used to logically separate organizational divisions, tests, production and development applications. Domains serve as a single administration point.
7. What is stage deployment?
Stage deployment refers to the process wherein the admin receives a physical copy that has been distributed among other instances.
8. What is a managed server?
A managed server is another instance of your WebLogic server that runs on the JVM and has a self-managed specific configuration. A managed server is used to deploy the components of Java-like EJB applications, Web applications, JMS applications and other related web services. A domain may or may not have a managed server and the count can go up to N number of managed servers. Until and unless the servers are in a cluster, a managed server always operates independently.
9. What is the relation between the administration server and managed servers?
The basic point of relation between the admin server and the managed server is that the admin server acts as a master manager for all the other servers including a managed server. To initiate the managed server start-up configuration, the admin server must be running. This is only a one-time process. Every managed server has a local copy of the configuration stored in it. Whenever there is an unavailability of the admin server, the managed server uses its local copy to boot. However, the managed server needs an admin server to synchronize its configurations over subsequent reboots.
10. What is BSU?
BSU stands for BEA Smart update which is a java based application used to apply patches on Weblogic servers. This utility allows you to work both online and offline.
11. What is a machine in WebLogic?
Any physical computer that is present or hosts instances in the WebLogic environment is called a machine. It is logically represented in a WebLogic server.
12. Can a managed server be started if the administration server is not available? How?
In case of the absence of an admin server, the managed server can start up by fetching the configuration files and other related files. However, the managed server is bound to work on the retrieved information and no alterations are possible. Alterations can only be done as and when the admin server is actually available. The managed server can carry out its operation in the independence mode until the availability of the admin server.
13. What is meant by SSL in WebLogic?
SSL stands for Secure Sockets Layer which is a security protocol enabling secure transfer of data and information in an encrypted format. Standard certificate authorities provide SSL certification to ensure authentication of the secure transfer of the data at the transport level.
14. Are there multiple ways to start and stop WebLogic servers? Name any 3
Yes, there are multiple ways to start and stop a weblogic server.
Following are the ways to start and stop admin server:
a. By using script
b. By using “Java weblogic.server” command
c. From the startup option on windows
Following are the ways to start and stop a managed server:
a. By sung scripts
b. By using admin console
c. By using node manager
15. How are T3 and HTTP protocols different?
The T3 protocol in a WebLogic server is used to establish a connection between the internal and external servers. It is also used in the implementation of RMI in a weblogic server.
HTTP is a protocol that is used for establishing communication between web server and the browser. It is authenticated by the World Wide Web Consortium, W3C.
16. How can you troubleshoot a server hang in WebLogic?
This can be dealt with by using java WebLogic.Admin PING and see if there is a normal response. Several thread dumps need to be checked with a kill-3 pid on unix and CTRL Break on windows. This step needs to be analyzed deeply to narrow down on a root cause.
17. What is a node manager?
A node manager is a controlling program that is used to manage and control the WebLogic server instances. It allows you to control all server instances that may be running on a single or multiple physical machines. To be able to communicate to a node manager, every machine must be configured with your node manager.
18. What are the different application layers in a WebLogic server?
There are three different application layers in a WebLogic server:
a. Presentation layer: it contains server containers and any other web application containers.
b. Business layer: it contains containers with business logic along with Entity Beans or Session Beans.
c. Service layer: it contains the services which are helpful in initiating the business logic functionality.
19. What is meant by multicasting in a WebLogic cluster?
Multicasting refers to establishing a peer to peer communication to initiate the process of messaging communications between different IP sockets.
20. What are the networking protocols deployed in Weblogic servers?
There are 8 different networking protocols deployed in a WebLogic server. These are:
a. SOAP- Simple object access protocol is a messaging protocol used in web service standard
b. HTTP- it is used in web standards for communication
c. HTTPS- it is used in the web browser along with SSL
d. IIOP- it is a secure WebLogic protocol
e. RMI- Remote Method Invocation allows the establishment of a connection in a disturbed environment.
f. T3- enables connection establishment between java applications over several network connections
g. T3S- A secure WebLogic protocol
21. How can you install a WebLogic server? Are there multiple ways to do so?
A WebLogic Server can be installed in three different modes:
a. Silent mode: uses configuration files, there is no manual intervention during the installation
b. Graphical mode: GUI interaction with the user during installation
c. Console mode: Command based interactive mode of installation
22. What is meant by JVM tuning in a WebLogic server?
JVM tuning refers to the enhancement and improvisation in the performance of a JVM execution engine in the WebLogic server. This is done by changing, adding or removing a few parameters in the WebLogic server like garbage collection or heap size, etc.
23. What are the capabilities of a WebLogic server?
The various capabilities of a WebLogic server are:
a. It allows rolling upgrades
b. It allows redeployment of the production application
c. It allows changes in the dynamic configuration
24. Can you change the default JVM in a WebLogic server?
Yes, we can change the default JVM in Weblogic servers. It can be done as follows:
a. Set JAVA_HOME in the start script of the server
b. Use JRockit javac.exe to change the config.xml of domain
c. Remove all Sun JVM switches from the start scripts server
25. How can you set a classpath in a WebLogic server?
A classpath in windows can be set using the following script WL_HOMEserverbinsetWLSEnv.cmd
26. How can you create a pooling within the Tomcat server?
A pooling in tomcat server can be created by:
a. Download 3 jar files: commons-dbcp-1.2 jar, commons-pool-1.3.jar and commons-collections-3.1 jar
b. Make an entry inside the server.sml of the tomcat factory.
27. Is a server crash different from the server hang? How?
Yes, it is different. When a server crash happens, the java process does not exist whereas in server hang the java process stops responding.
28. What causes the server to hang?
A server hang generally happens due to a memory leak, deadlock, longer than anticipated return time in a database query
29. What is meant by memory leak?
A memory leak is a condition in which the objects are retained in the heap even after they are no longer required.
30. How can you enable and disable MSI mode in WebLogic?
MSI mode can be enabled or disabled by ensuring that the managed server’s root directory has the configuration subdirectory available. The following command can be used: Environment > Servers > Server_Name > Tuning > Advanced > Managed Server Independence Enabled checkbox
31. What is the default port of a WebLogic admin server?
The default port for configuring the WebLogic server is port 7001.
32. How can you configure a DB connection pool?
DB or JDBC connection pools can be configured when the WebLogic server is started. The application you are running ideally borrows connection from the existing database pool and returns it back to the pool by closing it.
33. What is the main difference between WebLogic and WebSphere?
The basic difference in WebLogic and WebSphere lies in the standards used in their functionality. While a WebLogic server focuses primarily on the ease of use of J2EE and emerging standards governing them, the WebSphere is more focused on connectivity, web services, and integration.
Websphere is better in terms of transaction management and integration and strictly follows J2EE architecture.
34. How to deal with a failure in WebLogic?
The WebLogic server failure can be dealt with in the following ways:
a. Overload protection
b. Failover for clustered services
c. Automatic restart for failed server instances
d. Server level migration
e. Service level migration
f. Managed server independence (Mis) mode
35. How can you switch from a development mode to production mode in WebLogic 10.3?
The switch from development mode to production mode can be done as follows:
Go to the $root_domain/bin folder and edit the setDomainEnv.cmd.
Set PRODUCTION_MODE = false; save and exit to restart in production mode.
36. What are the features present in the WebSphere?
A WebSphere supports:
a. The functionality of the Servlet/JSP container that deploys HTTP
b. Various HTTP servers like Netscape iPlant, IBM HTTP etc.
c. HTML pages, servlets, XML, Java Server pages etc.
d. Workload management and EJB component model
37. How to call Oracle stored procedures that take no parameters?
The following syntax can be used to call such procedures:
CallableStatement cstmt = conn.prepare all(“Begin to proclaim;
38. How can you know about the WebLogic version?
Go to WebLogic console >> left navigation tree >> Environment >> servers >> click of any server >> click monitoring tab >> note the weblogic version field.
39. What is meant by OS tuning?
OS tuning refers to the process of tuning your operating system with a weblogic server by setting up TCP/IP parameters.
40. What is unicast and multicast?
Multicast is essentially a broadcast UDP option that allows sending of packets or announcements over a specific multicast address to a given group listening to the announcement. The announcements are similar to getting broadcast updates on most social media platforms like Twitter.
Unicast is more personalized and refers to one to one option for sending a packet or message to a particular member and not the whole group. It can be compared with personal messaging apps.
41. How to check a port number?
The port number of a WebLogic server can be checked by using netstat-na|grep connected
42. Is there a limit on the number of WebLogic servers held inside a multi-processor machine?
No, there can be any number of WebLogic servers held inside a multi-processor machine.
43. What is the function of boot.properties file in the WebLogic server?
The boot.properties file stores your credentials like user id and password
44. What is vertical and horizontal clustering?
There are 2 ways in which clustering can be done WebLogic server:
a. Vertical clustering: under this type, multiple java applications are run on a single physical machine.
b. Horizontal clustering: under this type, multiple java application servers are run over two or more than two physical machines. It accounts for higher reliability.
45. How does a server know if another server is unavailable?
Every WebLogic server instance in a WebLogic domain sends regular heartbeats via multicast broadcasting to all other servers in the cluster which is indicative of its presence. If three consecutive heartbeats go missing, the other server instances drop the particular server instance whose heartbeat goes missing.
46. How are notifications made upon the addition of a new server to the cluster?
A broadcast message regarding the addition of a new server instance is sent to all existing users in case there is an addition. A server instance list is also maintained and regularly updated by the cluster-aware stubs.
47. What is the function of the auto-deployment feature?
Auto deployment feature is a monitoring utility that checks the application folder in every 3 seconds to look for any potential changes in the existing applications and/or addition of any new applications. If there is any such change, it auto deploys these changes in the existing application dynamically. The same can be done by monitoring socket errors.
48. What is the mode of communication between managed servers?
Managed servers communicate through T3 protocol.
49. What is ANT?
ANT is a task that helps you carry out a smooth configuration of other tasks and applications in a developed environment.
50. What is Msi mode in weblogic?
MSI stands for Managed Server Independence. Managed servers have the ability to launch and operate even in the absence of the admin server.