[
https://issues.jboss.org/browse/WFLY-11221?page=com.atlassian.jira.plugin...
]
Martin Simka updated WFLY-11221:
--------------------------------
Steps to Reproduce:
# remove datasources subsystem
# add agroal subsystem and define ExampleDS datasource
{code}
<extension module="org.wildfly.extension.datasources-agroal"/>
...
<subsystem xmlns="urn:jboss:domain:datasources-agroal:1.0">
<datasource name="ExampleDS"
jndi-name="java:jboss/datasources/ExampleDS">
<connection-factory driver="h2"
url="jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE"
username="sa" password="sa">
</connection-factory>
<connection-pool max-size="30"/>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2"
class="org.h2.Driver"/>
</drivers>
</subsystem>
{code}
# Deploy application that injects DefaultDataSource
{code}
@Resource(lookup="java:comp/DefaultDataSource")
DataSource myDS;
{code}
was:
# remove datasources subsystem
# add agroal subsystem and define ExampleDS datasource
{code}
<extension module="org.wildfly.extension.datasources-agroal"/>
...
<subsystem xmlns="urn:jboss:domain:datasources-agroal:1.0">
<datasource name="ExampleDS"
jndi-name="java:jboss/datasources/ExampleDS">
<connection-factory driver="h2"
url="jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE"
username="sa" password="sa">
</connection-factory>
<connection-pool max-size="30"/>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2"
class="org.h2.Driver"/>
</drivers>
</subsystem>
{code}
#Deploy application that injects DefaultDataSource
{code}
@Resource(lookup="java:comp/DefaultDataSource")
DataSource myDS;
{code}
Agroal datasource cannot be used as DefaultDataSource without
connector subsystem
---------------------------------------------------------------------------------
Key: WFLY-11221
URL:
https://issues.jboss.org/browse/WFLY-11221
Project: WildFly
Issue Type: Bug
Components: Agroal, EE, JCA
Affects Versions: 14.0.0.Final
Reporter: Martin Simka
Assignee: Stefano Maestri
Priority: Major
If {{datasources}} subsystem is removed and {{Example}} datasource is created in
{{datasources-agroal}} subsystem it is expected that Example datasource
({{java:jboss/datasources/ExampleDS}}) is bound to {{java:comp/DefaultDataSource}}, but it
is not.
{noformat}
12:33:17,605 ERROR [org.jboss.as.controller.management-operation] (Controller Boot
Thread) WFLYCTL0013: Operation ("deploy") failed - address:
([("deployment" => "testwebapplication.war")]) - failure
description: {
"WFLYCTL0412: Required services that are not installed:" =>
["jboss.naming.context.java.module.testwebapplication.testwebapplication.DefaultDataSource"],
"WFLYCTL0180: Services with missing/unavailable dependencies" =>
["jboss.naming.context.java.module.testwebapplication.testwebapplication.env.\"org.jboss.qa.msimka.testwebapp.TestBean\".myDS
is missing
[jboss.naming.context.java.module.testwebapplication.testwebapplication.DefaultDataSource]"]
}
{noformat}
JNDI of datasource that should be bound to default datasource can be defined in [ee
subsystem|http://wildscribe.github.io/WildFly/14.0/subsystem/ee/service/default-bindings/index.html]
Datasources subsystem is currently responsible for DefaultDatasource
[
binding|https://github.com/wildfly/wildfly/blob/master/connector/src/main...].
--
This message was sent by Atlassian Jira
(v7.12.1#712002)