I am using the class name of the remote interface for lookup so not exactly
the same as using the "java:global:". Could that be the issue? My lookup
code: class ServiceLocator { // ... InitialContext initialContext = new
InitialContext(); public T lookupRemote(final Class remoteInterface) throws
NamingException {; try { // Try using GlassFish JNDI beanInterface = (T)
initialContext.lookup( getGlassfishJNDIName(remoteInterface)); } catch
(NamingException ex) { try { // Then try using JBoss 7 JNDI beanInterface =
(T) initialContext.lookup(getJBoss7JNDIName(remoteInterface)); } catch
(NamingException exx) { LOG.error("Error looking up signserver interface",
exx); throw ex; } } } private String getGlassfishJNDIName(final Class
remoteInterface) { return remoteInterface.getName(); } // ... }
IWorkerSession.IRemote workerSession =
ServiceLocator.getInstance().lookupRemote(IWorkerSession.IRemote.class);
--
[Message sent by forum member 'netmackan']
View Post: http://forums.java.net/node/897798