/** * If not already created, a new <code>connection-factory</code> element will be created and returned. * Otherwise, the first existing <code>connection-factory</code> element will be returned. * @return the instance defined for the element <code>connection-factory</code> */ public ConnectionFactoryResourceType<WebAppDescriptor> getOrCreateConnectionFactory() { List<Node> nodeList = model.get("connection-factory"); if (nodeList != null && nodeList.size() > 0) { return new ConnectionFactoryResourceTypeImpl<WebAppDescriptor>(this, "connection-factory", model, nodeList.get(0)); } return createConnectionFactory(); }
/** * If not already created, a new <code>connection-factory</code> element will be created and returned. * Otherwise, the first existing <code>connection-factory</code> element will be returned. * @return the instance defined for the element <code>connection-factory</code> */ public ConnectionFactoryResourceType<WebAppDescriptor> getOrCreateConnectionFactory() { List<Node> nodeList = model.get("connection-factory"); if (nodeList != null && nodeList.size() > 0) { return new ConnectionFactoryResourceTypeImpl<WebAppDescriptor>(this, "connection-factory", model, nodeList.get(0)); } return createConnectionFactory(); }