[jboss-user] [JBoss Messaging] - Re: I need help about Messaging!

xdoclet do-not-reply at jboss.com
Tue Sep 18 02:02:28 EDT 2007

first, i believe you have to post this to the EJB3 queue , not here. hope someone's going to move this thread to the correct location.

where is the *destination* ?? to which destination are you publishing your messages ??
btw, why do you still use deployment descriptors and do this in such a tortures way ? haven't you heard of annotations ??

you can do the same as follows :

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;

@MessageDriven (activationConfig = { 	
		@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),
	    @ActivationConfigProperty(propertyName="destination", propertyValue="topic/SriLanka"),

@TransactionManagement (TransactionManagementType.BEAN) 
public class LogMDB implements MessageListener {

	public void onMessage(Message message) {
		if (message instanceof TextMessage) {
			TextMessage textMessage = (TextMessage) message;
			try {
			} catch (JMSException e) {

in this example, i'm publishing messages to the topic called, "SriLanka". as i've said earlier, you got that error for you haven't provided a destination(topic) name.

Tyronne Wickramarathne

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085332#4085332

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085332

More information about the jboss-user mailing list