Re: MySQL communication link failure

2005-04-28 Thread Martin Kalén
Stijn de Witt wrote: We have developed a web application using OJB. All seems to work fine, but after some hours of being deployed we run into a problem. snip/ java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1394) snip/ I have seen a number of solutions mentioned: 1)

TwoLevelCache enhancement proposal

2005-04-28 Thread David . WIESZTAL
Armin, I discovered that the default implementation of the CopyStrategy.read method re-build the object based on the hashmap stored in the cache implementation. That's cool, but the problem is the following: When an object is retrieved from the cache, and you try to get one of its reference or

Re: lazy materialization problem

2005-04-28 Thread Martin Kalén
Maksimenko Alexander wrote: I have tree like structure (with parent,children relationships). I'm using proxies to lazy materialize them. Everything works well but in particular cases I have to materialize the whole tree because folder.getChildren().get(0).getParent() is not the same as folder

Re: 1-1 Relationship Both ways

2005-04-28 Thread Martin Kalén
Lemke, Wesley wrote: Our problem occurs when we save a GenericGroup. It will first save the ClientBillingInfo object, so it puts -1 in the generic_grp_id field of the client_billing table (We are using database generated keys). If I understand you correctly, your problem is that your DB will set

Re: TwoLevelCache enhancement proposal

2005-04-28 Thread Armin Waibel
Hi David, [EMAIL PROTECTED] wrote: Armin, I discovered that the default implementation of the CopyStrategy.read method re-build the object based on the hashmap stored in the cache implementation. That's cool, but the problem is the following: When an object is retrieved from the cache, and you try

Re: MetadataManager.copyOfGlobalRepository problem

2005-04-28 Thread Martin Kalén
Stas Ostapenko wrote: org.apache.commons.lang.SerializationException: java.lang.ClassNotFoundException : Domain So, java.lang.ClassNotFoundException occurs. But Domain.class is in the same directory with test_copyOfGlobalRepository. class ! At

Re: Proxy, Prefetching, Memory Usage

2005-04-28 Thread Martin Kalén
Jakob Braeuchi wrote: i just comitted a patch (OJB 1.1) to solve this problem. please have a look at it. FYI: the setFetchSize hint is available in OJB_1_0_RELEASE branch (as beta-status, with refactoring warning!) waiting to be merged with the trunk. Whenever I get a free timeslot I will look

Re: Problems with collections in ODMG - just upgraded to OJB 1.0.3

2005-04-28 Thread Martin Kalén
[EMAIL PROTECTED] wrote: I've always (in OJB ODMG) used cascading delete bounded by appropriate auto-delete settings; now it looks as if I have no choice but to delete each individual object by hand. True? Setting the cascading delete settings by relationship type (1:1, 1:n, m:n) seems

Re: 1-1 Relationship Both ways

2005-04-28 Thread Armin Waibel
Hi Wes, Lemke, Wesley wrote: We have a 1-1 Relationship between GenericGroup and ClientBillingInfo. We have the client_billing_id in the generic_group table and the generic_grp_id in the client_billing table, because we need to traverse this relationship in both directions. Our problem occurs when

Re: Problems with collections in ODMG - just upgraded to OJB 1.0.3

2005-04-28 Thread Armin Waibel
Hi Steve, [EMAIL PROTECTED] wrote: Now I remember why I'm always hesitant to upgrade OJB - it seems like there is some fundamental change to how things work. we made a complete refactoring of the odmg implementation in 1.0.2/3, because of the many known issues in OJB =1.0.1 (see release-notes

Re: lazy materialization problem

2005-04-28 Thread Maksimenko Alexander
Martin Kalén wrote: Maksimenko Alexander wrote: I have tree like structure (with parent,children relationships). I'm using proxies to lazy materialize them. Everything works well but in particular cases I have to materialize the whole tree because folder.getChildren().get(0).getParent() is not

RE: 1-1 Relationship Both ways

