"Armin Waibel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Sean,
Hello, Armin. > I'm nearly sure that OJB never starts new threads by its own. AFAIK only > the commons-DBCP api starts a new thread (if you enable it) to > monitor/manage the used connections (used in a ConnectionFactory > implementation, but per default OJB use it's own connection pool). I looked in the OJB.properties file and found the following... ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryP ooledImpl ...and the line with DBCP is commented out, so it doesn't look like DBCP is the culprit. > > > maintaining uses an opaque persistence framework that extends OJB; it > Do this framework use unchanged OJB sources? I can't know for sure, but I doubt it. The framework was licensed with the application that was produced by this consulting company (that is, the same company that produced this framework wrote a custom software application based on their framework). Having worked with their source code for the application, I don't think that they would be capable of that. I've been working on this problem off and on for about a week now; if anyone knows of a solution, please post it here. If I find the solution, I'll do the same. Thanks. > regards, > Armin > > Sean Dockery wrote: > > Unfortunately, I'm stuck on version 0.9.8. The application that I'm > > maintaining uses an opaque persistence framework that extends OJB; it > > creates classes explicitly which have disappeared between 0.9.8 and 1.0RC4. > > But because I'm using PB calls directly, I'm certain that this problem has > > nothing to do with the opaque persistence framework. (The value of this > > software company's persistence framework is dubious; I'll be glad when we > > can rid ourselves of it.) > > > > "Antonio Gallardo" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>Hi Sean: > >> > >>AFAIK, this would not happen. BTW, what version are you using? > >> > >>Best Regards, > >> > >>Antonio Gallardo > >> > >>Sean Dockery dijo: > >> > >>>Hello there. > >>> > >>>I've had a curious experience recently with OJB, and I was wondering if > >>>someone could confirm my speculations about the behaviour. > >>> > >>>Suppose I have two objects... Product and ProductCategory. The > > > > Product > > > >>>object carries both a productCategoryId field as well as a reference > > > > field > > > >>>productCategory which is declared as auto-retrieve in my class > > > > descriptor. > > > >>>Consider the following code segment... > >>> > >>> Transaction tx = implementation.newTransaction(); > >>> tx.begin(); > >>> PersistenceBroker broker = ((HasBroker) tx).getBroker(); > >>> Product template = new Product(); > >>> template.setId(productId); > >>> Identity identity = new Identity(template, broker); > >>> Product result = (Product) broker.getObjectByIdentity(identity); > >>> tx.commit(); > >>> > >>> // Thread.sleep(50); > >>> > >>> System.out.println(result.getProductCategory().getName()); > >>> > >>>Curiously, I sometimes experience a null pointer exception because > >>>result.getProductCategory() return null. When I uncomment the > >>>Threat.sleep() call, the null pointer exception never happens. > >>> > >>>This seems to suggest that the productCategory reference is being > > > > loaded > > > >>>by > >>>another thread. Is this the case or can someone explain why > >>>Product.getProductCategory returns null for me sometimes when I first > >>>retrieve the Product object? > >>> > >>>Thanks for your time... > > > > > > > > > > > > --------------------------------------------------------------------- > > 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]
