1 22 package org.jboss.ejb3.metamodel; 23 24 import javax.ejb.TransactionManagementType ; 25 import org.jboss.logging.Logger; 26 27 34 public class MessageDrivenBean extends EnterpriseBean 35 { 36 private static final Logger log = Logger.getLogger(MessageDrivenBean.class); 37 38 public static final String BEAN = "Bean"; 39 40 public static final String CONTAINER = "Container"; 41 42 private String acknowledgeMode; 44 45 private String transactionType; 46 47 private String messagingType; 48 49 private String resourceAdaptorName; 50 51 private MessageDrivenDestination messageDrivenDestination; 52 53 private ActivationConfig activationConfig; 54 private ActivationConfig defaultActivationConfig; 55 56 private String destinationJndiName; 57 58 private String mdbUser; 59 private String mdbPassword; 60 private String mdbSubscriptionId; 61 62 private Method aroundInvoke; 63 private Method postConstruct; 64 private Method postActivate; 65 private Method preDestroy; 66 private Method prePassivate; 67 68 public ActivationConfig getDefaultActivationConfig() 69 { 70 return defaultActivationConfig; 71 } 72 73 public void setDefaultActivationConfig(ActivationConfig defaultActivationConfig) 74 { 75 this.defaultActivationConfig = defaultActivationConfig; 76 } 77 78 public MessageDrivenDestination getMessageDrivenDestination() 79 { 80 return messageDrivenDestination; 81 } 82 83 public void setMessageDrivenDestination(MessageDrivenDestination messageDrivenDestination) 84 { 85 this.messageDrivenDestination = messageDrivenDestination; 86 } 87 88 public ActivationConfig getActivationConfig() 89 { 90 return activationConfig; 91 } 92 93 public void setActivationConfig(ActivationConfig activationConfig) 94 { 95 this.activationConfig = activationConfig; 96 } 97 98 public void setDestinationJndiName(String name) 99 { 100 destinationJndiName = name; 101 } 102 103 public String getDestinationJndiName() 104 { 105 return destinationJndiName; 106 } 107 108 public String getAcknowledgeMode() 109 { 110 return acknowledgeMode; 111 } 112 113 public void setAcknowledgeMode(String acknowledgeMode) 114 { 115 this.acknowledgeMode = acknowledgeMode; 116 } 117 118 public String getMessagingType() 119 { 120 return messagingType; 121 } 122 123 public void setMessagingType(String messagingType) 124 { 125 this.messagingType = messagingType; 126 } 127 128 public String getResourceAdaptorName() 129 { 130 return resourceAdaptorName; 131 } 132 133 public void setResourceAdaptorName(String resourceAdaptorName) 134 { 135 this.resourceAdaptorName = resourceAdaptorName; 136 } 137 138 public String getTransactionType() 139 { 140 return transactionType; 141 } 142 143 public void setTransactionType(String transactionType) 144 { 145 if (transactionType.equals(BEAN)) 146 tmType = TransactionManagementType.BEAN; 147 else if (transactionType.equals(CONTAINER)) 148 tmType = TransactionManagementType.CONTAINER; 149 this.transactionType = transactionType; 150 } 151 152 public String getMdbPassword() 153 { 154 return mdbPassword; 155 } 156 157 public void setMdbPassword(String mdbPassword) 158 { 159 this.mdbPassword = mdbPassword; 160 } 161 162 public String getMdbUser() 163 { 164 return mdbUser; 165 } 166 167 public void setMdbUser(String mdbUser) 168 { 169 this.mdbUser = mdbUser; 170 } 171 172 public String getMdbSubscriptionId() 173 { 174 return mdbSubscriptionId; 175 } 176 177 public void setMdbSubscriptionId(String mdbSubscriptionId) 178 { 179 this.mdbSubscriptionId = mdbSubscriptionId; 180 } 181 182 public Method getAroundInvoke() 183 { 184 return aroundInvoke; 185 } 186 187 public void setAroundInvoke(Method aroundInvoke) 188 { 189 this.aroundInvoke = aroundInvoke; 190 } 191 192 public Method getPostConstruct() 193 { 194 return postConstruct; 195 } 196 197 public void setPostConstruct(Method postConstruct) 198 { 199 this.postConstruct = postConstruct; 200 } 201 202 public Method getPreDestroy() 203 { 204 return preDestroy; 205 } 206 207 public void setPreDestroy(Method preDestroy) 208 { 209 this.preDestroy = preDestroy; 210 } 211 212 public String toString() 213 { 214 StringBuffer sb = new StringBuffer (100); 215 sb.append("[MessageDrivenBean:"); 216 sb.append(super.toString()); 217 sb.append(","); 218 sb.append("acknowledgeMode=").append(acknowledgeMode); 219 sb.append("destination=").append(messageDrivenDestination); 220 sb.append("messagingType=").append(messagingType); 221 sb.append(']'); 222 return sb.toString(); 223 } 224 } 225 | Popular Tags |