db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leandro Rodrigo Saad Cruz <lean...@ibnetwork.com.br>
Subject PersistentFields per class descriptors. was [RFC] Using java.lang.reflect.Proxy
Date Sun, 14 Mar 2004 22:00:47 GMT
Sorry. It's working (see DescriptorRepository.discoverDescriptor(Class
clazz) )

What do you thing about using PersistentFieldClass per class descriptors
? That would make the use (access to values) of Dynamic Proxies easier.

For class-descriptors that relate to Dynamic Proxies we could configure
a different PersistentFieldClass, otherwise we could use the
configuration on OJB.properties.

On Fri, 2004-03-12 at 18:10, Thomas Dudziak wrote:
> 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
-- 
Leandro Rodrigo Saad Cruz
InterBusiness Tecnologia e Servi├žos
IB    - www.ibnetwork.com.br
DB    - www.digitalbrand.com.br
OJB   - db.apache.org/ojb
XINGU - xingu.sf.net


---------------------------------------------------------------------
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