JECO: Lightweight, Standalone, Spring-based Container
Oh, no, I'm not new to containers: for years now I've been deploying EARs, WARs, SARs, <you-name-it>ARs to containers such as JBoss, Websphere, Tomcat. Somehow I had always some problems:
- The infrastructure was too heavy for simple needs
- The learning curve was steep. For a JBoss or a Tomcat newcomer, setting up the containers properly is not a walk in the park
- These containers constrained me to run in an environment which I didn't need. Who said that in order to run my simple Java application I had to run a Servlet Container, thus consuming resources and ports which I didn't need? Running a JBoss application server requires quite few resources. Why did I need to have all the EE stack of services (JNDI, e-mail, EJB Container, Servlet Container, Transaction Management, Security, etc), when all I wanted was to have the availability of some sort of container where I could deploy PJ (Plain Jars)? My dream was to have something I could start from the command line, which could offer some sort of remote repository for my applications (meaning that the container should stay up until you shut it down), and I wanted also the capability to manage it remotely, possibly through Web. Then, partly because of my experience with JBoss partly because I came across JMX in previous years, I dreamt about having a JMX-based container, with an MBean server exposed remotely thanks to JSR-160 and where I could deploy my PJ as MBean services and which somehow could manage itself
I then started working at my MSc project which consists in writing an SMTP/POP3 server and I thought: I need the container of my dreams now! I knew that Spring was a lightweight container but I didn't come across it before, so I bought a Spring book and checked if it could help me. I was expecting a lightweight container such as Tomcat or JBoss, but to my surprise in order to use Spring I had to deploy it to another container. I didn't want it. However while using it, I started wondering if maybe I could finally write the container of my dreams by using Spring.
The process to use Spring container was easy enough: just create an Application context and specify a configuration file. So I decided to create a wrapper around the Spring framework, to give it a structure (e.g. a custom class-loader, a fixed directory structure for configuration, logging, startup, etc) and gave it a go. This is how JECO was born.
The more I was learning about Spring the more it seemed to me the perfect technology for what I needed, it offered native support to expose an MBean server and deploy MBeans to it, and what was the best anspect of it is that one could just declare the services it needed: no more all-in-one stacks but ad-hoc containers. Basically Spring offered native support for any major service needed by an enterprise application: database, transactions, email, jndi, JMX, web, EJBs, and much more (you are invited to check the Spring website out to find out all its potentials).
So my idea was to create something which wrap Spring capabilities with something easy to use, standalone and lightweight. I then created JECO (JEmos COntainer).
BTW, JECO runs under the BSD licence and is fully Open Source.
You can find the documentation and download the code here: http://www.jemos.co.uk/projects/jeco/docs/index.html
Feedbacks are welcome. You can write me at: marco.tedone at googlemail.com or alzamabar at me.com
Happy Java to everyone!