Business Services Layer
Home Infrastructure Development Environment Architecture

A brief overview about the J2EE business services layer best practices and tools.


Business Services Layer Recommendations

  1. Use Session Facade,, Service Locator, Business Delegate and Transfer Object design patterns to provide a clear, layered architecture with well-known benefits. Refer to the J2EE pattern catalog for details.
  2. I always find it useful to seperate the non transactional and transactional beans into seperate layers. The transactional beans are the only ones that can be called from clients. If such a layering principle is used, it can be enforced easily with an AOP aspect. This can also help greatly in standardizing exception handling and logging at the transactional layer, ensuring that there is no duplicate logging.
  3. Clearly lay down and enforce exception handling and logging guidelines at the start of the project. These guidelines should cover an area beyond just the business layer.
  4. Best practices in EJB Exception handling is a good article on the subject. Read/join the discussion about this article.

  5. Decide on how you want to handle sessions. If state-based thick EJB clients are going to connect to your business service, use stateful session beans. Otherwise, use web-based sessions. Even when thick clients are involved, my personal preference is to use web services and handle sessions at the web server layer. Your session handling decision have an important impact on your logging framework as you would always prefer to log session-based data when an exception occurs.
  6. Use code generation tools such as XDoclet to reduce mechanical (bug-prone) work of creating EJB interfaces, descriptors etc. and to improve business-layer code maintainability.
  7. Ensure that you have a clear and uniform strategy for searching and pagination type operations.

Reusable Frameworks/Tools

Some crucial services at the business layer should be implemented as part of the enterprise framework, considering current as well as future requirements. Some great open source options for many of these can be found at java-source.net. Some of these common services and links to resources are given below:

Workflow and Rules Engines

Workflow is a very common requirement of most enterprise systems. Primary elements include the workflow engine, worklist control, workflow designer (or modeller or editor) and analysis reporting.

Open Source Workflow Engines written in Java

Object Caching

Object caching is important both for caching web pages or web-page components, and for caching other application objects (reference data). OSCache is a good option.

J2EE Object Caching Frameworks - Article on JavaWorld

Content Management Services

Java Open Source Content Management Systems

Notification Services

XMLBlaster - publish/subscribe and point-to-point MOM framework with support for PHP, Perl, Python, C, C++, C#, VB and Java. Browser call back mechanism with persistant HTTP connections

Collaboration and Groupware and Forum Software

Java Open Source Groupware

Java Open Source Forum Software

Job Scheduling

Quartz - Java Open Source Scheduling

Full-text Search Engine

Full-text search capability is a common requirement for many web-based applications. Lucene seems to be a good option to provide this capability.

Java Open Source Search engines

 

 

Go back to the Architecture Page

 

 

 

 


©2004 Chandika N. Mendis  
Hosted by www.Geocities.ws

1