1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 30 35 36 public class JonasEntity extends JonasCommonEjb { 37 38 41 private String isModifiedMethodName = null; 42 43 46 private String passivationTimeout = null; 47 48 51 private String inactivityTimeout = null; 52 53 56 private String shared = null; 57 58 61 private String prefetch = null; 62 63 66 private String cleanup = null; 67 68 71 private String lockPolicy = null; 72 73 76 private JdbcMapping jdbcMapping = null; 77 78 81 public JonasEntity() { 82 super(); 83 } 84 85 86 87 91 public String getIsModifiedMethodName() { 92 return isModifiedMethodName; 93 } 94 95 99 public void setIsModifiedMethodName(String isModifiedMethodName) { 100 this.isModifiedMethodName = isModifiedMethodName; 101 } 102 103 107 public String getPassivationTimeout() { 108 return passivationTimeout; 109 } 110 111 115 public void setPassivationTimeout(String passivationTimeout) { 116 this.passivationTimeout = passivationTimeout; 117 } 118 119 123 public String getInactivityTimeout() { 124 return inactivityTimeout; 125 } 126 127 131 public void setInactivityTimeout(String inactivityTimeout) { 132 this.inactivityTimeout = inactivityTimeout; 133 } 134 135 139 public String getShared() { 140 return shared; 141 } 142 143 147 public void setShared(String shared) { 148 this.shared = shared; 149 } 150 151 155 public String getPrefetch() { 156 return prefetch; 157 } 158 159 163 public void setPrefetch(String prefetch) { 164 this.prefetch = prefetch; 165 } 166 167 171 public String getCleanup() { 172 return cleanup; 173 } 174 175 179 public void setCleanup(String cleanup) { 180 this.cleanup = cleanup; 181 } 182 183 187 public String getLockPolicy() { 188 return lockPolicy; 189 } 190 191 195 public void setLockPolicy(String lockPolicy) { 196 this.lockPolicy = lockPolicy; 197 } 198 199 203 public JdbcMapping getJdbcMapping() { 204 return jdbcMapping; 205 } 206 207 211 public void setJdbcMapping(JdbcMapping jdbcMapping) { 212 this.jdbcMapping = jdbcMapping; 213 } 214 215 220 public String toXML(int indent) { 221 StringBuffer sb = new StringBuffer (); 222 sb.append(indent(indent)); 223 sb.append("<jonas-entity>\n"); 224 225 indent += 2; 226 227 sb.append(xmlElement(getEjbName(), "ejb-name", indent)); 229 sb.append(xmlElement(getJndiName(), "jndi-name", indent)); 231 sb.append(getJonasEjbRefList().toXML(indent)); 233 sb.append(getJonasResourceList().toXML(indent)); 235 sb.append(getJonasResourceEnvList().toXML(indent)); 237 sb.append(getJonasServiceRefList().toXML(indent)); 239 sb.append(getJonasMessageDestinationRefList().toXML(indent)); 241 sb.append(xmlElement(isModifiedMethodName, "is-modified-method-name", indent)); 243 sb.append(xmlElement(passivationTimeout, "passivation-timeout", indent)); 245 sb.append(xmlElement(inactivityTimeout, "inactivity-timeout", indent)); 247 sb.append(xmlElement(shared, "shared", indent)); 249 sb.append(xmlElement(prefetch, "prefetch", indent)); 251 sb.append(xmlElement(getMaxCacheSize(), "max-cache-size", indent)); 253 sb.append(xmlElement(getMinPoolSize(), "min-pool-size", indent)); 255 sb.append(xmlElement(cleanup, "cleanup", indent)); 257 sb.append(xmlElement(lockPolicy, "lock-policy", indent)); 259 if (jdbcMapping != null) { 261 sb.append(jdbcMapping.toXML(indent)); 262 } 263 if (getRunAsPrincipalName() != null) { 265 sb.append(indent(indent)); 266 sb.append("<run-as>\n"); 267 indent += 2; 268 sb.append(xmlElement(getRunAsPrincipalName(), "principal-name", indent)); 269 indent -= 2; 270 sb.append(indent(indent)); 271 sb.append("</run-as>\n"); 272 } 273 274 if (getIorSecurityConfig() != null) { 276 sb.append(getIorSecurityConfig().toXML(indent)); 277 } 278 279 indent -= 2; 280 sb.append(indent(indent)); 281 sb.append("</jonas-entity>\n"); 282 283 return sb.toString(); 284 } 285 286 } 287 | Popular Tags |