public class DatasourceJBossASClient extends JBossASClient
| Modifier and Type | Field and Description |
|---|---|
static String |
CONNECTION_PROPERTIES |
static String |
DATA_SOURCE |
static String |
JDBC_DRIVER |
static String |
OP_ENABLE |
static String |
SUBSYSTEM_DATASOURCES |
static String |
XA_DATA_SOURCE |
static String |
XA_DATASOURCE_PROPERTIES |
ADD, ADDRESS, BATCH, BATCH_STEPS, FAILURE_DESCRIPTION, log, NAME, OPERATION, OUTCOME, OUTCOME_SUCCESS, PERSISTENT, READ_ATTRIBUTE, READ_RESOURCE, REMOVE, RESULT, SUBSYSTEM, SYSTEM_PROPERTY, VALUE, WRITE_ATTRIBUTE| Constructor and Description |
|---|
DatasourceJBossASClient(org.jboss.as.controller.client.ModelControllerClient client) |
| Modifier and Type | Method and Description |
|---|---|
org.jboss.dmr.ModelNode |
createNewDatasourceRequest(String name,
int blockingTimeoutWaitMillis,
String connectionUrlExpression,
String driverName,
String exceptionSorterClassName,
int idleTimeoutMinutes,
boolean jta,
int minPoolSize,
int maxPoolSize,
int preparedStatementCacheSize,
String securityDomain,
String staleConnectionCheckerClassName,
String transactionIsolation,
String validConnectionCheckerClassName,
boolean validateOnMatch,
Map<String,String> connectionProperties)
Returns a ModelNode that can be used to create a datasource.
|
org.jboss.dmr.ModelNode |
createNewDatasourceRequest(String name,
String connectionUrlExpression,
String driverName,
boolean jta,
Map<String,String> connectionProperties) |
org.jboss.dmr.ModelNode |
createNewJdbcDriverRequest(String name,
String moduleName,
String driverXaClassName)
Returns a ModelNode that can be used to create a JDBC driver configuration for use by datasources.
|
org.jboss.dmr.ModelNode |
createNewXADatasourceRequest(String name,
int blockingTimeoutWaitMillis,
String driverName,
String xaDataSourceClass,
String exceptionSorterClassName,
int idleTimeoutMinutes,
int minPoolSize,
int maxPoolSize,
Boolean noRecovery,
Boolean noTxSeparatePool,
int preparedStatementCacheSize,
String recoveryPluginClassName,
String securityDomain,
String staleConnectionCheckerClassName,
String transactionIsolation,
String validConnectionCheckerClassName,
Map<String,String> xaDatasourceProperties)
Returns a ModelNode that can be used to create an XA datasource.
|
void |
enableDatasource(String name) |
void |
enableXADatasource(String name) |
boolean |
isDatasource(String datasourceName)
Checks to see if there is already a datasource with the given name.
|
boolean |
isDatasourceEnabled(String name) |
boolean |
isJDBCDriver(String jdbcDriverName)
Checks to see if there is already a JDBC driver with the given name.
|
boolean |
isXADatasource(String datasourceName)
Checks to see if there is already a XA datasource with the given name.
|
boolean |
isXADatasourceEnabled(String name) |
void |
removeDatasource(String name)
Completely removes the named datasource.
|
createBatchRequest, createReadAttributeRequest, createReadAttributeRequest, createRequest, createRequest, createWriteAttributeRequest, execute, findNodeInList, getFailureDescription, getModelControllerClient, getResultListAsStrings, getResults, getStringAttribute, getStringAttribute, isSuccess, readResource, readResource, remove, setPossibleExpressionpublic static final String SUBSYSTEM_DATASOURCES
public static final String DATA_SOURCE
public static final String XA_DATA_SOURCE
public static final String JDBC_DRIVER
public static final String CONNECTION_PROPERTIES
public static final String XA_DATASOURCE_PROPERTIES
public static final String OP_ENABLE
public DatasourceJBossASClient(org.jboss.as.controller.client.ModelControllerClient client)
public void removeDatasource(String name) throws Exception
name - the name of the datasource to removeExceptionpublic boolean isDatasourceEnabled(String name) throws Exception
Exceptionpublic boolean isXADatasourceEnabled(String name) throws Exception
Exceptionpublic boolean isJDBCDriver(String jdbcDriverName) throws Exception
jdbcDriverName - the name to checkExceptionpublic boolean isDatasource(String datasourceName) throws Exception
datasourceName - the name to checkExceptionpublic boolean isXADatasource(String datasourceName) throws Exception
datasourceName - the name to checkExceptionpublic org.jboss.dmr.ModelNode createNewJdbcDriverRequest(String name, String moduleName, String driverXaClassName)
name - the name of the JDBC driver (this is not the name of the JDBC jar or the module name, it is
just a convenience name of the JDBC driver configuration).moduleName - the name of the JBossAS module where the JDBC driver is installeddriverXaClassName - the JDBC driver's XA datasource classname (null if XA is not supported)public org.jboss.dmr.ModelNode createNewDatasourceRequest(String name, int blockingTimeoutWaitMillis, String connectionUrlExpression, String driverName, String exceptionSorterClassName, int idleTimeoutMinutes, boolean jta, int minPoolSize, int maxPoolSize, int preparedStatementCacheSize, String securityDomain, String staleConnectionCheckerClassName, String transactionIsolation, String validConnectionCheckerClassName, boolean validateOnMatch, Map<String,String> connectionProperties)
name - blockingTimeoutWaitMillis - connectionUrlExpression - driverName - exceptionSorterClassName - idleTimeoutMinutes - jta - true if this DS should support transactions; false if notminPoolSize - maxPoolSize - preparedStatementCacheSize - securityDomain - staleConnectionCheckerClassName - transactionIsolation - validConnectionCheckerClassName - connectionProperties - public org.jboss.dmr.ModelNode createNewDatasourceRequest(String name, String connectionUrlExpression, String driverName, boolean jta, Map<String,String> connectionProperties)
public org.jboss.dmr.ModelNode createNewXADatasourceRequest(String name, int blockingTimeoutWaitMillis, String driverName, String xaDataSourceClass, String exceptionSorterClassName, int idleTimeoutMinutes, int minPoolSize, int maxPoolSize, Boolean noRecovery, Boolean noTxSeparatePool, int preparedStatementCacheSize, String recoveryPluginClassName, String securityDomain, String staleConnectionCheckerClassName, String transactionIsolation, String validConnectionCheckerClassName, Map<String,String> xaDatasourceProperties)
name - blockingTimeoutWaitMillis - driverName - xaDataSourceClass - exceptionSorterClassName - idleTimeoutMinutes - minPoolSize - maxPoolSize - noRecovery - optional, left unset if nullnoTxSeparatePool - optional, left unset if nullpreparedStatementCacheSize - recoveryPluginClassName - optional, left unset if nullsecurityDomain - staleConnectionCheckerClassName - optional, left unset if nulltransactionIsolation - validConnectionCheckerClassName - xaDatasourceProperties - Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.