Sorry, the error message should be "javax.naming.NameNotFoundException: mySqlServerDB not bound"
I have the very same problem even if my code does something different. Server-side the data source IS bound...
And the answer is: you cannot access the DS from client...
So make a bean to handle it.
However, since the default behaviour for JAAS login modules is to make a direct query on the DS it was AWFULLY strange that it didn't work. This isn't coherent at all, please rectify this in the jaas modules.
The JBossJCA FAQ said "In JBoss-3.2.x you cannot, DataSources are not exposed remotely. There is an implementation of this in JBoss4. I would not recommend this anti-pattern", but how to do it in JBoss4.0.0? Someone said, to bind the datasource in the global jndi namespace, but how to bind the datasource in the global jndi namespace?
under this line:
add a new line: