/** * If not already created, a new <code>xa-datasource</code> element will be created and returned. * Otherwise, the first existing <code>xa-datasource</code> element will be returned. * @return the instance defined for the element <code>xa-datasource</code> */ public XaDatasourceType<DatasourcesDescriptor> getOrCreateXaDatasource() { List<Node> nodeList = model.get("xa-datasource"); if (nodeList != null && nodeList.size() > 0) { return new XaDatasourceTypeImpl<DatasourcesDescriptor>(this, "xa-datasource", model, nodeList.get(0)); } return createXaDatasource(); }
/** * If not already created, a new <code>xa-datasource</code> element will be created and returned. * Otherwise, the first existing <code>xa-datasource</code> element will be returned. * @return the instance defined for the element <code>xa-datasource</code> */ public XaDatasourceType<DatasourcesDescriptor> getOrCreateXaDatasource() { List<Node> nodeList = model.get("xa-datasource"); if (nodeList != null && nodeList.size() > 0) { return new XaDatasourceTypeImpl<DatasourcesDescriptor>(this, "xa-datasource", model, nodeList.get(0)); } return createXaDatasource(); }