• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am a beginner in JMS.Could anyone give me an idea of how to implement a message driven bean in JBoss.plz give a sample ejb and jboss jar file.
i want immediate reply .plz.................
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JBOSS 3.2.5

CREATE A QUEUE BY ADDING ENTRY IN ...\deploy\jmsjbossmq-destinations-service.xml

WRITE MDB. SAMPLE IS:



import javax.ejb.MessageDrivenBean;
import javax.ejb.MessageDrivenContext;
import javax.jms.Message;
import javax.jms.MessageListener;


public abstract class MessageBean1
implements MessageDrivenBean, MessageListener {
MessageDrivenContext ctx;


/**
* Sets the context.
*
* @param ctx MessageDrivenContext Context for bean session
*/
public void setMessageDrivenContext(MessageDrivenContext ctx) {
this.ctx = ctx;
}
/**
* This method is required by the EJB Specification,
*
*/
public void ejbCreate() {

}
/**
* This method is required by the EJB Specification,
*
*
*/
public void ejbRemove() {
}


public void onMessage(Message message) {
//WRITE CODE HERE
}

}


WRITE DEPLOYEMENT DESCRIPTOR AND MENTION QUEUE NAME UNDER:
<destination-jndi-name>

PACKAGE IT AND DEPLOY AS JAR.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic