也许类似于:
<message-driven>
<ejb-name>TestMDB</ejb-name>
<ejb-class>package.name.TestMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destination</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-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>Auto-acknowledge</activation-config-property-value>
</activation-config-property>
</activation-config>
<resource-ref id="ResourceRef_0">
<res-ref-name>jms/myQCF</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>
然后在 bnd.xml 文件中:
<message-driven name="TestMDB">
<jca-adapter activation-spec-binding-name="mdb30/myQueue" destination-binding-name="Jetstream/jms/myQueue" activation-spec-auth-alias=""/>
<resource-ref name="jms/myQCF" binding-name="Jetstream/jms/myQCF"/>
</message-driven>