Re: Why is JNDI so slow by nature
Gregg Wonderly <[email protected]> Fri, 22 May 2009 11:09:51 -0500
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <[email protected]> |
Distributed Garbage Collection (DGC) can often play a part in these delays by
creating additional calls to the remote VM to check on liveness of the object.
If you can, I'd suggest using stack dumps to asses where in the call chain
things are at when these delays occur. That should give you a lot more
information about what is actually going on.
Gregg Wonderly
Aleksander Bai wrote:
> 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
>
===========================================================================
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