Re: How to shutdown OJB when stopping web context.

2005-03-24 Thread Danilo Tommasina
Hi, we use following two calls to shut it down // Release all persistence broker instances PersistenceBrokerFactory.releaseAllInstances(); // Release all pooled db connections ConnectionFactoryFactory.getInstance().createConnectionFactory().releaseAllResources(); however it could be that

Re: How to shutdown OJB when stopping web context.

2005-03-24 Thread Martin Kalén
Greetings all, first off - all the different hints of how not to leave open connections at webapp shutdown (ie using DBCP in Tomcat and supply JNDI DataSource to OJB, or explicitly calling release methods in OJB at shutdown) are equally good ways of doing. Danilo Tommasina wrote: however it

RE: How to shutdown OJB when stopping web context.

2005-03-24 Thread Nathan Smith
Thanks for all your very useful replys. We do all closing of resources in the destroy() method of our setup servlet. We use the ConnectionFactoryPooledImpl so releasing of the resources used should work fine. I would have like to have used the ConnectionFactoryDBCPImpl as that is what is used

RE: Problem retrieving collection.

2005-03-24 Thread Lemke, Wesley
Is my assumption wrong? In this case: reference-descriptor name=clientRelationship class-ref=model.client.ClientRelationship foreignkey field-ref=objectId/ /reference-descriptor Isn't objectId supposed to be the primary key field of model.client.ClientRelationship?

Re: Problem retrieving collection.

2005-03-24 Thread Armin Waibel
Hi Wes, Is my assumption wrong? In this case: reference-descriptor name=clientRelationship class-ref=model.client.ClientRelationship foreignkey field-ref=objectId/ /reference-descriptor Isn't objectId supposed to be the primary key field of model.client.ClientRelationship?

RE: Problem retrieving collection.

2005-03-24 Thread Gelhar, Wallace Joseph
No. OJB currently only joins on the related object primary key (which it already knows from the mapping), so what is needed is the foreign key field in NewClientGroup that relates to ClientRelationship. Remember that in Reference or Collection Descriptors it is always looking for the foreign

RE: Problem retrieving collection.

2005-03-24 Thread Lemke, Wesley
No problem. I think this is everything needed: package model; // All persistent Object extend this class, the unique object ID // is from this class along with some other fields public class AdmObject implements Serializable{ private int objectId = -1; // A few other

Re: Problem retrieving collection.

2005-03-24 Thread Armin Waibel
Hi Wes, comments see below Lemke, Wesley wrote: No problem. I think this is everything needed: package model; // All persistent Object extend this class, the unique object ID // is from this class along with some other fields public class AdmObject implements Serializable{

RE: Problem retrieving collection.

2005-03-24 Thread Lemke, Wesley
I added the (int) clientRelationshipId to NewClientGroup and removed the access=anonymous from the field-descriptor. I am still getting the same error. -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Thursday, March 24, 2005 9:04 AM To: OJB Users List Subject: Re:

Re: How to shutdown OJB when stopping web context.

2005-03-24 Thread Martin Kaln
Nathan Smith wrote: I cannot quite remember what the problem was, but it had something to with Iterators not returning all objects or Collections being returned containing no objects, but thats better left for another time at the moment. Aha, this smells like objects of class OJBIterator returned

Re: Problem retrieving collection.

2005-03-24 Thread Armin Waibel
Lemke, Wesley wrote: I added the (int) clientRelationshipId to NewClientGroup and removed the access=anonymous from the field-descriptor. I am still getting the same error. Damned! What a nasty problem ;-) The error message seems to be clear Error 500: Server caught unhandled exception from

Re: Problem retrieving collection.

2005-03-24 Thread Armin Waibel
forget my previous post, the error message isn't clear. Why does OJB lookup 'clientRelationshipId' in class 'ClientRelationship' instead of 'NewClientGroup'? Could you post the whole stack trace? Armin Armin Waibel wrote: Lemke, Wesley wrote: I added the (int) clientRelationshipId to

null child object references

2005-03-24 Thread Laran Evans
I have a ParentObject which owns a ChildObject. The ChildObject is not null, but contains all null fields. The constructor of the ParentObject creates a ChildObject which is not null, but contains all null fields. When OJB loads ParentObject, it calls the default constructor which creates a

RE: Problem retrieving collection.

2005-03-24 Thread Lemke, Wesley
Hehe, that was my originally question when I changed it from objectId to clientRelationshipId :) Here is the entire stack trace: [3/24/05 9:08:43:844 CST] 1985c96 SystemOut O [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG: SQL:SELECT A0.agr_approver,A0.client_id FROM

Re: Problem retrieving collection.

2005-03-24 Thread Armin Waibel
Lemke, Wesley wrote: Hehe, that was my originally question when I changed it from objectId to clientRelationshipId :) I run a test case with same mapping (1:n with 1:1 back-reference and shared FK) with latest from OJB_1_0_RELEASE branch. The test pass without problems. Maybe the problem is the

RE: Problem retrieving collection.

2005-03-24 Thread Lemke, Wesley
That worked Armin, thanks! One question though, those mappings were correct, and should work, right? Will it hurt anything to not have them in there? I created a Junit Test. It works with those mappings removed, but fails when the lines are there. Would you like me to send it to you?

Re: Problem retrieving collection.

2005-03-24 Thread Armin Waibel
Lemke, Wesley wrote: That worked Armin, thanks! puh! This is a good news. One question though, those mappings were correct, and should work, right? In impulse, yep it should work. But there can be a problem with inheritance and the use of SequenceManagerNativeImpl, because this SM is not

status on 1.02 release?

2005-03-24 Thread Ryan Vanderwerf
Just checking if anyone knows the target date for 1.02? I am looking to upgrade but am afraid of the cache problem in 1.01. Ryan

Re: status on 1.02 release?

2005-03-24 Thread Armin Waibel
Ryan Vanderwerf wrote: Just checking if anyone knows the target date for 1.02? I am looking to upgrade but am afraid of the cache problem in 1.01. Last mail from Brian announce the release for today or tomorrow (when he has a change to build the release). regards, Armin Ryan

Re: status on 1.02 release?

2005-03-24 Thread Robert S. Sfeir
Brian is working on the release as we speak. R On Mar 24, 2005, at 12:08 PM, Ryan Vanderwerf wrote: Just checking if anyone knows the target date for 1.02? I am looking to upgrade but am afraid of the cache problem in 1.01. Ryan !DSPAM:42434831247681776579306! Robert S. Sfeir

Re: status on 1.02 release?

2005-03-24 Thread Brian McCallister
Am pushing it tonight. Won't announce until tomorrow night though so that it can mirror out first =) -Brian On Mar 24, 2005, at 12:08 PM, Ryan Vanderwerf wrote: Just checking if anyone knows the target date for 1.02? I am looking to upgrade but am afraid of the cache problem in 1.01. Ryan