Basic Concepts of Messaging System

JMS (Java Messaging System) was developed to cater the need of flexible integration design among various application or within application components.

In simple Java application, if we need to integrate one component/application with other, we have to have the reference of target with source. It means that one object must be aware about other object. It results into a tight coupling. It can be made flexible further by using different patterns like Factory, Service Locators and Directories but still objects used to be aware about each other type with a defined integration protocol like method signature. Now when architects want more flexibility, where one object is completely unaware about existence of other object and can simply say that I need this type of message. This is an ultimate flexibility in integration.

This type of flexible integration can be achieved using a messaging based simple design in java.  If we want to achieve this in Simple Java implementation, we can make a Message broker kind of component. This component can provide following facilities: 
  1. Any object can register with it as message producer by specifying a specific type of message, which can be a plain string. Message broker will maintain an internal data structure to keep track of such message producers corresponding to their message types.  
  2. Any object can register with message broker as message consumer. It will also specify a type of message for which it is interested to consume the message. Message broker will maintain an internal data structure to keep track of all message consumers corresponding to message types for which these wants the messages. 
  3. Now whenever any message producer produce a message, it calls message broker API and hand over the new message to it. Message broker knows the type of message, so it searches all the message consumers registered for this message type, iterate over this list and hand over the message to each consumer. 

Basics of Java Class Loader


Java class loader is an interesting concept of Java Runtime. We know that in Java,  every executable code is stored  in .java files which are compiled to .class files. These class files are stored in file system  in plain directory structure or in jar files or probably using some other medium. When any java program runs, it needs the definition of referred class files to execute this code at runtime. Here comes the role of Java Class Loader. Whenever Java runtime needs any class file, it calls a component of Java runtime called class loader to load the desired class. Default class loaders of Java i.e. Bootstrap and System Class Loader has the logic to search for the class file in JVM and in  directories and jars included in classpath respectively. It assumes that if Java program is referring to java.lang.Object, then the definition of this class must  be somewhere on  classpath in  java/lang/Object.class hierarchy. So by default, it has the logic to search in directories and jars. Once it finds the class file, it loads it in memory, store it with in memory cache for future reference and return to the runtime. So class loader search for the class files only once, and stores it in memory data structure to be utilized on future calls. Java classes loaded from default class loader are considered as trusted classes and hence these have the access to all core classes of java library itself.

Now Java provide enough flexibility to users applications to define their own custom class loaders, which can extend the default class loaders, and can add custom logic; like to load the classes from a  network location or from database and so on. Working of class loaders generally used to be like; a custom class loader first ask the parent default class loader of Java runtime to load the requested class. If default class loader is unable to find the class, then extended class loader proceed to load that class using its specific loading algorithm.

High Level Design Considerations for Reporting Solution

Reporting is an important part of most business enterprise solutions. Even for end business users, value of software is directly  proportional to quality of reporting system it provides. In this article, we shall discuss about very high level design considerations for reporting system. We shall not go in depth of technology, but will  talk about the thought process and various considerations which helps in design and in choosing the right tool.

When we talk about reporting, it means we are providing the information stored by Enterprise Application in a form which can provide valuable business and operational information to various stakeholders. Data stored by Application might be in different format, like most of the operations are related to CRUD activities and processing of various business document. However, reporting requirements can be very different. These can be very simple like to show all order processed with summary of their values, and also can be bit complex where one want to see the summary of all operations held, trend of specific business operations, future forecasting of business depending upon current sale trend and market data and so on. That means that we need to maintain data considering reporting requirements of solution, otherwise, it will be a good level of processing at the time of generating the reports if database structure is not compatible.

Next to discuss is, how database structure required for reporting can be different than application general data structure. Here are some of the possible differences:-

  • Operation database used to be highly normalized to ensure the data integrity and consistency. However, to generate the reports which may need bulky data processing, we may need to maintain data in de-normalized form so that related data can be found in same table/s without applying multiple joins.  
  • Reporting database may need many indexes to speed up the searching operations while generating the reports. However same level of indexes can slow down the create/update/delete operations in Operational Database.
  • We may need to do various calculations on Operational Data to generate the reports. If reporting data is different and is ported from Operational Data, these calculations can be done during porting and can be stored in database for fast access while generating the reports.     


