| | |
| | | ECLWorkflowElement eclwe; |
| | | private static HashSet<Integer> localPorts = new HashSet<Integer>(); |
| | | |
| | | // used to synchronize the domain creation with the connect thread. |
| | | final private Object domainMonitor = new Object(); |
| | | |
| | | /** |
| | | * Creates a new Replication server using the provided configuration entry. |
| | | * |
| | |
| | | } |
| | | try |
| | | { |
| | | synchronized(domainMonitor) |
| | | { |
| | | domainMonitor.notifyAll(); |
| | | } |
| | | synchronized (this) |
| | | { |
| | | /* check if we are connected every second */ |
| | |
| | | { |
| | | replicationServerDomain = new ReplicationServerDomain(baseDn, this); |
| | | baseDNs.put(baseDn, replicationServerDomain); |
| | | synchronized (domainMonitor) |
| | | { |
| | | synchronized (this) |
| | | { |
| | | // kick up the connect thread so that this new domain |
| | | // gets connected to all the Replication Servers. |
| | | this.notify(); |
| | | } |
| | | try |
| | | { |
| | | // wait for the connect thread to signal that it finished its job |
| | | domainMonitor.wait(500); |
| | | } catch (InterruptedException e) |
| | | { |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |