Package org.jboss.jca.common.metadata.ds
Class DsParser
- java.lang.Object
-
- org.jboss.jca.common.metadata.common.AbstractParser
-
- org.jboss.jca.common.metadata.ds.DsParser
-
- All Implemented Interfaces:
MetadataParser<DataSources>
public class DsParser extends AbstractParser implements MetadataParser<DataSources>
A datasource parser- Author:
- Jesper Pedersen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDsParser.TagA Tag.
-
Field Summary
-
Fields inherited from class org.jboss.jca.common.metadata.common.AbstractParser
bundle, log
-
-
Constructor Summary
Constructors Constructor Description DsParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSourcesparse(InputStream xmlInputStream)Parse a -ds.xml fileDataSourcesparse(XMLStreamReader reader)Parse a -ds.xml fileprotected DataSourceparseDataSource(XMLStreamReader reader)Parse a datasourceprotected DataSourcesparseDataSources(XMLStreamReader reader)Parse datasourceprotected DriverparseDriver(XMLStreamReader reader)Parse driverprotected DsSecurityparseDsSecurity(XMLStreamReader reader)Parse securityprotected DsPoolparsePool(XMLStreamReader reader)parse aCommonPoolobjectprotected StatementparseStatementSettings(XMLStreamReader reader)Parse statementprotected TimeOutparseTimeOutSettings(XMLStreamReader reader)Parse timeoutprotected ValidationparseValidationSetting(XMLStreamReader reader)Parse validationprotected XaDataSourceparseXADataSource(XMLStreamReader reader)Parse a XA datasourceprotected DsXaPoolparseXaPool(XMLStreamReader reader)parse aCommonXaPoolobject-
Methods inherited from class org.jboss.jca.common.metadata.common.AbstractParser
attributeAsBoolean, attributeAsInt, attributeAsString, elementAsBoolean, elementAsFlushStrategy, elementAsInteger, elementAsLong, elementAsString, isSystemPropertiesResolved, parseCapacity, parseConfigProperty, parseCredential, parseExtension, parseRecovery, parseSecuritySettings, parseTimeOut, parseValidation, setSystemPropertiesResolved
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.jca.common.metadata.MetadataParser
isSystemPropertiesResolved, setSystemPropertiesResolved
-
-
-
-
Method Detail
-
parse
public DataSources parse(InputStream xmlInputStream) throws Exception
Parse a -ds.xml file- Specified by:
parsein interfaceMetadataParser<DataSources>- Parameters:
xmlInputStream- the input stream- Returns:
- The datasource definitions
- Throws:
Exception- Thrown if an error occurs
-
parse
public DataSources parse(XMLStreamReader reader) throws Exception
Parse a -ds.xml file- Specified by:
parsein interfaceMetadataParser<DataSources>- Parameters:
reader- The reader- Returns:
- The datasource definitions
- Throws:
Exception- Thrown if an error occurs
-
parseDataSources
protected DataSources parseDataSources(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
Parse datasource- Parameters:
reader- The reader- Returns:
- The result
- Throws:
XMLStreamException- XMLStreamExceptionParserException- ParserExceptionValidateException- ValidateException
-
parseDriver
protected Driver parseDriver(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
Parse driver- Parameters:
reader- The reader- Returns:
- The result
- Throws:
XMLStreamException- XMLStreamExceptionParserException- ParserExceptionValidateException- ValidateException
-
parseDsSecurity
protected DsSecurity parseDsSecurity(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
Parse security- Parameters:
reader- The reader- Returns:
- The result
- Throws:
XMLStreamException- XMLStreamExceptionParserException- ParserExceptionValidateException- ValidateException
-
parseValidationSetting
protected Validation parseValidationSetting(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
Parse validation- Parameters:
reader- The reader- Returns:
- The result
- Throws:
XMLStreamException- XMLStreamExceptionParserException- ParserExceptionValidateException- ValidateException
-
parseTimeOutSettings
protected TimeOut parseTimeOutSettings(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
Parse timeout- Parameters:
reader- The reader- Returns:
- The result
- Throws:
XMLStreamException- XMLStreamExceptionParserException- ParserExceptionValidateException- ValidateException
-
parseStatementSettings
protected Statement parseStatementSettings(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
Parse statement- Parameters:
reader- The reader- Returns:
- The result
- Throws:
XMLStreamException- XMLStreamExceptionParserException- ParserExceptionValidateException- ValidateException
-
parsePool
protected DsPool parsePool(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
parse aCommonPoolobject- Overrides:
parsePoolin classAbstractParser- Parameters:
reader- reader- Returns:
- the parsed
CommonPoolobject - Throws:
XMLStreamException- XMLStreamExceptionParserException- ParserExceptionValidateException- ValidateException
-
parseXaPool
protected DsXaPool parseXaPool(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
parse aCommonXaPoolobject- Overrides:
parseXaPoolin classAbstractParser- Parameters:
reader- reader- Returns:
- the parsed
CommonXaPoolobject - Throws:
XMLStreamException- XMLStreamExceptionParserException- ParserExceptionValidateException- ValidateException
-
parseXADataSource
protected XaDataSource parseXADataSource(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
Parse a XA datasource- Parameters:
reader- The reader- Returns:
- The XA datasource
- Throws:
XMLStreamException- Thrown if a stream error occursParserException- Thrown if a parser error occursValidateException- Thrown if a validation error occurs
-
parseDataSource
protected DataSource parseDataSource(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException
Parse a datasource- Parameters:
reader- The reader- Returns:
- The datasource
- Throws:
XMLStreamException- Thrown if a stream error occursParserException- Thrown if a parser error occursValidateException- Thrown if a validation error occurs
-
-