private ModelNode parseJPA(XMLExtendedStreamReader reader, Namespace readerNS) throws XMLStreamException { final ModelNode operation = Util.createAddOperation(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME))); String dataSourceName = null; int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case DEFAULT_DATASOURCE_NAME: { dataSourceName = value; JPADefinition.DEFAULT_DATASOURCE.parseAndSetParameter(value, operation, reader); break; } default: { throw ParseUtils.unexpectedAttribute(reader, i); } } } // Require no content ParseUtils.requireNoContent(reader); if (dataSourceName == null) { throw ParseUtils.missingRequired(reader, Collections.singleton(Attribute.DEFAULT_DATASOURCE_NAME)); } return operation; } }
private ModelNode parseJPA(XMLExtendedStreamReader reader, Namespace readerNS) throws XMLStreamException { final ModelNode operation = Util.createAddOperation(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME))); String dataSourceName = null; int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case DEFAULT_DATASOURCE_NAME: { dataSourceName = value; JPADefinition.DEFAULT_DATASOURCE.parseAndSetParameter(value, operation, reader); break; } default: { throw ParseUtils.unexpectedAttribute(reader, i); } } } // Require no content ParseUtils.requireNoContent(reader); if (dataSourceName == null) { throw ParseUtils.missingRequired(reader, Collections.singleton(Attribute.DEFAULT_DATASOURCE_NAME)); } return operation; } }
private ModelNode parseJPA(XMLExtendedStreamReader reader, Namespace readerNS) throws XMLStreamException { String dataSourceName = null; final ModelNode operation = Util.createAddOperation(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME))); int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case DEFAULT_DATASOURCE_NAME: { dataSourceName = value; JPADefinition.DEFAULT_DATASOURCE.parseAndSetParameter(value, operation, reader); break; } case DEFAULT_EXTENDEDPERSISTENCEINHERITANCE_NAME: JPADefinition.DEFAULT_EXTENDEDPERSISTENCE_INHERITANCE.parseAndSetParameter(value, operation, reader); break; default: { throw ParseUtils.unexpectedAttribute(reader, i); } } } // Require no content ParseUtils.requireNoContent(reader); if (dataSourceName == null) { throw ParseUtils.missingRequired(reader, Collections.singleton(Attribute.DEFAULT_DATASOURCE_NAME)); } return operation; }
private ModelNode parseJPA(XMLExtendedStreamReader reader, Namespace readerNS) throws XMLStreamException { String dataSourceName = null; final ModelNode operation = Util.createAddOperation(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME))); int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case DEFAULT_DATASOURCE_NAME: { dataSourceName = value; JPADefinition.DEFAULT_DATASOURCE.parseAndSetParameter(value, operation, reader); break; } case DEFAULT_EXTENDEDPERSISTENCEINHERITANCE_NAME: JPADefinition.DEFAULT_EXTENDEDPERSISTENCE_INHERITANCE.parseAndSetParameter(value, operation, reader); break; default: { throw ParseUtils.unexpectedAttribute(reader, i); } } } // Require no content ParseUtils.requireNoContent(reader); if (dataSourceName == null) { throw ParseUtils.missingRequired(reader, Collections.singleton(Attribute.DEFAULT_DATASOURCE_NAME)); } return operation; }