1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 34 35 public class MessageDriven extends CommonEjb { 36 37 40 private String messageSelector = null; 41 42 45 private String acknowledgeMode = null; 46 47 50 private MessageDrivenDestination messageDrivenDestination = null; 51 52 55 private String messageDestinationType = null; 56 57 60 private String messageDestinationLink = null; 61 62 65 private ActivationConfig activationConfig = null; 66 67 70 public MessageDriven() { 71 super(); 72 73 setMessagingType("javax.jms.MessageListener"); 76 } 77 78 82 public String getMessageSelector() { 83 return messageSelector; 84 } 85 86 90 public void setMessageSelector(String messageSelector) { 91 this.messageSelector = messageSelector; 92 } 93 94 98 public String getAcknowledgeMode() { 99 return acknowledgeMode; 100 } 101 102 106 public void setAcknowledgeMode(String acknowledgeMode) { 107 this.acknowledgeMode = acknowledgeMode; 108 } 109 110 114 public MessageDrivenDestination getMessageDrivenDestination() { 115 return messageDrivenDestination; 116 } 117 118 122 public void setMessageDrivenDestination(MessageDrivenDestination messageDrivenDestination) { 123 this.messageDrivenDestination = messageDrivenDestination; 124 } 125 126 130 public String getMessageDestinationType() { 131 return messageDestinationType; 132 } 133 134 138 public void setMessageDestinationType(String messageDestinationType) { 139 this.messageDestinationType = messageDestinationType; 140 } 141 142 143 147 public String getMessageDestinationLink() { 148 return messageDestinationLink; 149 } 150 151 155 public void setMessageDestinationLink(String messageDestinationLink) { 156 this.messageDestinationLink = messageDestinationLink; 157 } 158 159 163 public ActivationConfig getActivationConfig() { 164 return activationConfig; 165 } 166 167 171 public void setActivationConfig(ActivationConfig activationConfig) { 172 this.activationConfig = activationConfig; 173 } 174 175 176 181 public String toXML(int indent) { 182 StringBuffer sb = new StringBuffer (); 183 sb.append(indent(indent)); 184 sb.append("<message-driven>\n"); 185 186 indent += 2; 187 188 sb.append(xmlElement(getDescription(), "description", indent)); 190 sb.append(xmlElement(getDisplayName(), "display-name", indent)); 192 sb.append(xmlElement(getIcon().getSmallIcon(), "small-icon", indent)); 194 sb.append(xmlElement(getIcon().getLargeIcon(), "large-icon", indent)); 196 sb.append(xmlElement(getEjbName(), "ejb-name", indent)); 198 sb.append(xmlElement(getEjbClass(), "ejb-class", indent)); 200 sb.append(xmlElement(getMessagingType(), "messaging-type", indent)); 202 sb.append(xmlElement(getTransactionType(), "transaction-type", indent)); 204 205 215 216 sb.append(xmlElement(messageDestinationType, "message-destination-type", indent)); 218 sb.append(xmlElement(messageDestinationLink, "message-destination-link", indent)); 220 if (activationConfig != null) { 222 sb.append(activationConfig.toXML(indent)); 223 } 224 225 sb.append(getEnvEntryList().toXML(indent)); 227 sb.append(getEjbRefList().toXML(indent)); 229 sb.append(getEjbLocalRefList().toXML(indent)); 231 sb.append(getResourceRefList().toXML(indent)); 233 sb.append(getResourceEnvRefList().toXML(indent)); 235 sb.append(getServiceRefList().toXML(indent)); 237 sb.append(getMessageDestinationRefList().toXML(indent)); 239 if (getSecurityIdentity() != null) { 241 sb.append(getSecurityIdentity().toXML(indent)); 242 } 243 indent -= 2; 244 sb.append(indent(indent)); 245 sb.append("</message-driven>\n"); 246 247 return sb.toString(); 248 } 249 } 250 | Popular Tags |