1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 30 35 36 public class JonasSession extends JonasCommonEjb { 37 38 39 42 private String sessionTimeout = null; 43 44 47 private String jndiEndpointName = null; 48 49 52 public JonasSession() { 53 super(); 54 } 55 56 60 public String getSessionTimeout() { 61 return sessionTimeout; 62 } 63 64 68 public void setSessionTimeout(String sessionTimeout) { 69 this.sessionTimeout = sessionTimeout; 70 } 71 72 76 public String getJndiEndpointName() { 77 return jndiEndpointName; 78 } 79 80 84 public void setJndiEndpointName(String jndiEndpointName) { 85 this.jndiEndpointName = jndiEndpointName; 86 } 87 88 93 public String toXML(int indent) { 94 StringBuffer sb = new StringBuffer (); 95 sb.append(indent(indent)); 96 sb.append("<jonas-session>\n"); 97 98 indent += 2; 99 100 sb.append(xmlElement(getEjbName(), "ejb-name", indent)); 102 sb.append(xmlElement(getJndiName(), "jndi-name", indent)); 104 sb.append(xmlElement(getJndiLocalName(), "jndi-local-name", indent)); 106 sb.append(xmlElement(getJndiEndpointName(), "jndi-endpoint-name", indent)); 108 sb.append(getJonasEjbRefList().toXML(indent)); 110 sb.append(getJonasResourceList().toXML(indent)); 112 sb.append(getJonasResourceEnvList().toXML(indent)); 114 sb.append(getJonasServiceRefList().toXML(indent)); 116 sb.append(getJonasMessageDestinationRefList().toXML(indent)); 118 sb.append(xmlElement(sessionTimeout, "session-timeout", indent)); 120 sb.append(xmlElement(getMaxCacheSize(), "max-cache-size", indent)); 122 sb.append(xmlElement(getMinPoolSize(), "min-pool-size", indent)); 124 125 if (getRunAsPrincipalName() != null) { 127 sb.append(indent(indent)); 128 sb.append("<run-as>\n"); 129 indent += 2; 130 sb.append(xmlElement(getRunAsPrincipalName(), "principal-name", indent)); 131 indent -= 2; 132 sb.append(indent(indent)); 133 sb.append("</run-as>\n"); 134 } 135 if (getIorSecurityConfig() != null) { 137 sb.append(getIorSecurityConfig().toXML(indent)); 138 } 139 140 indent -= 2; 141 sb.append(indent(indent)); 142 sb.append("</jonas-session>\n"); 143 144 return sb.toString(); 145 } 146 } 147 | Popular Tags |