1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 30 35 36 public class JonasMessageDriven extends JonasCommonEjb { 37 38 39 42 private JonasMessageDrivenDestination jonasMessageDrivenDestination = null; 43 44 47 private ActivationConfig activationConfig = null; 48 49 52 public JonasMessageDriven() { 53 super(); 54 } 55 56 57 58 62 public JonasMessageDrivenDestination getJonasMessageDrivenDestination() { 63 return jonasMessageDrivenDestination; 64 } 65 66 70 public void setJonasMessageDrivenDestination(JonasMessageDrivenDestination jonasMessageDrivenDestination) { 71 this.jonasMessageDrivenDestination = jonasMessageDrivenDestination; 72 } 73 74 78 public ActivationConfig getActivationConfig() { 79 return activationConfig; 80 } 81 82 86 public void setActivationConfig(ActivationConfig activationConfig) { 87 this.activationConfig = activationConfig; 88 } 89 90 95 public String toXML(int indent) { 96 StringBuffer sb = new StringBuffer (); 97 sb.append(indent(indent)); 98 sb.append("<jonas-message-driven>\n"); 99 100 indent += 2; 101 102 sb.append(xmlElement(getEjbName(), "ejb-name", indent)); 104 if (jonasMessageDrivenDestination != null) { 106 sb.append(jonasMessageDrivenDestination.toXML(indent)); 107 } 108 if (activationConfig != null) { 110 sb.append(activationConfig.toXML(indent)); 111 } 112 113 sb.append(getJonasEjbRefList().toXML(indent)); 115 sb.append(getJonasResourceList().toXML(indent)); 117 sb.append(getJonasResourceEnvList().toXML(indent)); 119 sb.append(getJonasServiceRefList().toXML(indent)); 121 sb.append(getJonasMessageDestinationRefList().toXML(indent)); 123 sb.append(xmlElement(getMaxCacheSize(), "max-cache-size", indent)); 125 sb.append(xmlElement(getMinPoolSize(), "min-pool-size", indent)); 127 128 if (getRunAsPrincipalName() != null) { 130 sb.append(indent(indent)); 131 sb.append("<run-as>\n"); 132 indent += 2; 133 sb.append(xmlElement(getRunAsPrincipalName(), "principal-name", indent)); 134 indent -= 2; 135 sb.append(indent(indent)); 136 sb.append("</run-as>\n"); 137 } 138 if (getIorSecurityConfig() != null) { 140 sb.append(getIorSecurityConfig().toXML(indent)); 141 } 142 indent -= 2; 143 sb.append(indent(indent)); 144 sb.append("</jonas-message-driven>\n"); 145 146 return sb.toString(); 147 } 148 } 149 | Popular Tags |