Today, Java Message Service and message-driven bean are simple programming. It is mainly to import the JMS package and use the jms api for programming. The concept is also clear, that is, how to use JMS is basic.
MainlyUse a queue for one-to-one message publishing; and topic for one-to-multiple, or multiple-to-many message Publishing. The message will be automatically saved by the JBoss queue and topic, and the queue and topic have been bound to the JNDI,
Later, the client may be on the other side of the ocean, as long as you want to publish messages on the queue or topic on the JBoss server. Of course, you can use JNDI to find the queue or topic.
Note that,For example, when creating a clientProgramAll the packages under JBoss/client must be included.This also makes sense, that is, JBoss gives you its own program interfaces and services.
Simply put, the client sends a message to a myqueue and mytopic respectively, deploys two MDB that accept myqueue and three MDB that accept mytopic on JBoss, And then you can see that, at most one MDB consume that accepts myqueue has this message, while three MDB that accept mytopic have consume messages.
ReflectedQueue is 1-to-1; topic is one-to-many or many-to-many message mode.
What is the purpose of MDB? Wait for the project.