users@glassfish.java.net

Re: Re: EJB call takes 5-10 seconds on GlassFish 3, ~1 sec on ..

From: <forums_at_java.net>
Date: Thu, 1 Aug 2013 04:09:50 -0500 (CDT)

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