I want a barrier with a dynamic number of parties in java. I came across Phaser, but this solution is for java 7 which I unfortunately cannot use.
Is there some solution for java 6. How should I satisfy the need for having a barrier with a variable number of waiters ?
You really want to use a Phaser. There is a backport for Phaser that you can use in Java 6. Download it from JSR 166y backport