db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <to...@first.gmd.de>
Subject Re: [RFC] Using java.lang.reflect.Proxy
Date Fri, 12 Mar 2004 21:10:12 GMT
On Fri, 12 Mar 2004, Leandro Rodrigo Saad Cruz wrote:

> I'm trying to make java.lang.reflect.Proxy objects work with OJB, but I
> can't , since Proxy.getClass() returns "$Proxy" (and its final) and OJB
> makes heavy use of ref.getClass() or Class parameters. 
> 
> I'd like to know what you think about a (huge) change on ojb codebase to
> handle cases like this. Most of the places that expect a Class ref would
> have to change that to String.
> 
> Please, I'm trying to change ojb just to fit my needs. 
> If you don't think this is something that OJB should support please let
> me know. And I'll think about other solution.

I recently changed proxy handling and class-descriptor handling to do
exactly that: all proxy-stuff within OJB specifically checks for OJB
proxies (via ProxyHelper: invocation handler is class IndirectionHandler),
and the method that determines a class descriptor for a given object not
only uses getClass but also getInterfaces (which is necessary for working
with proxies). Ad a side effect one can now also specify class descriptors
for interfaces (using factory-class/-method for creating actual
objects).
I also have one app using this feature, though not with 
collections/references.

So, could you please specify what is not working ?

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message