On May 25, 2009, at 8:37 PM, Mho wrote:


Thank you that explanation makes sense.

I added those and then found out that ejb.jar (or at least the copy that I
could find) does not include javax.ejb.MessageDriven or
javax.ejb.ActivationConfigProperty.

I found ejb-3_0-api.jar at
http://java.sun.com/products/ejb/docs.html under 3.0 Final release (download
class files) --> ejb-3_0-fr-api.zip
and that zip file expands into ejb-3_0-api.jar that includes those class files and makes the compiler happy. However by all rights this qualifies as
beeing burried deep and I am wondering if I am really lost.

Is there a place where the appropriate libraries for ejb 3.0 are kept?

The javaee-api-5.0-1.jar in our distribution contains that and all the other Java EE 5 libraries.

Can also pull it down from here:

 
http://repo2.maven.org/maven2/org/apache/openejb/javaee-api/5.0-1/javaee-api-5.0-1.jar

-David



David Blevins wrote:


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


  jboss.mq:service=DestinationManager

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:

   @MessageDriven
   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 = {
     @ActivationConfigProperty(propertyName="destinationType",
propertyValue = "javax.jms.Queue"),
     @ActivationConfigProperty(propertyName="destination",
propertyValue = "DestinationManager")})
   public class MyMdbBean implements MessageListener {
      //...
   }

Hope this helps!


-David




--
View this message in context: 
http://www.nabble.com/building-MDB-with-Eclipse-using-openEJB-embeded-in-Tomcat-tp23715480p23716386.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Reply via email to