Hi,
Thank you for taking the time and respond. This was helpful. I was able to
deploy a Message Driven Bean (MDB). How ever the onMessage is not getting
triggered. When I deploy the same code on the TomEE , it works fine. But
the same code does not seem to work when I deploy it on Tomcat 6.0 with
OpenEJB. Is there any other setting I need to configure ?. Here is the code,

MDB Class

@MessageDriven(
activationConfig = { @ActivationConfigProperty(
propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination",
        propertyValue = "APP.JMS.QUEUE")},
mappedName = "APP.JMS.QUEUE")
public class MyPersonEntityMDB implements MessageListener {
@Resource(name="MyJmsConnectionFactory")
private ActiveMQConnectionFactory connectionFactory;
    /**
     * Default constructor.
     */
    public MyPersonEntityMDB() {
        // TODO Auto-generated constructor stub
      }
/**
     * @see MessageListener#onMessage(Message)
     */
    public void onMessage(Message message) {
        // TODO Auto-generated method stub
        System.out.println("Got Message " + message.toString());
    }

}

I configure this in the openejb.xml

<Container id="My MDB Container " type="MESSAGE">
  #  The resource adapter delivers messages to the container

  # ResourceAdapter My JMS Resource Adapter
  ResourceAdapter MyJmsResourceAdapter
  # Specifies the message listener interface handled by this container

  MessageListenerInterface javax.jms.MessageListener

  # Specifies the activation spec class

  ActivationSpecClass org.apache.activemq.ra.ActiveMQActivationSpec

  # Specifies the maximum number of bean instances that are
  # allowed to exist for each MDB deployment.

  InstanceLimit 20
</Container>

    <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
        # Do not start the embedded ActiveMQ broker
        BrokerXmlConfig
        ServerUrl tcp://localhost:61616
    </Resource>

<Connector id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">

  ResourceAdapter MyJmsResourceAdapter

  # Specifies if the connection is enrolled in global transaction
  # allowed values: xa, local or none

  #TransactionSupport xa

  # Maximum number of physical connection to the ActiveMQ broker

  PoolMaxSize 50

  # Minimum number of physical connection to the ActiveMQ broker

  PoolMinSize 10

  # Maximum amount of time to wait for a connection

  ConnectionMaxWaitMilliseconds 60000

  # Maximum amount of time a connection can be idle before being reclaimed

  ConnectionMaxIdleMinutes 15

</Connector>


On Mon, Feb 29, 2016 at 4:44 AM, Romain Manni-Bucau [via TomEE & OpenEJB] <
[email protected]> wrote:

> Hi
>
> there are few formatting issue but this page is the old way to setup
> tomee:
> http://tomee.apache.org/manual-installation.html - the one for openejb 3
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2016-02-29 0:41 GMT+01:00 shaipai <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4677715&i=0>>:
>
> > Hi,
> > I have Tomcat 6.0.37. I installed OpenEJB 3.1.1 WAR in Tomcat 6.0.37.
> Now
> > how do I deploy EJB's on Tomcat ?. Any pointers will be greatly
> > appreciated.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/Deploying-MDB-s-using-OpenEJB-with-Tomcat-6-0-37-tp4677709.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://tomee-openejb.979440.n4.nabble.com/Deploying-MDB-s-using-OpenEJB-with-Tomcat-6-0-37-tp4677709p4677715.html
> To unsubscribe from Deploying MDB's using OpenEJB with Tomcat 6.0.37, click
> here
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4677709&code=c2hhaXBhaUBnbWFpbC5jb218NDY3NzcwOXw4Mjk2ODI1MTI=>
> .
> NAML
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Deploying-MDB-s-using-OpenEJB-with-Tomcat-6-0-37-tp4677709p4677753.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to