Yep. I assume you are using your initial context to get a reference to your queue and queue session etc.
What you will need to do is set up a context manually, such as
java.util.Hashtable props = new java.util.Hashtable();
// Get the initial context with given properties
Context context = new InitialContext(props);
Where YOUR_URL/IP is localhost or 127.0.0.1 etc.
If I set this, is it means to use RMI but not use Local Interface?
Is it good for performance(network transmission) issue if I deploy all in an EAR?