About XJB
XJB is a testing framework for Enterprise JavaBeans
XJB enables development and testing of Enterprise JavaBeans without having to keep assembling and deploying into a container. It is designed to allow a rapid code/test cycle, and to be simple to use. It keeps the container out of your way while you develop your EJBs.
XJB is designed for legacy applications
Real applications grow. Many enterprise developers do not have the luxury of working on small, "green field" projects, and legacy J2EE applications in particular tend to be big, unwieldy beasts modelled on Sun's original PetStore showcase application.
XJB allows you to quickly test changes to a legacy code base - that is its primary purpose. If you are developing a new application from the ground up, we would hope you would have no need for XJB! Experience has shown that keeping the business logic separate from the container or lifecycle plumbing leads to a more testable system and a happier life.
XJB is not a container
Here are some things that XJB doesn't do:
- It doesn't have a fancy thread pool, or in fact do any multi-threading at all.
- It doesn't "deploy". So no ejbc stub generation or compilation.
- It doesn't do remoting. At all. Not a bit.
- It doesn't support entity beans.
On the other hand, here are some things it does do:
- It creates home and remote proxies, so you get all the regular EJB plumbing.
- It understands the EJB lifecycle, so setSessionContext, ejbCreateXxx, etc. all get called at the right times.
- It provides a JNDI initial context, so your client can look up EJBs and datasources.
- It provides local EJB contexts, so your EJBs can look up other EJBs.
- It provides various javax.sql.DataSource implementations.
- It (nearly) supports container-managed transactions (CMT).
- It understands ejb-jar.xml so your test setup can be a single line of code.
Warning
XJB is currently in heavy development while the team works towards a stable 1.0 release. We don't currently recommend its use in production projects but would be grateful if developers try out the latest development snapshot or a version straight from the repository and send us feedback. Announcements of alpha, beta and final releases of version 1.0 will be sent to the mailing lists.