Inbound interface for unsolicited message

About this task
By using MDB, the application can get the notification of the arrival of the inbound message. The MDB implements the Lu0MessageListener interface and specifies the messaging-type and activation-config-property attribute in deployment descriptor of MDB:

Deployment descriptor of example MDB:

<message-driven id="MDBtest2">
 <ejb-name>MDBtest2</ejb-name>
 <ejb-class>ejbs.MDBtest2Bean</ejb-class>
<messaging-type>
    com.ibm.connector2.sna.lu0.Lu0MessageListener
</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>LuName</activation-config-property-name>
              <activation-config-property-value>LUEE003</activation-config-property-value>
              </activation-config-property>
              <activation-config-property>
              <activation-config-property-name>HostApplicationName</activation-config-property-name>
              <activation-config-property-value>CICS</activation-config-property-value>
        </activation-config-property>
</activity-config>
</message-driven>

MDB bean class:

public class MDBtest2Bean  implements 
	javax.ejb.MessageDrivenBean,
		com.ibm.connector2.sna.lu0.Lu0MessageListener {
…….
public int onUnsolicitedMessage(String msg) {
// add the application implementation of handling the inbound message here
           
      
}

……
}