I'm a bit puzzled. This let me think you have lookup the DS remote
The code is the same production code that runs just fine on local datasources.
So what is your scenario? A JBoss as web frontend and a couple of JBoss instances as EJB worker each with one local db?