I've had this issue for a while. Working with JBoss 5.1.0. I'm trying to create a new *-ds.xml file following the format of the sample datasources. My jndi-name is "alert" and the following are other configured datasources on this server:
2012-08-30 12:03:40,141 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main) Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'javaefaultDS'
2012-08-30 12:03:40,184 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main) Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/LiferayPool' to JNDI name 'java:jdbc/LiferayPool'
2012-08-30 12:03:40,222 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main) Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/MyDS' to JNDI name 'java:jdbc/MyDS'
<!-- should only be used on drivers after 3.22.1 with "ping" support
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
<!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
From what I understand the JNDI naming is becoming strict. you should be using something like java:jobss/<name> notation. the ones you see at the top that did bind might have done so in a form of backwards compatibility. Try a proper JNDI name.
Where exactly have you placed that *-ds.xml file and what command do you use to start the server?
Joined: Sep 04, 2012
In the server/default/deploy folder, and I use the jboss run.sh script in the bin folder (we're using the server for a liferay portal if that helps at all). This is just really confusing to me, I've got binding working automatically in our dev env, but not QA. No idea what happened to this box.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com