Subject Re: [Firebird-Java] FBResultSet proxy class on JBoss
Author Roman Rokytskyy
> I've noticed that sometimes I get back
> org.firebirdsql.jdbc.FBResultSet and sometimes I get $Proxy181
> (which obviously implements java.sql.ResultSet) when executing a
> query on JBoss 3.2. Does anyone know what's going on, or where I
> would start looking for answers?
> The strange thing is that the class name is just $Proxy181, without
> any package name prepended.

Classes that start with $Proxy and have no package name are dynamic proxies
created with java.lang.reflect.Proxy class. See corresponding documentation
for more information. In particular I use dynamic proxies in JayBird pool
code. In fact java.sql.Connection, java.sql.Statement,
java.sql.PreparedStatement and java.sql.ResultSet instances that are
returned to client are usually dynamic proxies, and not org.firebird.jdbc.*
classes. This also means that you cannot cast to the implementation class,
but only to the interface (either java.sql.* or
org.firebirdsql.jdbc.FirebirdXXX interfaces).