How does a remote client find JNDI? I'm looking to know what ports are hit first and how a client communicates w/ the naming server.

---

Sorry for the repitition as I've posted before on this but am appending the info again in case someone who can help hasn't seen it. I'm getting the following CommunicationException and can't figure out what's going on.

--- console output
javax.naming.CommunicationException: Peek timed out. Root exception is java.io.InterruptedIOException: Peek timed out
at java.net.PlainDatagramSocketImpl.peek(Native Method)
at java.net.DatagramSocket.receive(DatagramSocket.java:349)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:930)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1017)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:447)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at com.neuroquest.cais.clients.fielder.Fielder.createPTP(Unknown Source)
at com.neuroquest.cais.clients.Fielder.Fielder.main(Unknown Source)

--- my log files
[ERROR]: Could not get JNDI context
[ERROR]: NamingException javax.naming.CommunicationException: Peek timed out [Root exception is java.io.InterruptedIOException: Peek timed out]

--- my ~/conf/jndi.properties which is in the classpath
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://192.168.0.10:1099/
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
#jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory
#jnp.timeout=0
#jnp.sotimeout=0

--- And here's the code that I'm trying to connect to the server with (which destroys a queue if already registered, and then recreates it, for those cases where the client may go down) ...

// this is the jboss server I'm connecting to remotly
String adaptorName = "jmx:" + props.getProperty("fielder.manager") + ":rmi";

try {
InitialContext ctx = new InitialContext();
RMIAdaptor adaptor = (RMIAdaptor) ctx.lookup(adaptorName);
ObjectName name = new ObjectName("jboss.mq:service=DestinationManager");
RemoteMBeanServer server = new RMIConnectorImpl(adaptor);
ObjectName queName = new ObjectName("queue/myQueue");

boolean registered = server.isRegistered(queName);

String[] sig = {"java.lang.String"};
Object[] arg = {props.getProperty("myQueue")};

if (registered) {
log.info(Fielder.class, "already registered, destroying queue");
server.invoke(name, "destroyQueue", arg, sig);
}

log.info(Fielder.class, "creating queue");
server.invoke(name, "createQueue", arg, sig);
...

--- And here's something I've tried, I did the telnet command below. With the resulting output I got, I believe the naming server is there (or at least what hits port 1099)...

$ telnet 192.168.0.10 1099
Trying 192.168.0.10...
Connected to 192.168.0.10.
Escape character is '^]'.
¬ísrxjava.rmi.MarshalledObject|½#ícü>abIchashlocBytesta[BobjBytesq~`xpÀq 4ura[B¬óvøTàaxp$¬ítrhttp://cassia:8083/q~q~uq~bìísr org.jnp.server.NamingServer_Stubaaxryjava.rmi.server.RemoteStubéþÜÉáeyax r{java.rmi.server.RemoteObjectÓa´
a3#bxpw7
UnicastRef2


Any other ideas much appreciated.


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to