Document doc = reader.read(new File("classes/META-INF/ejb-jar.xml"));
Iterator itr = doc.getRootElement().element("enterprise-beans").elements("session").iterator();
while (itr.hasNext()) {
Element entity = (Element)itr.next();
sb.append("\t\t<ejb>\n");
sb.append("\t\t\t<name>").append(entity.elementText("ejb-name")).append("</name>\n");
sb.append("\t\t\t<max-pool-size>40</max-pool-size>\n");
sb.append("\t\t\t<min-pool-size>20</min-pool-size>\n");
sb.append("\t\t\t<enable-freepool>false</enable-freepool>\n");
sb.append("\t\t\t<pool-waittimeout-millis>60000</pool-waittimeout-millis>\n");
sb.append("\t\t\t<low-activity-interval>20</low-activity-interval>\n");
sb.append("\t\t\t<is-secure>false</is-secure>\n");
sb.append("\t\t\t<is-clustered>true</is-clustered>\n");
if (entity.elementText("display-name").endsWith("LocalManagerEJB")) {
sb.append("\t\t\t<jndi-name>ejb/liferay/").append(entity.elementText("display-name")).append("Home</jndi-name>\n");
}
else {
sb.append("\t\t\t<jndi-name>").append(entity.elementText("ejb-name")).append("</jndi-name>\n");
}
sb.append("\t\t\t<local-jndi-name>").append(entity.elementText("ejb-name")).append("__PRAMATI_LOCAL").append("</local-jndi-name>\n");
sb.append(_buildPramatiXMLRefs(entity));
sb.append("\t\t</ejb>\n");
}