1 7 package org.jboss.ejb3.dd; 8 9 import javax.ejb.TransactionManagementType ; 10 11 import org.jboss.ejb3.tx.TxUtil; 12 import org.jboss.logging.Logger; 13 14 21 public class MessageDrivenBean extends EnterpriseBean 22 { 23 private static final Logger log = Logger.getLogger(MessageDrivenBean.class); 24 25 public static final String BEAN = "Bean"; 26 27 public static final String CONTAINER = "Container"; 28 29 private String acknowledgeMode; 31 32 private String transactionType; 33 34 private MessageDrivenDestination messageDrivenDestination; 35 36 public MessageDrivenDestination getMessageDrivenDestination() 37 { 38 return messageDrivenDestination; 39 } 40 41 public void setMessageDrivenDestination(MessageDrivenDestination messageDrivenDestination) 42 { 43 this.messageDrivenDestination = messageDrivenDestination; 44 } 45 46 public String getAcknowledgeMode() 47 { 48 return acknowledgeMode; 49 } 50 51 public void setAcknowledgeMode(String acknowledgeMode) 52 { 53 this.acknowledgeMode = acknowledgeMode; 54 } 55 56 public String getTransactionType() 57 { 58 return transactionType; 59 } 60 61 public void setTransactionType(String transactionType) 62 { 63 if (transactionType.equals(BEAN)) 64 tmType = TransactionManagementType.BEAN; 65 else if (transactionType.equals(CONTAINER)) 66 tmType = TransactionManagementType.CONTAINER; 67 this.transactionType = transactionType; 68 } 69 70 public String toString() 71 { 72 StringBuffer sb = new StringBuffer (100); 73 sb.append('['); 74 sb.append(super.toString()); 75 sb.append(","); 76 sb.append("acknowledgeMode=").append(acknowledgeMode); 77 sb.append(']'); 78 return sb.toString(); 79 } 80 } 81 | Popular Tags |