What is Software Release Process


As software systems, development processes, and resources become more distributed, they invariably become more complex. Further, software products used to be in an ongoing cycle of development, testing, and releases. Moreover different platforms add more complexity to this. Hence it is quite understandable that there are many different dynamic pieces that must fit together seamlessly to ensure the success and long-term value of a product or project.

Release Process means a set of well defined steps which MUST be followed before giving any new project version to end users for use. These steps involves various components like:

  • Planning of features/enhancements/support/bugs we are covering in this release 
  • Versioning of releases
  • Time line for release - release date for testing and for users
  • Repository structure like branching in repository maintain the changes
  • Trace-ability matrix to track the quality
  • A good build system to ensure the quality deployments
  • Test cases and procedures
  • UAT management
  • Release to production environment
  • Procedures to revert the deployment in case of any failure
  • Information to client and training wherever required

Release process is the core of a stable system. If engineering team is heart of the project, release process is like heart beat of the project. Stability of every release is directly proportional to the strength and quality of release process and how good are we adhering to it. Ideally Release process is so important that it is being kept at first step even before building the software. Because it is the prorces which will ensure a smooth and quality delivery to the end users. Software team responsibility is not only to build a great software, but also to deliver it to users on time as expected and with desired level of quality.

Role and Characteristics of Software Architect

Software Architect is a vague term, and is having varied responsibilities in different Organizations and Environments. However if we talk about well accepted concept, a Software Architect is responsible to architect the system and lead all technical initiatives in the system. Software Architect is actually a senior technical person and often an ex-developer who has acquired a good level of skills across the products and platforms and having good experience of life cycle of applications. So Software Architect lead the project (or projects) for all technology related activities. She is a technical lead, and hence should have good technical skills as well as should be a good leader also. She leads the whole team around architectural decisions and implementation, and around technology related quality aspects. Here is an abstract list of responsibilities from which an architect own some or all as per the environment: 
  • Keep an eye on new technologies coming in market and pick which can add value to the system
  • Prototyping for new tool or technology
  • Submit proposals for the development of Project with a long term vision of System requirements and architecture both while keeping in mind the priorities of business
  • Technical Documents
  • Converting business requirements to technical level requirements, so that team can understand these
  • Define over all architecture and interaction of various layers and components. A durable architectures, which is abstract enough to be independent of any third party API, and even abstract within different layers of system
  • Bridge between developers, project managers, and business experts
  • Good skills of communication to make every stake holder understand the technical decisions in their language
  • Ensure the technical directions of system and choices among various available options
  • Often have experience of mixed technology set or at least understand these 
  • Mostly initiate the in-house framework development and define the roadmap for the framework development
  • Suggest solution for complex problems in System
  • Review the implementation process and design for performance and quality
  • Set quality parameters
  • Release various guidelines for implementation
  • Mentor the team for technical knowledge
  • Knowledge builing exercises and work as mentor for team
  • Exploration of new technologies and tools, and propose right one to team
  • Proposal for process and execution considering technlogical changes, requirements and project requirements

How to Design the Logo

When we talk about a famous brand, the first thing that comes to mind is its logo. The logo is the most important component of any brand. A logo must be appropriate, pleasing, attractive and should reflect the credibility of Company. An effective logo sets the public image of your brand, and therefore should be designed with careful thought and creativity. Designing a log for your own web site or company  is really an enriching experience. Your logo is a visual representation of everything your company stands for.

Now that you know what a logo is supposed to do, and what it should represent; you now should move ahead to learn what makes a great logo. You should learn few basic rules and principles of effective logo designing. Before you begin sketching, first decide, what message you want to give from your logo to viewers. Try writing that message and mission statement of your  company to help in deciding the look of your logo. Now think around this message and then visualize the logo, which appeals you first.

Here are some additional tactics and considerations that will help you create an appropriate company logo:

Dependency Injection and Aspect Oriented Programming

