java - specifying the message listener interface of an MDB -


i trying define message driven beans using deployment descriptor deploying app websphere , doesn't handle annotations nicely.

i'm wondering if there way of specifying message listener interface of mdb in ejb-jar.xml file?

you must use @javax.ejb.messagedriven annotation declare ejb type message-driven. can specify following optional attributes:

  1. messagelistenerinterface—specifies message listener interface, if haven't explicitly implemented or if bean implements additional interfaces.

the bean class must implement, directly or indirectly, message listener interface required messaging type supports or methods of message listener interface. in case of jms, javax.jms.messagelistener interface.

  1. activationconfig—specifies array of activation configuration properties configure bean in operational environment.

activation configuration properties name-value pairs passed mdb container when mdb deployed. properties can declared in either ejb-jar.xml deployment descriptor or using @activationconfigproperty annotation on mdb bean class.

activation configuration properties set in ejb-jar.xml

<message-driven>       . . .       <activation-config>         <activation-config-property>             <activation-config-property-name>destinationjndiname</activation-config-property-name>             <activation-config-property-value>myqueue</activation-config-property-value>         </activation-config-property>         <activation-config-property>             <activation-config-property-name>destinationtype</activation-config-property-name>             <activation-config-property-value>javax.jms.queue</activation-config-property-value>         <activation-config-property>       </activation-config>       . . .     </message-driven>     <message-driven>       . . .       <activation-config>         <activation-config-property>             <activation-config-property-name>destinationjndiname</activation-config-property-name>             <activation-config-property-value>myqueue</activation-config-property-value>         </activation-config-property>         <activation-config-property>             <activation-config-property-name>destinationtype</activation-config-property-name>             <activation-config-property-value>javax.jms.queue</activation-config-property-value>         <activation-config-property>       </activation-config>       . . .     </message-driven> 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -