[jboss-jira] [JBoss JIRA] (AS7-3615) CLI: xa-data-source add command does not allow to specify xa-datasource-properties
Alexey Loubyansky (JIRA)
jira-events at lists.jboss.org
Sun Feb 5 07:34:48 EST 2012
[ https://issues.jboss.org/browse/AS7-3615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Loubyansky updated AS7-3615:
-----------------------------------
Assignee: Stefano Maestri (was: Alexey Loubyansky)
Component/s: Domain Management
JCA
It's because the add operation doesn't accept the xa properties. Once it does, the add command in the cli will do as well.
[standalone at localhost:9999 /] /subsystem=datasources/xa-data-source=?:read-operation-description(name=add)
{
"outcome" => "success",
"result" => {
"operation-name" => "add",
"description" => "Add a new XA data-source",
"request-properties" => {
"xa-datasource-class" => {
"description" => "The fully qualifed name of the javax.sql.XADataSource implementation",
"type" => STRING,
"required" => false
},
"jndi-name" => {
"description" => "Specifies the JNDI name for the datasource",
"type" => STRING,
"required" => true
},
"driver-name" => {
"description" => "Defines the JDBC driver the datasource should use. It is a symbolic name matching the the name of installed driver. In case the driver is deployed as jar, the name is the name of deployment unit",
"type" => STRING,
"required" => true
},
"new-connection-sql" => {
"description" => "Specifies an SQL statement to execute whenever a connection is added to the connection pool",
"type" => STRING,
"required" => false
},
"url-delimiter" => {
"description" => "Specifies the delimeter for URLs in connection-url for HA datasources",
"type" => STRING,
"required" => false
},
"url-selector-strategy-class-name" => {
"description" => "A class that implements org.jboss.jca.adapters.jdbc.URLSelectorStrategy",
"type" => STRING,
"required" => false
},
"use-java-context" => {
"description" => "Setting this to false will bind the datasource into global JNDI",
"type" => BOOLEAN,
"required" => false,
"default" => "true"
},
"max-pool-size" => {
"description" => "The max-pool-size element specifies the maximum number of connections for a pool. No more connections will be created in each sub-pool",
"type" => INT,
"required" => false,
"default" => "20"
},
"min-pool-size" => {
"description" => "The min-pool-size element specifies the minimum number of connections for a pool",
"type" => INT,
"required" => false,
"default" => "0"
},
"pool-prefill" => {
"description" => "Should the pool be prefilled. Changing this value requires a server restart",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"pool-use-strict-min" => {
"description" => "Specifies if the min-pool-size should be considered strictly",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"interleaving" => {
"description" => "An element to enable interleaving for XA connections",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"no-tx-separate-pool" => {
"description" => "Oracle does not like XA connections getting used both inside and outside a JTA transaction. To workaround the problem you can create separate sub-pools for the different contexts",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"pad-xid" => {
"description" => "Should the Xid be padded",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"same-rm-override" => {
"description" => "The is-same-rm-override element allows one to unconditionally set whether the javax.transaction.xa.XAResource.isSameRM(XAResource) returns true or false",
"type" => BOOLEAN,
"required" => false
},
"wrap-xa-resource" => {
"description" => "Should the XAResource instances be wrapped in a org.jboss.tm.XAResourceWrapper instance",
"type" => BOOLEAN,
"required" => false,
"default" => "true"
},
"user-name" => {
"description" => "Specify the user name used when creating a new connection",
"type" => STRING,
"required" => false
},
"password" => {
"description" => "Specifies the password used when creating a new connection",
"type" => STRING,
"required" => false
},
"security-domain" => {
"description" => "Specifies the security domain which defines the javax.security.auth.Subject that are used to distinguish connections in the pool",
"type" => STRING,
"required" => false
},
"reauth-plugin-class-name" => {
"description" => "The fully qualified class name of the reauthentication plugin implementation",
"type" => STRING,
"required" => false
},
"reauth-plugin-properties" => {
"description" => "The properties for the reauthentication plugin",
"type" => OBJECT,
"value-type" => STRING,
"required" => false
},
"flush-strategy" => {
"description" => "Specifies how the pool should be flush in case of an error. Valid values are: FailingConnectionOnly (default), IdleConnections and EntirePool",
"type" => STRING,
"required" => false,
"default" => "\"FailingConnectionOnly\""
},
"prepared-statements-cache-size" => {
"description" => "The number of prepared statements per connection in an LRU cache",
"type" => LONG,
"required" => false
},
"share-prepared-statements" => {
"description" => "Whether to share prepared statements, i.e. whether asking for same statement twice without closing uses the same underlying prepared statement",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"track-statements" => {
"description" => "Whether to check for unclosed statements when a connection is returned to the pool, result sets are closed, a statement is closed or return to the prepared statement cache. Valid values are: \"false\" - do not track statements, \"true\" - track statements and result sets and warn when they are not closed, \"nowarn\" - track statements but do not warn about them being unclosed",
"type" => STRING,
"required" => false,
"default" => "\"NOWARN\""
},
"allocation-retry" => {
"description" => "The allocation retry element indicates the number of times that allocating a connection should be tried before throwing an exception",
"type" => INT,
"required" => false
},
"allocation-retry-wait-millis" => {
"description" => "The allocation retry wait millis element specifies the amount of time, in milliseconds, to wait between retrying to allocate a connection",
"type" => LONG,
"required" => false
},
"blocking-timeout-wait-millis" => {
"description" => "The blocking-timeout-millis element specifies the maximum time, in milliseconds, to block while waiting for a connection before throwing an exception. Note that this blocks only while waiting for locking a connection, and will never throw an exception if creating a new connection takes an inordinately long time",
"type" => LONG,
"required" => false
},
"idle-timeout-minutes" => {
"description" => "The idle-timeout-minutes elements specifies the maximum time, in minutes, a connection may be idle before being closed. The actual maximum time depends also on the IdleRemover scan time, which is half of the smallest idle-timeout-minutes value of any pool. Changing this value requires a server restart.",
"type" => LONG,
"required" => false
},
"query-timeout" => {
"description" => "Any configured query timeout in seconds. If not provided no timeout will be set",
"type" => LONG,
"required" => false
},
"use-try-lock" => {
"description" => "Any configured timeout for internal locks on the resource adapter objects in seconds",
"type" => LONG,
"required" => false
},
"set-tx-query-timeout" => {
"description" => "Whether to set the query timeout based on the time remaining until transaction timeout. Any configured query timeout will be used if there is no transaction",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"transaction-isolation" => {
"description" => "Set the java.sql.Connection transaction isolation level. Valid values are: TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE and TRANSACTION_NONE",
"type" => STRING,
"required" => false
},
"check-valid-connection-sql" => {
"description" => "Specify an SQL statement to check validity of a pool connection. This may be called when managed connection is obtained from the pool",
"type" => STRING,
"required" => false
},
"exception-sorter-class-name" => {
"description" => "An org.jboss.jca.adapters.jdbc.ExceptionSorter that provides an isExceptionFatal(SQLException) method to validate if an exception should broadcast an error",
"type" => STRING,
"required" => false
},
"exception-sorter-properties" => {
"description" => "The exception sorter properties",
"type" => OBJECT,
"value-type" => STRING,
"required" => false
},
"stale-connection-checker-class-name" => {
"description" => "An org.jboss.jca.adapters.jdbc.StaleConnectionChecker that provides an isStaleConnection(SQLException) method which if it returns true will wrap the exception in an org.jboss.jca.adapters.jdbc.StaleConnectionException",
"type" => STRING,
"required" => false
},
"stale-connection-checker-properties" => {
"description" => "The stale connection checker properties",
"type" => OBJECT,
"value-type" => STRING,
"required" => false
},
"valid-connection-checker-class-name" => {
"description" => "An org.jboss.jca.adapters.jdbc.ValidConnectionChecker that provides an isValidConnection(Connection) method to validate a connection. If an exception is returned that means the connection is invalid. This overrides the check-valid-connection-sql element",
"type" => STRING,
"required" => false
},
"valid-connection-checker-properties" => {
"description" => "The valid connection checker properties",
"type" => OBJECT,
"value-type" => STRING,
"required" => false
},
"background-validation-millis" => {
"description" => "The background-validation-millis element specifies the amount of time, in milliseconds, that background validation will run. Changing this value requires a server restart",
"type" => LONG,
"required" => false
},
"background-validation" => {
"description" => "An element to specify that connections should be validated on a background thread versus being validated prior to use. Changing this value requires a server restart",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"use-fast-fail" => {
"description" => "Whether to fail a connection allocation on the first try if it is invalid (true) or keep trying until the pool is exhausted of all potential connections (false)",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"validate-on-match" => {
"description" => "The validate-on-match element specifies if connection validation should be done when a connection factory attempts to match a managed connection. This is typically exclusive to the use of background validation",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"xa-resource-timeout" => {
"description" => "The value is passed to XAResource.setTransactionTimeout(), in seconds. Default is zero",
"type" => INT,
"required" => false
},
"spy" => {
"description" => "Enable spying of SQL statements",
"type" => BOOLEAN,
"required" => false,
"default" => "false"
},
"use-ccm" => {
"description" => "Enable the use of a cached connection manager",
"type" => BOOLEAN,
"required" => false,
"default" => "true"
},
"recovery-username" => {
"description" => "The user name used for recovery",
"type" => STRING,
"required" => false
},
"recovery-password" => {
"description" => "The password used for recovery",
"type" => STRING,
"required" => false
},
"recovery-security-domain" => {
"description" => "The security domain used for recovery",
"type" => STRING,
"required" => false
},
"recovery-plugin-class-name" => {
"description" => "The fully qualified class name of the recovery plugin implementation",
"type" => STRING,
"required" => false
},
"recovery-plugin-properties" => {
"description" => "The properties for the recovery plugin",
"type" => OBJECT,
"value-type" => STRING,
"required" => false
},
"no-recovery" => {
"description" => "Specifies if the connection pool should be excluded from recovery",
"type" => BOOLEAN,
"required" => false
},
"jta" => {
"description" => "Enable JTA integration",
"type" => BOOLEAN,
"required" => false,
"default" => "true"
}
},
"read-only" => false
}
}
> CLI: xa-data-source add command does not allow to specify xa-datasource-properties
> ----------------------------------------------------------------------------------
>
> Key: AS7-3615
> URL: https://issues.jboss.org/browse/AS7-3615
> Project: Application Server 7
> Issue Type: Bug
> Components: CLI, Domain Management, JCA
> Affects Versions: 7.1.0.Final
> Reporter: Dominik Pospisil
> Assignee: Stefano Maestri
>
> It seems that CLI xa-data-source add command does not allow to specify xa-datasource-properties. As having non empty xa-tadasource-properties map is mandatory, enabling such datasource fails:
> [standalone at localhost:9999 xa-datasource-properties] xa-data-source add --name=TestXADS --jndi-name=java:jboss/datasources/TestXADS --driver-name=h2
> [standalone at localhost:9999 xa-datasource-properties] xa-data-source enable --name=TestXADS
> JBAS014750: Operation handler failed to complete
> Server exception:
> 15:54:56,948 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.data-source.java:jboss/datasources/TestXADS: org.jboss.msc.service.StartException in service jboss.data-source.java:jboss/datasources/TestXADS: JBAS010433: Error during the deployment of TestXADS
> at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:118)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.7.0_b147-icedtea]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.7.0_b147-icedtea]
> at java.lang.Thread.run(Thread.java:722) [:1.7.0_b147-icedtea]
> Caused by: org.jboss.jca.common.api.validator.ValidateException: IJ010069: Missing required element xa-datasource-property in org.jboss.jca.common.metadata.ds.XADataSourceImpl
> at org.jboss.jca.common.metadata.ds.XADataSourceImpl.validate(XADataSourceImpl.java:384)
> at org.jboss.jca.common.metadata.ds.XADataSourceImpl.<init>(XADataSourceImpl.java:115)
> at org.jboss.as.connector.subsystems.datasources.ModifiableXaDataSource.getUnModifiableInstance(ModifiableXaDataSource.java:372)
> at org.jboss.as.connector.subsystems.datasources.XaDataSourceService.getDeployer(XaDataSourceService.java:66)
> at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:111)
> ... 5 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list