2005-04-28 Thread Lemke, Wesley
Thanks. I did use an after insert type solution to update the field. -Original Message- From: Martin Kalén [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 3:56 AM To: OJB Users List Subject: Re: 1-1 Relationship Both ways Lemke, Wesley wrote: Our problem occurs when we save

trouble w/ extents

2005-04-28 Thread Bobby Lawrence
Hello - I am having some difficulty with extents - something that OJB should handle nicely. I have a Project class persisted in a table called PROJECTS. I have a Person class persisted in a table called PEOPLE. I have a PrimaryInvestigator class that extends Person. The PrimaryInvestigator class

Re: MetadataManager.copyOfGlobalRepository problem

2005-04-28 Thread Stas Ostapenko
Hi ! Are you sure that Domain.class contains no package declaration in Java? (As Armin already pointed out.) Yes. here is Domain.java public class Domain { public Integer Id; public Integer Status; public String Domain; public String Comment; public Domain(Integer Id,Integer Status,String

Re: MetadataManager.copyOfGlobalRepository problem

2005-04-28 Thread Armin Waibel
Hi, strange! Could you do another test to check common-lang serialization util: Domain d = new Domain(); Object result = SerializationUtils.clone(d) This call was used by MetadataManager. regards, Arnin Stas Ostapenko wrote: Hi ! Are you sure that Domain.class contains no package declaration in

RE: lazy materialization problem

2005-04-28 Thread Clute, Andrew
What version of OJB are you using (1.0, 1.0.2?), and which type of cache are you using? (ObjectCacheTwoLevel, ObjectCacheDefaultImpl)? The issue stems from the fact that your proxy collection is being materialized with 1) a different PersistneceBroker instance then the parent object, and 2)

RE: Which Object Cache am I using?

2005-04-28 Thread Lemke, Wesley
I got the configuration right, so OJB is now using oscache, but OJB is still updating objects that haven't changed. In my test I create a new object, persist it, sleep for 5 seconds, and then persist it again. The first store does an insert, and the second store does an update. We have a

Re: Problems with collections in ODMG - just upgraded to OJB 1.0.3

2005-04-28 Thread Steve_Clark
Martin Armin, Thanks for the responses. Some more info: - The collection in question is a non-decomposed m:n. - There actually are two collections which exhibit this problem; in one case the child pk is an int, and in the other it's a String. The keys are not null or 0 (the child being

Re: trouble w/ extents

2005-04-28 Thread Armin Waibel
Hi Bobby, Bobby Lawrence wrote: Hello - I am having some difficulty with extents - something that OJB should handle nicely. I have a Project class persisted in a table called PROJECTS. I have a Person class persisted in a table called PEOPLE. I have a PrimaryInvestigator class that extends

Re: MetadataManager.copyOfGlobalRepository problem

2005-04-28 Thread Stas Ostapenko
So, here is new code public class Domain implements java.io.Serializable { public Integer Id; public Integer Status; public String Domain; public String Comment; public Domain(){}; public Domain(Integer Id,Integer Status,String Domain,String Comment) { this.Id = Id; this.Status = Status;

RE: Which Object Cache am I using?

2005-04-28 Thread Lemke, Wesley
We are using PB-api. I guess that is what happens when you assume :) Thanks Armin. -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 10:52 AM To: OJB Users List Subject: Re: Which Object Cache am I using? Hi Wes, which API do you use? The

Re: Problems with collections in ODMG - just upgraded to OJB 1.0.3

2005-04-28 Thread Steve_Clark
Three more things: 1) I have ImplicitLocking turned off 2) My pseudocode is wrong: Actually, the parent object is created in a different transaction. So it's like this: tx = odmg.newTransaction(); profile = new FieldOfficeProfileImpl(); database.makePersistent(profile);

Re: trouble w/ extents

2005-04-28 Thread Bobby Lawrence
Armin - What is the extends attribute of a class-descriptor for? There is no documentation for this... Armin Waibel wrote: Hi Bobby, Bobby Lawrence wrote: Hello - I am having some difficulty with extents - something that OJB should handle nicely. I have a Project class persisted in a table called

Re: trouble w/ extents

2005-04-28 Thread Armin Waibel
Bobby Lawrence wrote: Armin - What is the extends attribute of a class-descriptor for? There is no documentation for this... this attribute isn't used by OJB (I think this was added by a committer some years ago, but never worked AFAIK). regards Armin Armin Waibel wrote: Hi Bobby, Bobby Lawrence

Re: Problems with collections in ODMG - just upgraded to OJB 1.0.3

2005-04-28 Thread Armin Waibel
[EMAIL PROTECTED] wrote: Three more things: 1) I have ImplicitLocking turned off 2) My pseudocode is wrong: Actually, the parent object is created in a different transaction. So it's like this: tx = odmg.newTransaction(); profile = new FieldOfficeProfileImpl();

Mapping 2 or more all classes on the same table

2005-04-28 Thread Ramakrishna Reddy
Hi, Do we have proper calssDecriminator (Mapping the all classes on the same table.) mechanism without side effects in OJB, on the same lies of Hibernate? In the documentation is it just mentioned, but not sufficient details and examples are gives on that Regards, Ramki

Re: Problems with collections in ODMG - just upgraded to OJB 1.0.3

2005-04-28 Thread Steve_Clark
Sigh. Is it still Monday? I'll get it right eventually. Here is what is (was) actually being done: tx = odmg.newTransaction(); tx.begin(); profile = new FieldOfficeProfileImpl(); database.makePersistent(profile); tx.commit(); tx = odmg.newTransaction();

Re: Mapping 2 or more all classes on the same table

2005-04-28 Thread Thomas Mahler
Dear Ramakrishna, We had this feature since 2001! Please note that OJB is not based on lies ! for details refer to the documentation under http://db.apache.org/ojb/docu/guides/advanced-technique.html#Mapping+All+Classes+on+the+Same+Table cheers, Thomas Ramakrishna Reddy wrote: Hi, Do we have

Re: Problems with collections in ODMG - just upgraded to OJB 1.0.3

2005-04-28 Thread Armin Waibel
[EMAIL PROTECTED] wrote: Sorry for so much volume, but I spoke too soon. The only thing that changes when I add tx.lock(county, tx.WRITE) is that it does an update instead of an insert. In fact, it does this even if I request a READ lock. So, in summary, this code: tx =

Re: MetadataManager.copyOfGlobalRepository problem

2005-04-28 Thread Martin Kalén
Stas Ostapenko wrote: So, here is new code public class Domain implements java.io.Serializable SerializationUtils needs Serializable classes by contract, this should probably be better documented. Any suggestions as to where in the docs/config files you would first look for this? (So we could