return new JDBCApplicationMetaData(application, defaults);
}
private static CmpConfig parseContainerConfiguration(final XMLStreamReader reader, final CmpConfig defaults) throws XMLStreamException {
final CmpConfig config = new CmpConfig();
config.setCallEjbStoreOnClean(defaults.isCallEjbStoreOnClean());
config.setSyncOnCommitOnly(defaults.isSyncOnCommitOnly());
config.setInsertAfterEjbPostCreate(defaults.isInsertAfterEjbPostCreate());
for (Element element : children(reader)) {
switch (element) {
case SYNC_ON_COMMIT_ONLY: {
config.setSyncOnCommitOnly(Boolean.parseBoolean(reader.getElementText()));
break;
}
case INSERT_AFTER_EJB_POST_CREATE: {
config.setInsertAfterEjbPostCreate(Boolean.parseBoolean(reader.getElementText()));
break;
}
case CALL_EJB_STORE_ON_CLEAN: {
config.setCallEjbStoreOnClean(Boolean.parseBoolean(reader.getElementText()));
break;
}
default: {
throw unexpectedElement(reader);
}