See in the log that the queue is created?
You mean the jboss console? no queue created log in the console after I quit using the ejb-jar xml and jboss.xml. Any more is needed to do?
Try making a typo in the queue name of the MDB, I think deploy should fail if the queue is not found (at least then we'll know if there is a queue or not)
Do you mean this name <queue name="WorkflowAdditions">? This name is just a meaningless string. Does it need to be pointing to somewhere?
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/ladjflajksdflkajsdflkjasfd"),
If it fails to deploy (and it deployed before) it means that the original queue existed.
BTW, the jms message is sent successfully. Following is the code:
Context context = s_appServer.getNamingContext();
Queue queue = (Queue) context.lookup("queue/com.globalsight.everest.jms.WorkflowAdditions");
QueueSender sender = s_queueSession.createSender(queue);
ObjectMessage om = s_queueSession.createObjectMessage(p_msg);
But there is no response in the onMessage() method. Why?
Show the code of the MDB. How is it deployed?
I just removed ejb-jar.xml and jboss.xml which were successfully deployed with the MDBs.
And then added annotation in the MDB. No other changes were made. I thought it could be easily working. Currently for the MDB configuration, only hornetq-configuration.xml and hornetq-jms.xml are put at .ear\META-INF directory.
Here is the main content of the MDB:
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/com.globalsight.everest.jms.WorkflowAdditions"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable")})
@TransactionManagement(value = TransactionManagementType.BEAN)
* This is the concrete implementation of the WorkflowAdditionListener.
public class WorkflowAdditionMDB extends GenericQueueMDB
public void onMessage(Message p_cxeRequest)
GenericQueueMDB is an abstract class implemented MessageDrivenBean and MessageListener.
I also tried the class name like this public class WorkflowAdditionMDB implements MessageListener but the same result.
Where exactly in the .ear is this class located? Can you post the output of:
jar -tf yourapp.ear
The class is packaged in my project jar located at deploy\myproject.ear\lib\myproject.jar and the location of the class in the jar is com/globalsight/everest/workflowmanager/WorkflowAdditionMDB.class.
BTW, myproject.ear is just a folder under deploy directory, not a jar.
The EJB annotations (and other Java EE component annotations) will not be scanned for jars in .ear/lib folder. So move it to the root of the .ear at myproject.ear/myproject.jar.
Then this will not affect to find other classes from myproject.jar? Does putting the jar in .ear\lib and .ear have difference during runtime of my system?
just lee wrote:
Then this will not affect to find other classes from myproject.jar?
You can put your interfaces and other libraries which need to be accessed by other classes, in the .ear/lib folder. But component implementation classes like this MDB (which shouldn't be referred to by other classes) shouldn't be part of the jars in .ear/lib.
Sorry, forgive me. I am a bit new to jboss. Can you explain a little bit about what component implementation classes are so that I can tell what classes should be put in.ear and what classes go to .ear/lib?