Hi, >>Perhaps you should look at using proxies on your collections first
This would be a nice idea, but the problem is, that if i am right about what is taking time, it is the updating of a set of objects. When a page is submitted, each of about 30 objects are loaded, updated, stored, and the cache cleared. The problem here is that each of these objects is referencing two objects, which will each cause the loading of hundreds of other objects. If i can proxy these two references, i think it will almost completely solve the problem on it's own. I think i understand proxying now, (the interface requirement makes a LOT of sense once you know what you've got to do and try to think why!) Thanks to everyone on this list for all your help, and patience. Daniel. ----- Original Message ----- From: "Gelhar, Wallace Joseph" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Monday, November 10, 2003 3:13 PM Subject: RE: dynamic proxies (simple question) 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]