Inversion of Control (IOC), Dependency Injection (DI) and Aspect Oriented Programming are three popular keywords in Software Designing and Programming. But these terms are quite confusing to others and to each others some time. Let us try to understand what are these terms and how these are used.

If we think about Inversion of Control, it seems like we are changing the flow of control from, and a new King is coming in picture who will control all the flow now onward. Actually it is right. Earlier when we have started with Procedural programming, we tend to have control at single point. Later when we shift to OOP, we did better by decentralizing the logic and hence the control also to respective object. However, as we move on, we still find something missing which was hard coding of object dependencies on each other. If anytime, we need to change the implementation of a specific object, it means that we need to change the code and it may probably have some impact on implementation style. Then we strive hard to find the solution for providing such flexibility in the application and devised various design patterns like Service Locator, and Factory Pattern etc.This gave us good solutions by keeping knowledge of actual object implementation away from user object and hence gives the flexibility to change the implementation at any point of time. Things moves well, and applications used to be more and more flexible in design with increased use of such design patterns. However, one end of control was still in the hand of user object. It was still aware and the one who will initiate the factory or service locator to further get the right implementation of service. But desirable stage was, when user object is just aware about type of service it wants, not the source and actual instance of this service.....

How to Fix Common Installation Problems for Connectify

Connectify is a nice free solution to make your computer a Wi-Fi hot-spot. Sharing the internet from your computer sometimes become a basic need, like, if you are at home and your family want to explore the internet, or you are on a trip and won't like to purchase multiple modems to share the internet with your fellows. In such kind of scenarios, Connectify helps you to achieve exactly what you want. It can make your computer a hot-spot and other computers can connect to it like a Wi-Fi proxy server and can enjoy the internet.

