Subject RE: [Firebird-Java] FBResultSet proxy class on JBoss
Author Rick DeBay
OK, so I'll have to handle getting more than one concrete ResultSet
I have that as a TODO already, but right now it just logs a message.
I'd forgotten about the Proxy class, I'll have to start using it.

Thanks, Rick DeBay

-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Wednesday, December 22, 2004 4:37 PM
Subject: Re: [Firebird-Java] FBResultSet proxy class on JBoss

> 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
created with java.lang.reflect.Proxy class. See corresponding
for more information. In particular I use dynamic proxies in JayBird
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
classes. This also means that you cannot cast to the implementation
but only to the interface (either java.sql.* or
org.firebirdsql.jdbc.FirebirdXXX interfaces).


Yahoo! Groups Links