Re: standalone getDefaultBroker auto-retrieve

2006-04-28 Thread Bruno CROS
Hi Armin, The detection mechanism works, but i have a strange behaviour, i collected some open-broker detections. So i had a look into code, and i saw my close call in a finally clause. this is correct. So, i don't doubt about "java" finally, but the implementation of my closeBroker method. In

Re: standalone getDefaultBroker auto-retrieve

2006-04-28 Thread Bruno CROS
Yep. I did something like... with an immediate catched exception!! it works... I add a method into PersistenceBrokerFactory to artificially fire all the finalize methods. This method call releaseAllInstances and System.gc(). then Finalize are all fired. It works well. Will release 1.0.5 come out

Re: standalone getDefaultBroker auto-retrieve

2006-04-27 Thread Armin Waibel
Hi Bruno, below you can find #setClosed(...) and #finalize() of the modified PB source (will check in this in a few days). regards, Armin /** * A stack trace of this broker user. * Used when broker leak detection is enabled. */ protected String brokerStackTrace; public void setClosed(bool

Re: standalone getDefaultBroker auto-retrieve

2006-04-25 Thread Bruno CROS
Hi Armin, thanks for solution , but i'm not sure i did get it all !! Can you confirm solution? Well, i understand i have to override setCLosed method to catch when broker open (is borrowed), throw an exception to save a stacktrace with a catch. So , PB remembers his last loan. that's it ? When f

Re: standalone getDefaultBroker auto-retrieve

2006-04-25 Thread Armin Waibel
Bruno CROS wrote: using proxies ? Oh, i see now. Proxy opens and closes broker well. that's it ? I didn't think to that. Tsss... I'm sorry. It seems that i'm looking for my lost brokers since too much time ago. I guess i'm going to check all my DAOs and all my transactions again (or may be

Re: standalone getDefaultBroker auto-retrieve

2006-04-25 Thread Bruno CROS
using proxies ? Oh, i see now. Proxy opens and closes broker well. that's it ? I didn't think to that. Tsss... I'm sorry. It seems that i'm looking for my lost brokers since too much time ago. I guess i'm going to check all my DAOs and all my transactions again (or may be someone else now ;-)

Re: standalone getDefaultBroker auto-retrieve

2006-04-25 Thread Armin Waibel
Hi Bruno, Bruno CROS wrote: Hi Armin, Here's is a schematic example : Consider a service method that returns an object "ProductBean". ProductBean is not O/R mapped but the reading calls a second method that read O/R mapped Product object. Then, relations are followed, to find description of h

Re: standalone getDefaultBroker auto-retrieve

2006-04-24 Thread Bruno CROS
Hi Armin, Here's is a schematic example : Consider a service method that returns an object "ProductBean". ProductBean is not O/R mapped but the reading calls a second method that read O/R mapped Product object. Then, relations are followed, to find description of his Category (Consider that a pr

Re: standalone getDefaultBroker auto-retrieve

2006-04-24 Thread Armin Waibel
Hi Bruno, Bruno CROS wrote: Hi, It seems that read objects with a broker, can read related objects by auto-retrieve set to "true" despite broker is closed. I can't see what you mean. When OJB materialize an object with related objects and auto-retrieve is 'true', the full materialized objec

standalone getDefaultBroker auto-retrieve

2006-04-24 Thread Bruno CROS
Hi, It seems that read objects with a broker, can read related objects by auto-retrieve set to "true" despite broker is closed. I suppose that a getDefaultBroker is done, and the borrowed broker is never closed (because no reference on it). Note : This occurred because, application has been writt