Connectify (http://www.connectify.me/) is a free software, however, recently a professional version has also been released which will brings some commercial benefits to the company. This progress shows that Connectify development should be active in future also. So it may be a dependable software for long term.

Installing Connectify is easy. The steps are given below:

Is Micromanagement a Right Management Style?

This is a conflicting topic. However let us start from a generic concept which is, everything is good and bad both, and the difference comes only with context. So any thing can be bad at one point for few people, however can be good at the same time for others. Same applies to Micromanagement also.

What is micro and macro management? Management is about planning, execution and delivering the desired results with given resources in given time. Macro management is when you believe in your team and manage them considering their skills. If you bank upon the skills of your team members, and try to nourish their skills by giving proper guidance with a desired level of challenges, you will never feel like to go in details of every aspect of execution. Rather, you would like to spend your time on more productive work items, like planning the things which your team can not do, or other important activities like client management, resource management, and strategical planning. It does not mean to loose control on project, Project Control is an important aspect of Management. However, micro-management is about managing every aspect of execution yourself. Where team does not have the rights to take even execution level decisions and every new step is blocked for your approval. Where you are spending most of your time on what the team is doing and how this is being implemented, rather than to devote your time on other activities matching to your skills like planning for future. Such environment shows the lack of confidence in team, or manager expectations are very high from team and she thinks that work can not be done perfectly till she participate herself. This could be the personality traits of an individual or some kind of insecurity feeling or could be the control freak.

How to Backup and Encrypt your Personal Data

Gone are the days of keeping every document in paper format with files, now electronic storage devices overtook it completely. However importance of the documents is still the same and even increasing with increased complexity of daily life routines and business. So one point which we generally overlook for our personal data (mostly stored on computer hard disk) is to make sure that data is being available even in case of hardware or software failure and moreover it should be safe, and away from malicious hands.

Continuous availability of data is very much important to ensure that your work is being performed on time without any loss due to unavailability of data. However if your data is kept on a single location, there might be a risk that that location may not be available or is not in workable condition due to some problem. So the simple solution, to ensure the availability of data, is to make data available from more than one locations. It means that data should be placed at two ore more locations (depending upon importance of data), and data should be updated on all replication sites within a reasonable time duration. Following it, if any site is not working due to some problem, you can anytime switch to the alternative location and hence can continue your work without much delay. This is a solution to ensure the continuous availability of data and can be fulfilled by scheduled backup. Business Entities uses many commercial software to take the data backup, however, a home user may not need those heavy solutions. There are many free backup software available for home users. One of such tool is 'Comodo Backup', which is free available and is a good software for home users requirements. It provides following facilities:

How to Manage Outsourced Project

This is in  continuation of our last Article on 'How to Choose the Outsourcing Partner'. Now once you are done with selecting a possibly right outsourcing partner for your business,  next important step is to manage the outsourced project. Outsourcing the project does not mean that you  are free from the management related aspects. It only means that you need not to hire the resources on your  payroll and you can consider yourself free from long term liabilities of hired resources, and now virtually you can extend your team at any point of time without much efforts at your end. It could be a big mistake to consider yourself free from all project management aspect, and that could result in a bitter taste for outsourcing. So friends, when you outsource the project, you may need to consider it as virtual extension of your team and should continue to participate actively in management or execution. The difference will be that you can use management team of offshore partner as an extension of your management and hence can delegate some of the responsibilities. Of-course the level of involvement may vary from one scenario to other. This is one of the important point to consider. Further, here are few points which may help you to get a good result from outsourced project:

  1. Take it as Virtual Extension of your Team - Consider that offshore team as an virtual extension of your in-house team. This consideration should not only be in term of output expectations but also in 

How to Choose the Outsourcing Partner

This is in continuation of last article on 'When should We Outsource the Work'. After deciding that we need to outsource the work, next big question is, where we should outsource the work. In this article, we are discussing few key points for selecting the outsourcing partner.

Selecting a right outsourcing partner is very important to justify your decision to outsource. A good choice can help you achieve your strategic goals and operational planning, however a bad choice can ruin all the planning and sometime the scope to outsource in future. So companies should spend good quality time on researching, and selecting the right partner. Here are few points which can help in deciding the approach to find the outsource partner.

  1. Matching Skills - Look for a company which has good experience in the technology and domain required for your project. Here technology and domain both are important. You will find many companies which can claim to do any kind of project. However experience in particular skills and domain always matter. Moreover management also grow stronger as it gets experience in same kind of projects. So always check the portfolio of company to sort out the matching projects. Have an

When should We Outsource the Work

Outsourcing the work and choosing an outsourcing partner is an important decision. Here we should be clear why are we doing the outsourcing. The first point generally comes in mind is that outsourcing is done to save the money by outsourcing the work to some company which can do it cheaper. However, this is not the first motive of outsourcing. Outsourcing is/should be done for strategic benefits keeping in mind the strategic directions of Organization goals. Here are few points explaining these factors:
  • When we don't have required expertise- It is a good idea to outsource the work when we don't have the required expertise. Then outsourcing to a right partner, who has the required expertise in that specific field, can help a lot. Otherwise, we shall be investing a lot in learning new skills and keep on building the expertise for that domain which may not be useful in longer term as per the strategic direction. Moreover, we are not sure that how good we shall be able to perform in initial days of learning. That can cost us our valuable time along with investment of money and still may result in loosing the opportunity window due to delay in achieving the right level of expertise. So outsourcing is useful when we find some tasks which is not in line of our strategy and skill building is demanding a good amount of investment. Here outsourcing that piece of work to a partner which has proven track record in doing that kind of assignment can actually help you to move faster and utilize your time for core activities of your Organization.

How to Manage Your Productivity

When we are talking about productivity, the first thing we need to be clear is that, the productivity is about the outcome, about achieving the goals. It is not about spending the time and putting more and more efforts. More efforts and time can only bring the sympathy to anybody, however productivity is measured directly by the outcome of efforts. So what matters is, what you have achieved, how good are you meeting the expectations and delivering the results for your team, and for your Organization.

Many of the times, amount of time spent for the work is considered to have a direct impact on the outcome. Executives used to be in a mental trap to work for long extended hours in the evening as a responsible team members to meet their goals and to add more to their outcome. But does that really improve the productivity? Burning the midnight oil at the time of delivery or in some critical situations is understandable, however can shedding extra hours on daily basis in the office really add to the result?  This is a big question and is an important point where quality of efforts put in, matters over the quantity of hours. And here is the start point to think that how we can add more quality to our work, so that it can result into desired productivity within regular work schedule. Here are the few principles to add to the productivity.
  1. Match the skills with Organizational Needs - Know what you can do best and then match it with the Organizational needs. Every person has some unique set of qualities which make her better in certain areas. Now the need is to match these qualities with the needs of the Organization. So every employee and the immediate boss should work collectivity to identify the Organizational needs and that how these needs can be met in best possible manner by utilizing the skills of employee. Sometime you can be a expert in sales and good in advertising, however, if Organization needs are currently for advertising then best role for you is in Advertising. You can not achieve your best till you are not put the efforts in the direction of Organizational needs.

Exception Handling in Web Applications

Error Handling is an important part of any implementation. An application without Error Handling is like a patient with all door closed for diagnosis. It is a perfect time killer for developers to debug the application issues without proper error handling. Hence it is an important topic to discuss. However here we are concentrating more on error handling in web applications (using JSP, Servlets).

Motive of error handling is to capture any error generated in the application, log it to any logging system and propagate it to right point so that it can be directed to the user with all useful information. So the basic flow of error handling should be
  • Apply try-catch block with right exception type in catch around the code which may generate the error
  • Log the error using any logging mechanism. One of the popular logging system is log4j using commons logging. Ensure to use right logging level i.e. debug, info, warn, error etc
  • Apply business logic whatever is required to handle the erroneous case as per application requirement
  • If error is not manageable and condition should be propagated to user, throw the appropriate error further after wrapping the original error. Make sure that new exception should carry all user centric details which can help them to understand the cause of error, and developer centric information which can help them to debug the issue. 
  • As a general mechanism, error codes can be set to exception which can describes the reason of problem at Application and UI level. These error codes can also be used to show the localized messages on UI
  • Application Framework should provide the facility to handle any exception originated from the application and redirect it to a designated UI which can show the error details to user with all the details
  • The UI can also have the mechanism which can facilitate the user to log the issue directly in Issue Tracking system or to send email to the support staff with all the details

Implementation of Login and Logout in Web Applications

Login/Logout seems like a simple operation in web application. However small information left behind can give a chance of security breach to hackers. Here is a simple and minimal workflow which we should ensure while implementing login/logout functionality in web applications.

  • Have a Security Manager on the Gateway which can authenticate and possibly authorize every new request to server. For example, it could be a ServletFilter. 
    • It should authenticate every new request to check whether user is logged in or not. 
    • If yes, does current request URL exists?
    • If yes, does user have rights on current requested URL?
  • If request is passed through Security Manager, the login  manager should do following: 
    • Clean the existing session for all application specific information.
    • Invalidate the session using session.invalidate.
    • If request is for login
      • Check if user exist for given user name and password. 
      • If not, return to right page with message
      • If yes, go ahead
      • Create a new session, for example, request.getSession (true)
      • Fill the session with all application specific information for current user like all UI structure for which current user is authorized.
      • Forward the request to home page of request application or module
    • If request is for logout
      • Forward the request to logout message page  
This is the minimal workflow to ensure the basic principles, however a lot can be added to implement the application specific security checks and to support the application structure. Like as an extension, the Security Filter which is sitting at gateway can interact with a security service to validate the current request for authentication and authorization. Similarly Login/Logout implementation can interact with Security Service to authenticate the login information and later to retrieve the user specific application settings, for example, the menu structure and UI look etc. 

This brief information may help in concept building and in basic architecture design.

How to use XDoclet and Ant to Generate Hibernate Mapping and Configuration

XDoclet is a wonderful tool to generate various kind of configuration files in declarative way, and the declaration can be done with java code. It allows Java Developers to work in Java Code files only even for all the configuration which otherwise need to be defined in XML or property files. It is very convenient way for Developers who like to have everything in Code files, and facilitate to do all configuration from same place. It makes the applications easy to maintain, and debug. XDoclet supports tags for various tools like Hibernate, EJB, JMX, JSF, and Spring etc. However here we are explaining how to use it with Hibernate. XDoclet can be used for various purposes with Hibernate, like, to generate Hibernate Mapping Files, to generate Hibernate Configuration File, and to Generate/Update the schema.

Before going into details, you should be aware that there are two active versions of XDoclet, version 1 and version 2. Difficulty is that these two versions do not seem to be in Sync. Like version 2 has many changes which are not compatible with version 1 and also has a lot of changes in API. Another problem is that it is not easy to find a good documentation for XDoclet 2, and details like the difference between version 1 and 2. We were unable to find any single document which can provide all of these information nicely, and the path to update from version 1 to 2 with all side effects and changes required. There are many changes in XDoclet tags for Hibernate in version 1 and 2. Many of old tags are not supported now. Same difference is there in ANT tasks also, which can be used to integrate the XDoclet features with ANT. Here we are taking a real life scenario for using XDoclet task in ANT for Hibernate.

Suppose, there are multiple projects dependent on one or other project for Data Objects. One project has all Global Data objects like Address, City, Country etc. Other project has some business function specific data like Employee, Supplier etc. Now Employee has a field of Address type also, which will of course be coming from Global Data Project.

Should Project Manager Apologize if Project Failure is Due to Resources Being Managed by Anyone Else

Answer is with statement "Project Managers should be proactive and not reactive!". Project manager has the ultimate responsibility for the failure or success of project. To answer the original question, certainly project manager should apologize for the failure to meet the target. There is nothing wrong in accepting the failure and inherent responsibility. However important thing is to analyze the reason of failure and make everyone aware about the facts including the other managers, who were influencing the resources responsible for failure. It is not about directing the blame to those managers, but to make everyone aware that what was the reason of failure; so that these can be avoided further. Stakeholders should be aware about the reasons so that they can direct the team members to take corrective action. Other managers may not be having all knowledge to understand the effect of his management, so sharing the facts is always important.

Important thing is that main responsibility lies with Project Manager role is to make the project a successful venture. So one should always ask himself, that, "What is Good for Project". This is like a Panacea in any situation. It will give him right answer for every difficult situation, will keep him away from politics and will enable him to be proactive.

Further, being proactive is important for management. If project manager is aware that some part of the project is not going well, she should inform all concerned stakeholder about the situation, possible effects and various solutions. Project Manager should be very clear that she is responsible for success or failure of project. So she should have absolute control over the resources, their schedule and their performance. She should be proactive to ask for the control, if it is required for the project success. If this kind of control is not there due to a specific management style in Organization, then the control flow and hence the responsibilities should be defined clearly accordingly; and Project Manager should communicate every deviation from desired path to the concerned stakeholders with possible solutions

Redmine Java Connector 0.7 Released

We are happy to announce the first release of Redmine Java Connector (RedmineJConnector) at http://code.google.com/p/redmine-jconnector/. It is a Java based client side API for Redmine.

The product is born out of necessity. We were desperate for a Java based Redmine Client library which can help us to interact with Redmine from our projects. The use case was to help the users to create an issue in Redmine System in case there is any bug or feature request. However we were not able to find any library matching to such requirements. So this product is the result of this requirement, and now we are using it with our projects also.


Redmine Java Connector is capable to interact with Redmine(http://www.redmine.org/) Server using its Rest API. Redmine provides API for various CRUD operations on Projects, Issues, and Users etc. This connector helps to interact with this API using Java based Connector API, without going into details of Redmine Rest API.

System picks its various configuration like Server Address, and Security Key etc from configuration file. Its build is based on ANT.

Sample Code: You can find the sample code with Test Case
Documentation: Run the build with 'javadoc' target, and you will get the documentation in 'javadocs' folder

Various dependencies are:
  • Redmine - Version 1.1.0 or above
  • ANT - For building the application
  • JIBX - For Java to XML and XML to Java conversion
  • Restlet - For accessing Rest API of Redmine
  • Commons Logging and Log4J - For Logging purpose
  • Junit - For test cases
System is developed on Java, hence should be able to run on all platforms. However it is tested on Windows environment with Java 6.

The system is under active development, and more features will be added soon.