If you need to do some EJB or MDB stuff, I can highly recommend OpenEjb.
Its so easy to embed in anything, an applet, an application, a servlet
etc. (David Blevins has been showing me the ropes bless him & its
super easy to use).
All you need to do is add 1 simple jar to your classpath, set a couple
of properties & create a JNDI context and hey presto, you've an EJB
container embedded in your app automatically. Just swizzle the
properties to use a remote EJB container. Neat.