tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Collapsed EARs with Geronimo/Jetty and MDBs?
Date Thu, 29 May 2008 02:44:23 GMT

On May 27, 2008, at 10:15 PM, ipsi wrote:

> I would like to be able to package what is currently an EAR, WAR and  
> (plus other stuff) into a single WAR, and get rid of a number of  
> classloader
> problems I'm currently having.
> I think the procedure is essentially just put my MDBs into WEB-INF/ 
> classes,
> and openejb-jar.xml to META-INF.

Right.  There is a small example in the openejb-examples zip file  
under "webapps/ejb-examples/".  It doesn't include any MDBs, but they  
are supported.

> But what about jms-resources.xml? Should I
> just place that in META-INF? Will this technique work with MDBs?

We don't require you to have a jms-resources.xml for your MDBs.  You  
just need to configure your MDB container and ResourceAdapter in your  
openejb.xml [1] and we will create the topics and queues for you.  The  
default is to create a Queue with the ejb-name of your MDB.  If you  
want a Topic instead, you can declare it in your openejb.xml.  For a  
topic called "Foo", just add:

   <Resource id="Foo" type="Topic"/>

> And will this work with Geronimo/Jetty 2.1.1? Most of the posts I  
> see here
> are about Tomcat, and the site mentions that Geronimo uses a rather
> different implementation. Sadly, the documentation isn't exactly  
> massive,
> and I can't see anything either on the OpenEJB site, or on  
> Geronimo's that
> answers this.

It works in OpenEJB 3.0 + Tomcat 5.5/6.0.  We don't have a Jetty  
integration yet, though there have been other requests for it so it  
might be something we can add.  It doesn't work in Geronimo.

> So yeah, hopefully this isn't too complex to answer, and I hope it  
> works, as
> it would solve an awful lot of my problems...

On a related note, we recently added an example that shows how to run  
a simple mdb including a unit test [2].  I did make some improvements  
post 3.0 final to get the example as simple as it is, so it won't run  
exactly as-is against 3.0 final binaries.  The snapshots are up to  
date, so if you pull it down and run "mvn clean install" it will  
download all the right bits and run just fine.

3.0.1 is not too far off and we are usually very quick with fixes, so  
there should be no reason we can't get you your dream setup.

Hopefully this is enough to get things started :)



View raw message