-
1. Re: MDB support now available in AS7 upstream - Please test your apps
bigriver1973 Aug 10, 2011 3:37 AM (in response to jaikiran)I did the test with my MDB and a JMS client, it does work now. But the queue and connectionFactory name have to be changed before the success test. The previous queue and connectionFactory name is the same as the configuration files, like:
queue/MO_MSGQ_BUSI
RemoteConnectionFactory
But now the prefix "java:jboss/jms/" must be added before them, so they should be:
java:jboss/jms/queue/MO_MSGQ_BUSI
java:jboss/jms/RemoteConnectionFactory
So the MDB annotion should be changed like:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "java:jboss/jms/queue/MO_MSGQ_BUSI"),
@ActivationConfigProperty(propertyName = "DLQMaxResent", propertyValue = "0") })It seems that the JNDI name of the EJB and JMS service have been changed in AS7, which add the effort to migrate a exist project from AS5/6 to AS7. In my personal view, I do no think it is a god decision.
-
2. Re: MDB support now available in AS7 upstream - Please test your apps
jaikiran Aug 10, 2011 4:37 AM (in response to bigriver1973)Matthew Cheng wrote:
I did the test with my MDB and a JMS client, it does work now. But the queue and connectionFactory name have to be changed before the success test. The previous queue and connectionFactory name is the same as the configuration files, like:
queue/MO_MSGQ_BUSI
RemoteConnectionFactory
But now the prefix "java:jboss/jms/" must be added before them, so they should be:
java:jboss/jms/queue/MO_MSGQ_BUSI
java:jboss/jms/RemoteConnectionFactory
So the MDB annotion should be changed like:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "java:jboss/jms/queue/MO_MSGQ_BUSI"),
@ActivationConfigProperty(propertyName = "DLQMaxResent", propertyValue = "0") })You can still use any JNDI name under the java:/ namespace for the queue/topics and JMS objects. But if you don't specify the namespace, then it will be defaulted to java:jboss/jms/ for JMS objects. So you can use java:/queue/MO_MSGQ_BUSI for your queue
As for why this changed, see this discussion http://lists.jboss.org/pipermail/jboss-as7-dev/2011-July/002890.html