This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
When i run my application in remote mode, all works fine, but somehow i cannot debug in this mode. I use eclipse, it doesn't reach the breakpoints and when i add System.out.printlines it doesn't print them out... What could this be, does it have anything to do with the stub? Code works perfectly but i just want to see what happens in debugging mode... Can someone please help me?
it is client code. I have (in short) the following outline :
1 interface (both for local and remote) local implementation remote implementation (delegates to local implementation so remote book() method => local.book())
The remote class extends unicast remote object and the server makes sure there is a registry and stub class is bound.
I set the debug markers in the local code, which will be reached through remote method invocation. For instance when i put a marker in local book() method or Lockmanager.lockRecord() the code just goes on, works perfectly but it doesn't stop at the marker.
Hope this helps you in figuring out what's wrong. I guess it's an awkward problem i'm having here...
author and jackaroo
Sorry, I havent been much help - I have been trying to get some handle on what might be wrong, but nothing pops out.
Slightly away from your current problem (not stopping in the local method), you can specfy the "-keep" option to rmic, which will keep the automatically generated java files that are used to create the stubs. That should make the debugger a little happier.
About all I can suggest at the moment is that you keep moving your System.out.println() statements further back in your program until you do get some output. Then Look to see what is happening imediately afterwards to see if there is anything happening to explain why you are not getting output later.
Joined: Mar 29, 2004
it's kind of strange now, all works perfectly like i said but still cannot debug...
It has to do with the remote stub, if i rmic -keep like you said it just jumos in this code and i still never reach my remote code in my case the lockmanager...