aboutsummaryrefslogtreecommitdiff
path: root/src/IvyClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/IvyClient.java')
-rwxr-xr-xsrc/IvyClient.java33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/IvyClient.java b/src/IvyClient.java
index 4f46ca8..2c9b9ce 100755
--- a/src/IvyClient.java
+++ b/src/IvyClient.java
@@ -10,6 +10,17 @@
* created for each remote client.
*
* CHANGELOG:
+ * 1.2.8
+ * - no CheckRegexp anymore
+ * - synchronized(regexps) pour le match et le getParen():
+ * quoting http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html ,
+ * However, RE and RECompiler are not threadsafe (for efficiency reasons,
+ * and because requiring thread safety in this class is deemed to be a rare
+ * requirement), so you will need to construct a separate compiler or
+ * matcher object for each thread (unless you do thread synchronization
+ * yourself)
+ * - reintroduces bugs for multibus connexions. I can't fix a cross
+ * implementation bug.
* 1.2.6
* - major cleanup to handle simultaneous connections, e.g., between two
* busses within the same process ( AsyncAPI test is very stressful )
@@ -230,6 +241,8 @@ public class IvyClient implements Runnable {
* @since 1.2.4
*/
public boolean CheckRegexp( String exp ) {
+ return true;
+ /*
boolean ok = true;
if ( exp.startsWith( "^" )&&messages_classes!=null) {
ok=false;
@@ -238,6 +251,7 @@ public class IvyClient implements Runnable {
}
}
return ok;
+ */
}
///////////////////////////////////////////////////
@@ -257,13 +271,14 @@ public class IvyClient implements Runnable {
for (Enumeration e = regexps.keys();e.hasMoreElements();) {
Integer key = (Integer)e.nextElement();
RE regexp = (RE)regexps.get(key);
- // re.match fails sometimes when it is called concurrently ..
- // see 28412 on jakarta regexp bugzilla
synchronized (regexp) {
- if (!regexp.match(message)) continue; // no match
+ // re.match fails sometimes when it is called concurrently ..
+ // see 28412 on jakarta regexp bugzilla
+ if (regexp.match(message)) {
+ count++; // match
+ sendResult(Msg,key,regexp);
+ }
}
- count++; // match
- sendResult(Msg,key,regexp);
}
return count;
}
@@ -557,7 +572,13 @@ public class IvyClient implements Runnable {
private void sendBye(String message) {sendString(Bye,0,message);}
private void traceDebug(String s){
- if (debug) System.out.println("-->IvyClient["+clientKey+","+bus.getSerial()+"] "+bus.appName+" (remote "+appName+")<-- "+s);
+ String app="noname";
+ int serial=0;
+ if (bus!=null) {
+ serial=bus.getSerial();
+ app=bus.appName;
+ }
+ if (debug) System.out.println("-->IvyClient["+clientKey+","+serial+"] "+app+" (remote "+appName+")<-- "+s);
}
private void traceDebug(String[] tab){