Hi Daniel,

Perhaps you should look at using proxies on your collections first (this
will require no refactoring, just add proxy="true" to your collection
descriptors) and then possible proxy your references (requires
interface) before looking at using dynamic proxies on all classes.  This
seems to be the concept that works well in many cases.

Wally

-----Original Message-----
From: Daniel Perry [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2003 8:56 AM
To: OJB Users List
Subject: Re: dynamic proxies (simple question)


Thanks for the reply.
While waiting for someone to respond, i thought i'd give the "one simple
interface" a quick go.... Sadly it doesnt work :)

Oh well, eclipses refactoring tools will come in handy!

A quick question regarding inherritance (assuming I[beanname] are
interfaces to bean properties): Job extends BaseBO. BaseBO implements
IBaseBO. IJob only interfaces the extra methods in Job over BaseBO.

OJB doesnt know about the inherritance (ie it knows nothing about
BaseBO). getId is only interfaced in IBaseBO.  Do i need to do anything
more? eg... Should IJob extend IBaseBO? Should Job implement IBaseBO?

Thanks,
Daniel.

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 10, 2003 2:33 PM
Subject: RE: dynamic proxies (simple question)


> Hello Daniel,
>
> > -----Original Message-----
> > From: Daniel Perry [mailto:[EMAIL PROTECTED]
>
> > So my solution would seem to be proxies.  The tutorial on dynamic 
> > proxies isn't too clear.  It says:
> >
> > "To use dynamic proxies the persistent class in question (in our 
> > case the Article class) must implement an interface (for example 
> > InterfaceArticle). This interface is needed to allow replacement of 
> > the proper Article object with a dynamic proxy implementing the same

> > interface."
> >
> > My question is: what must this interface provide?
>
> I agree that this above text is not clear about this.
>
> The answer is: the interface must provide all methods
> your application needs to invoke.  Typically these are
> all non-private methods of your BO.
>
> > Nearly all my BOs (all that i want to proxy) are subclasses the 
> > BaseBO bean (with two properties - deleted and id). Can i create an 
> > interface with just these two methods, or do
>
> If you try that and then change the types of all member variables to 
> that interface, the compiler will certainly complain.
>
> > i have to create an interface for each bean, with all methods in it?
>
> Yes, this is probably what you should do.
>
> Olli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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


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

Reply via email to