1 22 package org.jboss.test.cts.ejb; 23 24 import javax.ejb.MessageDrivenBean ; 25 import javax.ejb.MessageDrivenContext ; 26 import javax.jms.MessageListener ; 27 import javax.jms.Message ; 28 import javax.jms.TextMessage ; 29 30 35 public abstract class AbstractMDB implements MessageListener , MessageDrivenBean 36 { 37 public void onMessage(Message message) 38 { 39 if( message instanceof TextMessage ) 40 { 41 TextMessage tm = (TextMessage ) message; 42 onTextMessage(tm); 43 } 44 } 45 46 public void setMessageDrivenContext(MessageDrivenContext ctx) 47 { 48 } 49 50 public void ejbCreate() 51 { 52 } 53 54 public void ejbRemove() 55 { 56 } 57 58 public abstract void onTextMessage(TextMessage tm); 59 } 60 | Popular Tags |