facebook

[Closed] JBoss Message Driven Bean Example

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #238408 Reply

    honggu
    Member

    Hi,

    Can you guys give me an example on how to code and deploy a Message Driven Bean to deploy to JBoss? I tried a couple of times and it seems that it’s missing the message destination on jboss.xml.

    Thank you very much.

    Hong

    #238436

    Riyad Kalla
    Member

    Did you try out getting started with EJB quickstart doc: http://www.myeclipseide.com/ContentExpress-display-ceid-67.html

    Or any of our tutorials: http://www.myeclipseide.com/ContentExpress-display-ceid-16.html

    #238494

    honggu
    Member

    My problem is that the XDoclet is not generating the message destinations in the jboss.xml file, therefore after the MDB is deployed, the container can not find which queue or topic the MDB is using…..

    #238519

    Greg
    Member

    Make sure that you have the proper XDoclet tags and jboss subdoclet task to generate the jboss.xml file correctly. Firstly, you should have xdoclet tags at the top of your MessageDrivenBean that look something like this:

    * @ejb.bean name="TraderQueue"
     *           display-name="TraderQueue"
     *           description="Description for TraderQueue"
     *           destination-type="javax.jms.Queue"
     *           acknowledge-mode="Auto-acknowledge"
     * 
     * @jboss.destination-jndi-name 
     *             name="queue/TraderQueue"

    So you would just substitute your bean name instead of using TraderQueue. Then you also need to add a jboss subdoclet task just like is specified in the EJB quickstart.

    http://www.myeclipseide.com/images/tutorials/quickstarts/firstejb/
    View this EJB quickstart and check the section about adding a jboss subdoclet task. Basically, right-click the ejb doclet task, choose “Add”. Then select JBoss. Then set the version attribute to “4.0” and set the desDir to “src/META-INF”. Then re-run Xdoclet.

    After you run xdoclet the jboss.xml file should have the destination queue properly defined.

    #238572

    honggu
    Member

    You guys are GREAT!!!

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: [Closed] JBoss Message Driven Bean Example

You must be logged in to post in the forum log in