Dashboard > Beanlet Space > Beanlet - JSE Application Container
Beanlet - JSE Application Container
Added by Leon van Zantvoort, last edited by Leon van Zantvoort on May 10, 2008  (view change)
Labels: 
(None)



demo download javadoc presentation contact

Introducing Beanlet.

Inspired by EJB3 and Spring, Beanlet delivers an IoC enabled application container offering the best of both worlds. Beanlet's programming model looks similar to that of EJB3, but gives you the flexibility of Spring at the same time. The Beanlet architecture supports JTA transactions, the Java Persistence API, JNDI, Web integration and the Spring Framework.

If your software project only requires a subset of features of a full blown EJB server, you should probably be looking for a solution like Beanlet. Beanlet brings many of the features of EJB to the world of the Java Standard Edition without the restrictions and limitations that are a logical result of the distributed nature of EJB. As a JSE Application Container, Beanlet can run both stand-alone and embedded inside Applet containers, Servlet containers, EJB containers or regular JSE applications.

Beanlet has a clear and concise API with a high power to weight ration. The API consists mainly of interfaces and annotations. Similar to EJB3, Beanlet components can be marked with these annotations to provide class specific configuration. Additionally, schema constrained XML configuration can be used to override existing annotations, or to mark your POJOs with new annotations. This XML configuration maps directly to the annotations - all annotations can be expressed by a single XML-element.

Please check out the demo and give us your feedback at feedback@beanlet.org.

Why use Beanlet?

These are the top ten reasons for using Beanlet technology:

  1. Beanlet provides a unique non-intrusive application container for Java components.
  2. Beanlet delivers IoC using both XML and annotations.
  3. Beanlet allows specifying annotations through XML.
  4. Beanlet API has a high power to weight ratio.
  5. Beanlet is easy to learn.
  6. Beanlet integrates with most popular frameworks.
  7. Beanlet promotes a defensive programming style.
  8. Beanlet is open source.
  9. Beanlet is free.
  10. Nobody has ever beanlet down by it.

Getting started with Beanlet.

The HelloWorld class demonstrates how easy it is to write a beanlet. Notice the that the beanlet looks similar to an EJB3-style enterprise bean.

The Inject annotation lets the container initialize the logger field. The Run annotation instructs the container to activate the beanlet by invoking the execute method.

HelloWorld.java
package org.beanlet.example;

import java.util.logging.*;
import org.beanlet.*;

@Stateless
public class HelloWorld {

    @Inject
    private Logger logger;

    @Execute
    public void sayHello() {
        logger.info("Hello World!");
    }
}

In addition, beanlets can be defined by XML. Instead of using annotations, the HelloWorld class could offer the same functionality with the XML file listed below.

beanlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beanlets xmlns="http://beanlet.org/schema/beanlet"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://beanlet.org/schema/beanlet http://beanlet.org/schema/beanlet/beanlet_1_0.xsd">
  <beanlet type="org.beanlet.example.HelloWorld">
    <stateless/>
    <inject field="logger"/>
    <execute method="sayHello"/>
  </beanlet>
</beanlets>

Summarized, beanlets can be defined by annotations, XML or a mixture of both. Develop beanlets quick and easy using annotations, or apply XML to create beanlets in a non-intrusive way - with no dependencies on the Beanlet API.

Keep checking back on this site as a tutorial will become available shortly. It will be a quick guide that explains how to set up a Beanlet environment and it will covers all Beanlet basics. For now, please check out the demo to get started.

Beanlet software is licensed under terms of the GNU Lesser General Public License (LGPL).


License (Beanlet Space)
Tutorial (Beanlet Space)

Site running on a free Atlassian Confluence Open Source Project License granted to Beanlet. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5 Build:#805 Apr 26, 2007) - Bug/feature request - Contact Administrators