Could you review and merge on master please?
bye
S.
On 04/08/2011 01:05 AM, Brian Stansberry wrote:
Jesper/Stefano:
Heiko's executing an operation against the DomainController here,
which first applies it to the domain model and then pushes it to the
running servers. When I tried this, what I see is that when this
operation is applied to the servers it fails due to validation
problems[1]:
This operation handler has nice validation logic, but it's executed
inside the RuntimeTask, which only gets executed on the server, and
thus allows invalid state to be stored in the domain model. Can the
call to DataSourceModelNodeUtil.from / xaFrom be moved out of the
RuntimeTask and happen earlier? This will allow the operation to be
validated on the DomainController and the error to be handled more
cleanly.
[1]
org.jboss.jca.common.api.validator.ValidateException: jndiName (xml
attribure jndi-name) is required in
org.jboss.jca.common.metadata.ds.DataSourceImpl
at
org.jboss.jca.common.metadata.ds.DataSourceAbstractImpl.partialCommonValidation(DataSourceAbstractImpl.java:262)
at
org.jboss.jca.common.metadata.ds.DataSourceAbstractImpl.<init>(DataSourceAbstractImpl.java:142)
at
org.jboss.jca.common.metadata.ds.DataSourceImpl.<init>(DataSourceImpl.java:90)
at
org.jboss.as.connector.subsystems.datasources.DataSourceModelNodeUtil.from(DataSourceModelNodeUtil.java:348)
at
org.jboss.as.connector.subsystems.datasources.DataSourceAdd.createDataSourceService(DataSourceAdd.java:48)
at
org.jboss.as.connector.subsystems.datasources.DataSourceAdd.createDataSourceService(DataSourceAdd.java:48)
at
org.jboss.as.connector.subsystems.datasources.AbstractDataSourceAdd$1.execute(AbstractDataSourceAdd.java:95)
at
org.jboss.as.server.ServerControllerImpl.doExecute(ServerControllerImpl.java:190)
On 4/7/11 3:27 AM, Heiko Braun wrote:
>
>
> [localhost:9999 /]
>
/*profile=default/subsystem=datasources/data-source="custom-datasource-name":add*
>
> {
> "outcome" => "*failed*",
> "result" => {"server-groups" =>
{"main-server-group" => {
> "server-one" => {
> "host" => "local",
> "response" => {
> "outcome" => "failed",
> "failure-description" => "Failed to create DataSource instance for
[{
> \"operation\" => \"add\",
> \"address\" => [
> (\"subsystem\" => \"datasources\"),
> (\"data-source\" => \"custom-datasource-name\")
> ]
> [...]
>
> And then a subsequent read operation blows up:
>
> {
> "operation" : "*read-children-resources*",
> "address" : [
> {
> "PROPERTY_VALUE" : {
> "profile" : "default"
> }
> },
> {
> "PROPERTY_VALUE" : {
> "subsystem" : "datasources"
> }
> }
> ],
> "child-type" : "data-source"
> }
>
>
> [Host Controller] 10:18:06,349 *ERROR* [org.jboss.as.controller]
> (pool-2-thread-21) operation ("read-children-resources") failed -
> address: ([
> [Host Controller] ("profile" => "default"),
> [Host Controller] ("subsystem" => "datasources")
> [Host Controller] ]): java.lang.IllegalArgumentException
> [Host Controller] at
> org.jboss.dmr.ModelValue.getKeys(ModelValue.java:124)
> [Host Controller] at org.jboss.dmr.ModelNode.keys(ModelNode.java:1085)
> [Host Controller] at
>
org.jboss.as.controller.operations.global.GlobalOperationHandlers$ReadResourceHandler.readModel(GlobalOperationHandlers.java:128)
>
>
>
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev