I inherited a rewritten Java project that was written for an ATM Switch. I've been working on this project for 3.5 months and trying to test the application for certification with Discover Card. I am not that familiar with Concurrency (threads and receive queuers) but I THINK I've run into a blocking problem and cannot find a way to correct the problem.
Here is the scenario of what occurs:
- I start the application on our development server (Windows 2003).
- I submit a ISO8583 message (0800) for a dynamic key exchange to my application via a WEB APP called RCT on the Discover web site and the message processes fine. The message stops and the receive queuer per Eclipse debugger and my log says that it is waiting on another message.
- The key is held in memory in the Discover web app.
- I submit the next ISO8583 mesage (0200) to my application BUT I never see the subsequent ISO8583 message even hit our application.
- I can see the subsequent message come across the wire on a specific port using Wireshark to confirm but it never makes it to the application entry point. I put a breakpoint on where I would see the subsequent message hit the application but I never reach the breakpoint. In the Eclipse debug session I see the DiscoverChannel thread running plus the 2 receive queuer threads running as well. They appear to be open and ready for a message but again it never reaches the application.
In the Eclipse DEBUG window I copied the STACK of the THREADS and if the problem with getting a subsequent request in DiscoverChannel-ReceiveQueuer-1 THREAD that is waiting is being blocked by the DiscoverChannel-ReceiveQueuer-0 THREAD? That is how I'm reading it but would like to get some confirmation or if wrong, how to find my problem.
Here is the stack:
Thread [DiscoverChannelThread ] (Suspended)
waiting for: Socket (id=82)
Object.wait(long) line: not available [native method]
Socket(Object).wait() line: 485
DiscoverChannel(SwitchChannel).run() line: 1931
Thread.run() line: 662
Thread [DiscoverChannel-ReceiveQueuer-1] (Suspended)
waiting for: DataInputStream (id=36)
DiscoverChannel(SwitchChannel).blockUntilGetMessageBytes(Request, ProcessingTimer) line: 672
DiscoverChannel(SwitchChannel).blockUntilReceiveMessage(ProcessingTimer) line: 1330
ReceiveQueuer.run() line: 96
Thread.run() line: 662
Thread [DiscoverChannel-ReceiveQueuer-0] (Suspended)
owns: BufferedInputStream (id=60)
owns: DataInputStream (id=36)
SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not available [native method]
SocketInputStream.read(byte[], int, int) line: 129
BufferedInputStream.fill() line: 218 [local variables unavailable]
BufferedInputStream.read1(byte[], int, int) line: 258
BufferedInputStream.read(byte[], int, int) line: 317
DataInputStream.readFully(byte[], int, int) line: 178
DiscoverChannel(SwitchChannel).blockUntilGetMessageLength() line: 801
DiscoverChannel(SwitchChannel).blockUntilGetMessageBytes(Request, ProcessingTimer) line: 673
DiscoverChannel(SwitchChannel).blockUntilReceiveMessage(ProcessingTimer) line: 1330
ReceiveQueuer.run() line: 96
Thread.run() line: 662 [local variables unavailable]
Any suggestions/direction on how to debug this type of problem would be appreciated. The previous developer at this company is no longer available to ask. I've been dealing with this specific issue for 2 weeks and cannot find a solution and could really use some help/direction.