j2Xtreme
 
   

XBean Overview

Introduction to XBean

XBean is a microkernel container for Java-based services that works with, but does not require, a J2EE application server. XBean is similar in many respects to HiveMind and PicoContainer in that it implements and encourages the use of Inversion of Control. However, instead of using the Dependency Injection pattern (which while powerful can be somewhat non-intuitive), XBean uses the common Service Locator pattern. The goal is to create an powerful container that can be used in the simplest of applications as well as the most complex, yet remain clean, simple, and above all easy to understand and use.

XBean services are just plain old java objects (POJOs) that have a name and scope. The name is a simple slash-delimited string that creates pseudo-namespaces just as java packages do. The scope defines the lifecycle of the service. More properly, it defines the lifecycle within which a particular service instance can be accessed by name. The service scopes defined by XBean are: global, thread, transient, application, session, request and widget.