- Re: JMS: using Websphere MQ as JMS provider. 2007-08-13 - By adamhmitchell
Back I think that ClassCastException happens when the JBossMQ code pulls your IBM MQ class from JNDI. You're still using the JBoss MDB JMS Provider.
I was in the same boat trying to use Sun's IMQ server. This is how I got it working:
| package elm.mdb; | | import javax.ejb.ActivationConfigProperty; | import javax.ejb.MessageDriven; | import javax.ejb.Remote; | import javax.jms.Message; | import javax.jms.MessageListener; | import org.jboss.annotation.ejb.ResourceAdapter; | | import org.apache.log4j.Logger; | | @(protected)(mappedName = "jms/LoggingEventBean", activationConfig = { | @(protected)(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), | @(protected)(propertyName = "destinationType", propertyValue = "javax.jms.Topic"), | @(protected)(propertyName = "subscriptionDurability", propertyValue = "Durable"), | @(protected)(propertyName = "clientId", propertyValue = "LoggingEventBean"), | //@(protected)(propertyName = "destination", propertyValue = "elm_topics_LoggingEvent_default"), | @(protected)(propertyName = "destination", propertyValue = "EnterpriseLoggingTopic"), | @(protected)(propertyName = "subscriptionName", propertyValue = "LoggingEventBean") | //@(protected)(propertyName = "UserName", propertyValue = "guest"), | //@(protected)(propertyName = "Password", propertyValue = "guest") | }) | @(protected)("imqjmsra.rar") | public class LoggingEventBean implements MessageListener { | | static Logger logger = Logger.getLogger(LoggingEventBean.class); | | public LoggingEventBean() { | } | | public void onMessage(Message message) { | logger.info("got message"); | | } | | } |
I still don't know if this is the 'right' way to do it. Let me know if you find anything different!
AM
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic &p=4073703#4073703
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4073703 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|