Return-Path: Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 94959 invoked from network); 25 Feb 2003 19:37:37 -0000 Received: from unknown (HELO eng.werken.com) (66.216.68.111) by daedalus.apache.org with SMTP; 25 Feb 2003 19:37:37 -0000 Received: from eng.werken.com (localhost [127.0.0.1]) by eng.werken.com (8.11.6/8.11.6) with ESMTP id h1PKiSL10954; Tue, 25 Feb 2003 14:44:28 -0600 Message-ID: <2136584.1046205868187.JavaMail.jmcnally@localhost> Date: Tue, 25 Feb 2003 14:44:28 -0600 (CST) From: Thomas Mahler Reply-To: Scarab Admistrator To: Thomas Mahler Subject: [OJB] Issue #OJB134 - user defined proxy objects Cc: "ojb-dev@db.apache.org" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N You can view the issue detail at the following URL: Type : Feature Issue Id : OJB134 Reported by: Thomas Mahler thma - (thomas.mahler@home.ins.de) Details: Summary: user defined proxy objects Description: Hi Maarten, AFAIK this is not possible today. But I think it's a feature request that could be beneficial for several users. I also believe that is not that difficult to implement. It won't make it into 1.0, but we can place it on the post 1.0 roadmap. For the time being you could try to use instance call-backs and use the onLoad callback to fill reference and collections attributes with your proxy objects. cheers, Thomas Maarten Coene wrote: Hi, I have a couple of questions about the proxies. 1. I want to use dynamic proxies, but these proxies may not use the PersistenceBroker for querying the database. Instead, they must get the real object through an API I defined myself. The idea is to return object from my object model to clients, but these clients cannot access the database directly, they must use a specific component. This means that if I return proxies, these proxies must also use that component. More concrete: the dynamic proxy wil do something like this to retrieve the object: if (realObject == null) { realObject = broker.getObjectByIdentity(id); } But I want this to be: if (realObject == null) { realObject = myComponent.getObject(id); } Is it possible to do this with dynamic proxies? I know I can define my own proxy for each class from the object model, but using dynamic proxies would save me a lot of work. 2. If the above problem is not possible with dynamic proxies, is it possible to define my own proxy-class for proxy for a reference? It looks to me that the reference-descriptor element only allows the use of dynamic proxies for this purpose? I want to do something like this: Status: New Resolution: Later Priority: Medium Vote: Medium