Category Archives: Java

Maintaining or Damaging Applications

When we develop an application, we ensure that the team follows all available best practices so that the application can remain maintainable. If there is blunder during sizing or analyzing requirement, leading to development in hush hush, there is a possibility of developing a working non maintainable solution. But, if all architecture, design and coding principles are followed correctly, then there is a chance that the application developed is close to maintainable application. But what happens after this. The application is handed over to maintenance team; a new service vendor comes in picture, who maintains or takes care of this step child. What is result? The application owners/sponsors either decide to abandon the child or just keep getting frustrated cause they are not even able to get rid of it as it is a business critical baby. The reason behind this is slow poisoning of application during maintenance activity. What are the things that can destroy an application during maintenance?

Programmatic Thread Dump Generation Using JMX APIs

Java 5 and later provides tools with JDK to generate thread dump. jconsole is one option which connects to the running JVM and provides graphical interface to access JVM data. Another option is using jstack to generate stacktrace of certain instance. I came across a scenario, where, there was a conditional requirement to generate thread dump, i.e. when the application was entering the erratic behavior zone, we needed thread dump to be logged from a Java class itself. Tried writing some basic stuff to generate stack trace. This sample can be used to generate other JVM data also.

Different Behavior of annotation @XmlMixed in JDK 1.6

This annotation got introduced in JDK 1.5 for a multi-valued property of Java Bean. i.e. if the property is supposed to contain combination of following, then it will use this annotation.

Allocate Additional Memory to Java Heap Analyzer

Somebody asked me this problem that he is trying to analyze a considerably huge heap dump, and he is not able to analyze it, because IBM Heap Analyzer is not starting only. The error is – JVM not starting as the space is not getting allocated. He was claiming that the machine RAM is far more than what he is trying to allocate.  How to solve this?

Common Mistakes in Exception Handling

Exception is disruption to a normal execution flow of a Java (in general any) program. This disruption can be because of a runtime problem e.g. data problem, initialization problem, etc. or because of a failing business condition. Java is capable of handling all such undesired scenarios elegantly. But when it comes to a developer to use these java generated exceptions to provide enough information to different stakeholders, then few mistakes occur. In this article,

Role of Frameworks in Architecture Definition

If one wants to select an important technology trend in Java world over past few years, then it has to be the growth and wide acceptance of open source frameworks in application development. If we look back, there are examples of frameworks which got wiped out with time, also there are examples of frameworks which have changed the way applications are getting developed. These successful frameworks have contributed to give a new look to Java itself. There are many reasons behind continued success of different frameworks available in market. I am not going to list and analyze what is good with those which have succeeded, and what went wrong with those which have failed. But, the bottom line is – these days Java application development involves considerable use of proven frameworks. What benefits we reap by using these frameworks? Here is the list -

Eclipse Features to Improve Java Productivity

Eclipse IDE provides many features to help a developer in development activities. Help to write code, integrate with servers, deployment, quality check and what not. In this article, I am consolidating those features which help us in improving productivity. Here I have used Eclipse Galileo and for unit test generation it is JUnit 4.4.

What is Difference Between An Architect and A Designer?

Some of you might say that there is a thin line between these two designations, while some might be able to differentiate clearly saying that comparing these two is comparing apples and oranges. But it is true that these two personalities work under same roof to achieve same goal of delivering a project, more appropriately application/system. Ok, there might be someone who performs both the roles for a project.  Then the question to be asked to the person – what is difference when you are an roaming around as an architect and when you are seen as a designer? What are roles and responsibilities of both?

Long Time-stamp to Date Conversion in Java

I wanted to convert a timestamp from long value to something human understandable date. I explored multiple ways of doing it with a couple of controlling parameters. Sharing it as it might be useful to you.

Investigating java.lang.OutOfMemoryError

Mostly we do not encounter this error in preliminary stages of application development. Sometimes functional testing reveals this error, but many times it is revealed during performance testing. It is not so annoying when it occurs before we push the application into production, but the real pain starts when we are hit by this error in production. When production server goes down or hangs itself with java.lang.OutOfMemoryError, it can even lead to a heavy monitory loss.

Powered by WordPress | Designed by: seo service | Thanks to seo company, web designers and internet marketing company