<p>(boolean) Set to true if you wish the <code>ProxyConnection</code> class to use <code>String.equals</code> instead of
<code>==</code> when comparing method names. This property does not apply to added interceptors as those are configured individually.
The default value is <code>false</code>.
- </p>
+ </p>
+ </attribute>
</attributes>
</subsection>
</section>
this.next = next;
}
- public boolean compare(String methodName, Method method) {
+ public boolean compare(String name1, String name2) {
if (useEquals()) {
- return methodName.equals(method.getName());
+ return name1.equals(name2);
} else {
- return methodName==method.getName();
+ return name1==name2;
}
}
+ public boolean compare(String methodName, Method method) {
+ return compare(methodName, method.getName());
+ }
+
/**
* Gets called each time the connection is borrowed from the pool
* @param parent - the connection pool owning the connection
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- if (CLOSE_VAL==method.getName()) {
+ if (compare(CLOSE_VAL,method)) {
closeInvoked();
return super.invoke(proxy, method, args);
} else {
protected boolean process(String[] names, Method method, boolean process) {
for (int i=0; (!process) && i<names.length; i++) {
- process = (method.getName()==names[i]);
+ process = compare(names[i],method);
}
return process;
}
boolean read = false;\r
int index = -1;\r
for (int i=0; (!read) && i<readState.length; i++) {\r
- read = name==readState[i];\r
+ read = compare(name,readState[i]);\r
if (read) index = i;\r
}\r
boolean write = false;\r
for (int i=0; (!write) && (!read) && i<writeState.length; i++) {\r
- write = name==writeState[i];\r
+ write = compare(name,writeState[i]);\r
if (write) index = i;\r
}\r
Object result = null;\r