Thanks, David ! I just wanted try to create another RA based on activemq-ra. It's not a right way to go.
After doing some search, found that there is already a RA for the custom listener in tck. I'll use that directly to fix this. On Thu, Jun 23, 2011 at 12:33 AM, David Jencks <[email protected]>wrote: > AMQ is a jms product, so it only supports javax.jms.MessageListener. If > you want to use another message listener interface you need a resource > adapter that sends messages to it. > > thanks > david jencks > > On Jun 22, 2011, at 1:51 AM, Shawn Jiang wrote: > > Forwarding this to geronimo list. > > ---------- Forwarded message ---------- > From: Shawn Jiang <[email protected]> > Date: Wed, Jun 22, 2011 at 4:50 PM > Subject: Activemq does not support customized message listener ? > To: [email protected] > > > In EJB31 spec: 5.4.2 The Required Message Listener Interface. It said > that MDB should support customized message listener. Now I'm trying to > enable MDB custom listener in geronimo. But I find hard > coded javax.jms.MessageListener in ActiveMQ code, it make it impossible to > add the support for geronimo/openejb without updating code in activemq > side. Thoughts ? > > 1, > org.apache.activemq.ra.MessageEndpointProxy.MessageEndpointProxy(MessageEndpoint) > public MessageEndpointProxy(MessageEndpoint endpoint) { > if (!(endpoint instanceof MessageListener)) { > throw new IllegalArgumentException("MessageEndpoint is not a > MessageListener"); > } > messageListener = endpoint; > proxyID = getID(); > this.endpoint = endpoint; > } > > > 2, org.apache.activemq.ra.ActiveMQEndpointWorker > > public class ActiveMQEndpointWorker { > ... > static { > try { > ON_MESSAGE_METHOD = > MessageListener.class.getMethod("onMessage", new Class[] { > Message.class > }); > ... > } > > > > -- > Shawn > > > > -- > Shawn > > > -- Shawn
