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:
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