0 Replies Latest reply on Dec 8, 2007 8:50 AM by dpocock

    JMS: choosing destination and selector dynamically at runtim

    dpocock


      Message driven beans are a project requirement because of their asynchronous behaviour.

      However, the destination name and selector are not known at compile time, so they can't be specified in the XML descriptors or using EJB3's annotations.

      If the subscription is created dynamically (by instantiating a listener object within a method of a stateless bean, for instance), then asynchronous messaging can't be used, because such a listener object can only operate in the thread where it is created.

      What is the correct way to do this?