SyntaxHighlighter

Wednesday, December 26, 2012

Weblogic Deployment Staging Mode

Overview:
In this post we will discuss that how a small configuration can cause huge delay application deployment.

In our cluster environment ( 1 AdminServer + 2 Managed Servers) , application deployment started taking huge time (sometime 45 mins or so) which was bit frustrating and causing delay in environment to be ready.

Admin Server and 1 Managed Server is running on Host A and Other Managed Server is running on Host B. After analyzing our deployment settings ,we figured that , in weblogic config.xml file, "<staging-mode>" element under app-deployment was set to "stage", which had a significant impact on deployment.

Understanding weblogic staging Mode is very important to avoid such delay. So i plan to publish them , so that it can help others.

Monday, December 24, 2012

EJB 2.X Vs EJB 3.0 Vs EJB 3.1

Overview:
In JavaEE world, EJB has gained lot of momentum and in recent years java community has worked hard to simplify its development.To achieve that EJB architecture has gone through tremendous amount of changes. In this post, we will try to compare and see how things have been drastically changed over the years from EJB 2.x to EJB 3.0. At the end, we will see list of brand new features which were introduced in EJB3.1.

Friday, December 21, 2012

Part 1: Embedded EJB Container Using Weblogic Server

Overview:
As we all know that ,In Java EE world, Enterprise Java Beans (EJB) have gained a lot of popularity in IT industry.Despite of their development made lot easier in 3.0 version, developers still had to struggle to test them out by building and bundling them using Java EE package structure and then deploying them into application servers (EJB Containers) and then writing a test client to run in different JVM to invoke EJB etc...

Not only me, I know we all had wished it many times , how nice it would be if we could test EJB code just like regular java class by writing a main method and invoke it via command line and JVM could provide me all the services like
  1. Inject Resources (like another EJB , Persistence etc...)
  2. manage transactions like CMT or BMT
  3. Invoke Interceptors
  4. provide security etc...
Good News to EJB developers, your voice has been heard by Java Community and this dream has come true in Java EE 6. EJB 3.1 supports this feature which will make EJB testing lot easier using "Embeddable EJB Containter".

Friday, December 14, 2012

Deployment Plan - How does it works in Weblogic ?

Overview:
In JavaEE world, The most commonly used application packages are Java Archive (jar) , Web Archive (war) or Enterprise Archive (ear). For the application servers to deploy JavaEE application using above packages, standard rules (based on the archive option) needs to be followed to create folder structure to keep application specific java classes,dependent libraries or deployment descriptors etc...

Top 10 Useful Weblogic Commands

Overview:
Many times we run into situation when we
  1. forget weblogic admin password and don't know how to reset that. OR
  2. unable to login to weblogic admin console and want to know the status of server or Cluster OR
  3. perform JDBC pool operations like test or reset pool etc...
In this post, we will cover few important weblogic commands which one may use on daily basis.

Wednesday, December 12, 2012

Part 3: Troubleshoot Connection Leak - Using WLDF

Overview:
In Part 2 of this series, we have seen how we can access weblogic server remotely using JMX API and monitor connection leak.

In this post, We will end "Connection Leak" trip journey by looking how we can achieve the same within Weblogic by configuring "Weblogic Diagnostic Framework (WLDF)" and assigning it a task we are interested in (in our case monitoring "Connection Leak") and configure WLDF to send an alert via email.

Part 2: Troubleshoot Connection Leak - Using JMX API

Overview:
In Part 1 of this series, we have seen how to troubleshoot Connection leak by enabling switch via weblogic Administration console and looking at thread stack in console logs.
In this post, we will see how can we monitor Connection leaks remotely using JMX API by querying MBeans configured inside Weblogic server.

Tuesday, December 11, 2012

Part 1: Troubleshoot Connection Leak - Using Weblogic Server

Overview:
In past, all of us might have been in situation where all of sudden an application runs out of database resources (connection) which bring the application to its knees. There could be any reason of an application running out of database connection like,
  1. Increase in number of users or batch processing (threads) where database pool size not able to cope up with the load.
  2. Bug in application where connections are being grabbed from database pool but not released back to the pool , which is also known as "Connection Leak".
First issue is easy to fix , just close monitoring , understanding the load and sample statistics can help to arrive at database connection pool size.

Troubleshooting 2nd issue can be a nightmare. Just imagine, if we are asked to find a connection leak by looking at each and every single java file in huge code base. I can't even think of it :-)

Fortunately, most of the application servers provides a mechanism to enable profiling at runtime to let you troubleshoot Connection Leak.

Weblogic server also provides different ways to find Connection leak and we will cover them in 3 parts of this series.

In this Part 1 of 3 series, we will see quick and simplest way by enabling some switches at runtime using "Weblogic Administration Console".

Friday, December 7, 2012

Part 3: Garbage Collection - Troubleshooting OutOfMemory Issue

Overview:
In Part 2 of this series, we have seen different types of garbage collectors , heap memory and how to configure them using JVM options. Also we have seen how to enable GC logs by setting different options to get more and clear information about the JVM.
In this last part of this series, we will end our "GC trip journey" by looking what to do when an OutOfMemory issue happens
  1. How to troubleshoot and
  2. Tools to use

Part 2: Garbage Collection - Nuts and Bolts

Overview:
In Part 1 of this series, we have seen that java memory model has a Heap and a Stack and also how local variables and objects gets created on stack or heap and destroyed by garbage collector when their references go out of scope.

In this series, we will see
  1. Types of Garbage Collector and their configuration.
  2. Heap Memory and how to configure the size.
  3. Types of Garbage Collections.
  4. JVM Options for GC.
  5. How to read GC Logs.