tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: building MDB with Eclipse using openEJB embeded in Tomcat
Date Tue, 26 May 2009 01:34:47 GMT

On May 25, 2009, at 6:15 PM, Mho wrote:

> Hello,
> I am new to openEJB and Eclipse. I am not new to Tomcat.
> I am porting an application that used to run under JBOSS and it  
> appears that
> openEJB/Tomcat should be just a great environment.
> I am using Eclipse with WTP and have successfully loaded up Tomcat  
> with
> OpenEJB and now I am trying to bring on line the MDB.
> What I can't figure out is where I would put the XML that describes  
> the
> queue for the MDB For example in JBOSS I would have a file that  
> would look
> like

There are a couple options for specifying the queue name for an MDB.

The first is to name the MDB after the queue and we will automatically  
hook the bean up to the queue with that name.  So if the queue name is  
"DestinationManager", it'd be like so:

    public class DestinationManager implements MessageListener {

or ...

    @MessageDriven(name = "DestinationManager")
    public class MyMdbBean implements MessageListener {

The other option is to use an ActivationConfig like so:

    @MessageDriven(activationConfig = {
propertyValue = "javax.jms.Queue"),
propertyValue = "DestinationManager")})
    public class MyMdbBean implements MessageListener {

Hope this helps!


View raw message