I am trying to use a datasource declared in my JBoss EAP 7 standalone.xml:
<datasource jndi-name="java:jboss/datasources/my_db" pool-name="my_db" ...>
...
</datasource>
By the way I haven't found any doc about the name conventions, would java:/datasources/my_db be correct too?
Then as soon as I add the following to my RESTEasy web.xml (no other modifications):
<context-param>
<param-name>resteasy.jndi.resources</param-name>
<param-value>java:jboss/datasources/my_db</param-value>
</context-param>
the application breaks with the error:
java.lang.RuntimeException: RESTEASY003130: Class is not a root resource.
It, or one of its interfaces must be annotated with @Path:
org.jboss.as.connector.subsystems.datasources.WildFlyDataSource implements:
javax.sql.DataSource java.io.Serializable
How to access JNDI datasources in RESTEasy?
Thanks.