I'm not an expert on the Application Client Container, but you shouldn't need to worry about which port the naming service is using. The ACC (the appclient command) should obtain this information from the Glassfish configuration for you. All you need to do is instantiate an InitialContext.
Nigel
[Message sent by forum member 'nigeldeakin' (nigel.deakin_at_sun.com)]
http://forums.java.net/jive/thread.jspa?messageID=365253