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:

<reference-descriptor
         name="productGroup"
         class-ref="org.apache.ojb.broker.ProductGroup"
         proxy="true"
         proxy-class="com.MyProxy" >




regards,
Maarten Coene




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to