I assume you are using JBoss 3.2.X.
You cant access DataSources outside of server, they arent exposed.
Look JBoss sources for some test cases, that uses Naming Service, it may be helpfull.
I'm using JBoss server 4.0.1.
You mentioned that DataSources are not exposed; is this v 3.2.x specific or does that also apply to v 4.0.1?
I'm trying to find documentation on what is/isn't exposed, any suggestions on where to look?
Also please note that using my code, the client (outside JBoss AS) sees no bindings whatsoever. I'm assuming at least "something" should be exposed?