This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Have to reconnect each time while running debugging maven remotely?  RSS feed

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Due to legacy reasons we have forkMode set to 'pertest' in our pom. This configuration can't be changed. However when I remote debug in eclipse(or command line) I use `"-Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" test -DforkMode=never"`. I then connect to port 8000 from eclipse. However since forkMode is set to pertest each time a jvm is spawned to run a test which means that I have to remote connect every time to keep the test running and I have over 3000 tests. The -DforkMode=never never takes effect and is overridden with what is the in the pom. Is this the right behavior? What can I do to have the remote debugger reconnect even if the jvm forks?
 
Bartender
Posts: 20770
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if I read that correctly, but anything that spawns multiple JVM instances has a problem.

The remote debugger is built into the JVM and the debug client (Eclipse, IntelliJ, jdb, or whatever) connects to it via a TCP/IP port. Since only one process can listen on any given TCP/IP port, each JVM instance would require its own port number and the debug client would have to establish a separate session for each of them. For 3000 concurrent JVMs, that would be 3000 ports and 3000 debug sessions. athough IIRC, Maven throttles that to many fewer JVMs than 3000 running concurrently.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this might be relevant here http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html depending on the version of Maven surefire plugin in use.
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!