Author: shawkins
Date: 2010-09-21 13:39:11 -0400 (Tue, 21 Sep 2010)
New Revision: 2593
Modified:
branches/7.1.x/client/src/main/java/org/teiid/adminapi/AdminFactory.java
Log:
TEIID-1270 fixing the proxy so that object methods don't get forwarded
Modified: branches/7.1.x/client/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/adminapi/AdminFactory.java 2010-09-20
19:54:38 UTC (rev 2592)
+++ branches/7.1.x/client/src/main/java/org/teiid/adminapi/AdminFactory.java 2010-09-21
17:39:11 UTC (rev 2593)
@@ -53,11 +53,9 @@
private Admin target;
private ServerConnection registry;
- private Properties p;
private boolean closed;
public AdminProxy(Properties p) throws ConnectionException, CommunicationException
{
- this.p = p;
this.registry = serverConnectionFactory.getConnection(p);
this.target = registry.getService(Admin.class);
}
@@ -76,6 +74,9 @@
close();
return null;
}
+ if (!method.getDeclaringClass().equals(Admin.class)) {
+ return method.invoke(this, args);
+ }
try {
return method.invoke(getTarget(), args);
} catch (InvocationTargetException e) {