problem configure JBoss to work with JNDI

一曲冷凌霜 提交于 2019-12-01 08:36:48

You should use such construction to call Datasource: java:bilby.

You can read more about that here:

Naming and Directory (JNDI) - JBOSS jndi Datasource: jdbc not bound

To check how the datasource is bound in the JNDI tree you should use the jmx-console http://localhost8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss%3Aservice%3DJNDIView and invoke the list() method.

Datasources are registered under "jdbc". In your case "jdbc/bilby"

EDIT: That was an example that works for me without spring. Now found this example which injects a more complete JNDI name.

<bean id="idDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="java:comp/env/jdbc/bilby" />
</bean>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!