Preparing for an interview about managing Java applications at the enterprise level? You may face questions about the WebLogic Server, a widely used Java application server. To impress your interviewer and get the job, prepare by mastering WebLogic Architecture, features, and configuration settings. This guide provides expert tips and common interview questions.
In this article, we will cover the following:
WebLogic Interview Questions and Answers
Q1) How do you differentiate between a server hang and a server crash issue?
- 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 the hang.
Q2) What can be the various reasons for a server crash?
- Native IO
- SSL Native Libraries
- Supported Configuration
- JDBC Driver issue
Q3) How do you troubleshoot a crash?
- JVM crash generates a hs_err_pid file. We need to look into the stack trace of the hs_err_pid file.
- If the thread is from a native i/o, we need to disable native io.
- if the stack trace is from the driver, we need to get in touch with the drive team.
- Quite possibly it's a problem with the driver. Changing the type of driver can be a workaround.
- If the thread shows it coming from an optimized code, we can turn off optimization. If the stack is from native calls of the application, it's a bug with the application and it has to b modified.
Q4) How do you troubleshoot Server Hang?
Ans: We can use Java WebLogic. Admin PING to check if we get a normal response. We need to take multiple thread dumps with kill -3 paid on Unix and CTLR Break on Windows. Analyze the thread dump to find the root cause.
Q5) What can be the reasons for the Server hang?
Ans: Memory leak, database query taking a long time to return, Deadlock.
Q6) What is a memory leak?
Ans: A memory leak is when objects are not removed from the heap even when they are not required.
|Inclined to build a profession as Weblogic Developer? Then here is the blog post on, explore Weblogic Training
Q7) What are the various causes for OUT OF MEMORY?
- Insufficient heap size, not able to match the extra load.
- Objects lying too long, like HTTP Sessions.
- Memory leak in application code.
- Full GC not happening due to JVM Bug.
Q8) How to troubleshoot and overcome such issues?
- Gather memory data by enabling GC verbose.
- If it's due to Http Session, timing out the HTTP session after a certain interval might help.
- Look into the code for JDBC connection handling.
- Optimizing the heap size according to the load.
Q9) When does High CPU Usage occur?
Ans: It occurs when one process or one thread utilizes an unexpectedly high proportion of CPU.
Q10) How to troubleshoot it?
Ans: In the Solaris environment, we need to take pstack and prstack and see what the threads are doing. In Windows, we need to use pslist and process explorer.
WebLogic Interview Questions for Experienced
Q11) What is Clustering and what is achieved through it?
- Clustering is the grouping together of servers for the purpose of high availability and scalability.
- Load balancing and Failover is achieved.
Q12) How does Cluster Communication Happen?
Ans: Members of the Cluster communicate over the Cluster Multicast IP and Port by sending periodic heartbeat messages.
Q13) What is the difference between the Sun JVM and BEA JRockit JVM?
- The most well know JVM is the implementation from Sun. The Sun JVM is called HotSpot. The Sun JVM is shipped in the Java Developer’s Kit (JDK) and Java Runtime Environment (JRE) from Sun.
- The BEA JRockit JVM from BEA systems is optimized for reliability and performance for server-side applications. To achieve this, BEA JRockit JVM uses technologies such as code generation, hot spot detection, code optimization, advanced garbage collection algorithms, and tight operating system integration.
Tuning JVM Parameters:
If you have a single processor, a single-thread machine then you should use the serial collector (default for some configurations, can be enabled explicitly for with -XX:+UseSerialGC). For multiprocessor machines where your workload is basically CPU bound, use the parallel collector. This is enabled by default if you use the -server flag, or you can enable it explicitly with -XX:+UseParallelGC. If you’d rather keep the GC pauses shorter at the expense of using more total CPU time for GC, and you have more than one CPU, you can use the concurrent collector (-XX:+UseConcMarkSweepGC). Note that the concurrent collector tends to require more RAM allocated to the JVM than the serial or parallel collectors for a given workload because some memory fragmentation can occur.
Q14) How do you do performance tuning of WLS?
Ans: It can be categorized into 4 parts. a. Application Tuning. jsp precompilation, ejb pool size cache...
Setting the TCP IP parameter. tcp_time_wait_interval tcp_conn_req_max_q
tune work manager, tune chuck size and chunk pool size, using performance packs, connection backlog buffering.
tuning gc strategy, monitoring garbage collection.
Q15) What is the difference between the Development mode and Production mode of the Weblogic Server?
- The default JDK for the development domain is Sun Hotspot.
- You can use the demo certificates for SSL.
- Auto deployment(to admin server only) is enabled.
- Server instances rotate their log files on start-up.
- Admin Server uses an automatically created boot.properties during start-up.
- The default maximum capacity for JDBC Datasource is 15.
- The debug flag which is used to start the WebLogic Workshop Debugger is enabled.
- In Development Mode any configuration change is done by a user who doesn’t need him to take a Lock and Edit session.
- Availability of web service test client.
- Node manager username and password: Default Admin credentials.
- Availability of Classloader Analysis Tool: Yes.
- Default start parameters when using Sun JDK and the default start WebLogic script: java -client -Xms256m -Xmx512m -XX: CompileThreshold=8000 -XX: PermSize=128m -XX: MaxPermSize=256m.
- The default JDK for the production domain is JRockit.
- If you use the demo certificates for SSL a warning is displayed.
- Auto deployment(to admin server only) is disabled.
- Server instances rotate their log files when it reaches 5MB.
- Admin Server prompts for username and password during start-up.
- The default maximum capacity for JDBC Datasource is 25.
- The debug flag which is used to start the WebLogic Workshop Debugger is disabled.
- In Production Mode, the user needs to procure a Lock and Edit session before trying to make any configurational changes.
- No Availability of web service test clients.
- Node manager username and password: Randomly generated
- Availability of Classloader Analysis Tool: No.
- Default start parameters when using Sun JDK and the default start WebLogic script: java -server -Xms256m -Xmx512m -XX: MaxPermSize=256m.
Q16) What is HTTP tunnelling? How can we configure it on WebLogic?
- HTTP tunnelling provides a way to simulate a stateful socket connection between WebLogic Server and a Java client when your only option is to use the HTTP protocol. It is generally used to tunnel through an HTTP port in a security firewall. HTTP is a stateless protocol, but WebLogic Server provides tunnelling functionality to make the connection appear to be a regular T3Connection. Steps to configure Http tunnelling.
- Login into the Admin Console, click on the server on which you want to enable the HTTP Tunneling feature Click on the Protocols tab. General? check the “Enable Tunneling” checkbox.
- Now you can communicate with the JVMs (Server Instances) using protocols other than t3
Q17) What is the difference between T3 and HTTP protocol?
- WebLogic uses the T3 protocols for internal and external connections to the servers. The T3 protocol often is used in WebLogic’s implementation of RMI. Proprietary of WebLogic Server.
- HTTP protocols are used primarily for HTTP communication between the browser and the web server. Standard follows the W3C (World Wide Web Consortium).
Note: All of these protocols are, by default, multiplexed over the same connection to the server’s address and port. So you can access a web page hosted by the server using a URL such as http://host:port/page.jsp. An external client can set up an initial JNDI context to a server using the URL t3://host: port/. All that has changed is the protocol over which the client must communicate with the server.