Why is JNDI so slow by nature
Aleksander Bai <[email protected]> Thu, 21 May 2009 12:21:56 +0200
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Organization | ProgNett AS |
| Message-ID | <000201c9d9fd$f7d90cc0$e78b2640$@no> |
Hi,
We have an environment with Jboss (running ejbs) and a standalone
application.
To connect we use JNDI, but it's quite slow (averaging around 7 seconds, but
depending on the connection site's internet speed it can be as long as 30
seconds).
This does not happen running the (jboss) server localhost (obviously).
We've tried with several servers. There isn't a problem with the server
connections, because both apache and ssh connects under less than a second.
The Context is configured like this:
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(InitialContext.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(InitialContext.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
env.put(InitialContext.PROVIDER_URL, serverURL);
env.put("jnp.timeout", "10000");
env.put("jnp.sotimeout", "5000");
final ILoader platformLoader = (ILoader) ctx.lookup("Platform/remote");
Is JDNI slow by nature, or is it a configurable thing? Can jboss play a part
in this role?
Hope this is the correct place to ask for help. :)
Best regards,
Alex
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS". For general help, send email to
[email protected] and include in the body of the message "help".
For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html
To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html