Highlighted

Unable to call remoting service if another java thread listens to socket.

Avatar

Avatar

RupakKhurana

Avatar

RupakKhurana

RupakKhurana

07-10-2011

Hello

I have an LCDS server running under tomcat that works fine so far and I can call remote procedures defined in remoting-config.xml. So far all is well.

Now in this server application, inside a servlet.init(), I start a java thread that creates a java.net.ServerSocket and starts listening to it for data that is coming from some other remote machine over the TCP/IP socket.

If I instantiate this java thread, I am unable to call remote procedures from the flex client. I get an error - RPC Fault faultString="Could not send message reliably, FaultCode=client.error.messageSend, FaultDetail=channel.connect.Failed, error NetConnection.Call.Failed....

If I dont instantiate this thread, then the RPC calls work. Whats going on?

Is it that this java thread.run() is blocked on socket.inputStream.avaialble() and is not letting other servlets to run.. how to resolve this....

thanks

RK

Replies

Highlighted

Avatar

Avatar

tomj

Employee

Avatar

tomj

Employee

tomj
Employee

13-10-2011

Sounds like you need to make sure that everything has its own port number.  You can't listen (for instance) on port 8400 if you application server is also listening there.

Tom