Have you tried the remote connection without the local one concurrently? I've managed to do what you suggest using just the remote connection..
However, I've been wondering about the architecture of this approach.. Does it make sense to use a Federated JNDI server with queues on various local machines? In my case the connection between the 2 is a dial-up so I need queues on each side for caching sent messages..
Hey there's another way that is done when using Sun's J2EE reference edition. Basically you deploy an extra ConnectionFactory that has been configured to link to the other machine. Then you just grab JNDI to map the one you want.
To me, this solution feels right and I would expect something similar (or better!) in JBoss - I just haven't found it yet!!
Did either of you find a fully satisfactory solution for this issue?
I have the same need and have assumed (but not yet tested)that creating an InitialContext with the remote host as the PROVIDER_URL then doing something like:
where the ejb-jar.xml contains:
&& in jboss.xml
Would look up the remote connection factory (ConnectionFactory) on the remote machine - is this okay and is there a better way?