Is this what you are looking for?
Configuring a DataSource for remote usage
As of jboss-4.0.0 there is support for accessing a DataSource from a remote client. The one change that is neccessary for the client to be able to lookup the DataSource from jndi is to specify use-java-context=false as shown here:
This results in the DataSource being bound under the jndi name "GenericDS?" instead of the default of "java:/GenericDS" which restricts the lookup to the same vm as the jboss server.
taken from: http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources
Thanks a lot!
use-java-context seems to me exactly what I need!