Re: OJB & weblogic problem - No record found

2003-10-30 Thread Alen Tan
Hi, That's ok. Thanks for the help Armin Waibel wrote: Hi Alen, I can't speak for weblogic server (I don't use it), but we have a similar redeploy problems with jboss (ok, we got a exception after redeploy) until we deploy the whole ejb-examples with all ojb.jars + config files + libraries in a

Re: o/r mapping question

2003-10-30 Thread Brian McCallister
Solution 1: Implement AddressGroup as a custom collection (implementing Manageable Collection) used to hold the address instances. This muddies the domain model a bit as AddressGroup then needs to know about ManageableCollection. Solution 2: Map two classes to the same table (I used an exist

Re: Collection in superclass not saving correctly

2003-10-30 Thread Armin Waibel
Hi again, Plummer, Greg wrote: Hi Armim, Thanks for the quick reply. batch-mode is false. Here's my DB definition: ==> typo? platform="db2" jdbc-level="1.0" driver="COM.ibm.db2.jdbc.app.DB2Driver" protocol="jdbc" subprotocol="db2" dbalias="DB2T

RE: o/r mapping question

2003-10-30 Thread Lance Eason
Sound like AddressGroup is a collection of addresses. Through the 'collection-class' attribute on collection descriptors you can specify your own implementation of the collection class to use for a particular relationship. I think it needs to implement Collection, but other than that it seems

native db inheritance

2003-10-30 Thread Gunnar Hilling
Hello, and now for something completely different: are there any plans to support the native inheritance feature of e.g. postgres for mapping of object hierarchies? Is there any O/R-Mapper that supports this feature? Are there special reasons not to work this way? Thanks -Gunnar

o/r mapping question

2003-10-30 Thread Robert J Celestino
Hello all, I am stumped by what is posibly a very simple mapping problem. Consider something like this Person is stored in the person table Person has-a AddressGroup. AddressGroup is not stored in the DB AddressGroup has a list of Addresses Address is stored in th

RE: Collection in superclass not saving correctly

2003-10-30 Thread Plummer, Greg
Hi Armim, Thanks for the quick reply. batch-mode is false. Here's my DB definition: By the way, I'm using the PersistenceManager directly, not JDO or ODMG. One more thing to note, when instances of ClientPayrollDeductionPlan have a value of 0 for the planId field

Re: metadata changes

2003-10-30 Thread Armin Waibel
Hi, sorry for the late reply (forget to reply). It's a very detailed description, but anyway I'm a little confused. So could you please post the relevant code? When DescriptorRepository profile is set, when perThreadChanges are enabled, ... regards, Armin C.K, Shibin (Cognizant) wrote: Hi,

Re: Collection in superclass not saving correctly

2003-10-30 Thread Armin Waibel
Hi Greg, assume you are using SequenceManagerNativeImpl (or SequenceManagerMySQLImpl). The '-1' value is a temporary used id. Normally OJB creating and handling id's before an object was written to DB. When using identity columns the id can only be read after the object was stored to DB. hmm, do y

Collection in superclass not saving correctly

2003-10-30 Thread Plummer, Greg
Hi All, I have a superclass, PayrollDeductionPlan, that contains a collection of PayPlanAssociation objects. The foreign key in the PayPlanAssociation table that points back to the PayrollDeductionPlan table is not getting stored correctly. See the snapshots of the tables below, don't know where t

Re: implementations of ObjectCache

2003-10-30 Thread Armin Waibel
Hi Marcello, Marcello Zaniboni wrote: Hi. I am exploring the implementations of ObjectCache. Where can I find documents about ObjectCacheJCSImpl, ObjectCachePerClassImpl, ObjectCacheUnlimitedImpl, etc.? In the javadoc I do not find enough information Try latest from CVS to get the refactored

Re: DListImpl

2003-10-30 Thread Armin Waibel
Hi again, sorry I don't have much experience in using odmg-api (I'm not a real-life hardcore odmg-user), so I can't give any recommendation :-( regards, Armin Gunnar Hilling wrote: Thanks for your answer. One additional question: Is it definitely correct to use DList as Collection-Class in my Bu

Re: DListImpl

2003-10-30 Thread Gunnar Hilling
Thanks for your answer. One additional question: Is it definitely correct to use DList as Collection-Class in my Business-Objects? In my current Setup, I use DLists (DListImpl_2), default settings for auto-x (as recommended), no refresh, adding bidirectional references manually. Is this sane? Rec

Re: DListImpl

2003-10-30 Thread Armin Waibel
Hi, Gunnar Hilling wrote: Hello! Simple Question: What is the difference between DListImpl and DListImpl_2? DListImpl_2 is a new DList implementation and should replace the old one sooner or later. The new implementation does better seperate the characteristics be a List and be a persistence cap

DListImpl

2003-10-30 Thread Gunnar Hilling
Hello! Simple Question: What is the difference between DListImpl and DListImpl_2? "DListImpl_2" seems to work faster for me. Are there any differences? Is it in Beta Stage? Which one should I use? Regards, -Gunnar - To unsubs

RE: Isolating Changes Until Transaction Commited

2003-10-30 Thread Shane Mingins
Hi Could someone please confirm that the following solution options are correct: 1. ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl but each user session must use a dedicated broker with its own local cache. Or 2. ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmp

Default values

2003-10-30 Thread Robert J Celestino
Hello All, I am wondering how to get ojb to respect default fields. (if it matters, I am using MySql and Weblogic). I have a table that has a field defined as non-nullable and with a default like so: SecurityUseType varchar(1) NOT NULL DEFAULT 'N' My domain class has a field of the s

Isolating Changes Until Transaction Commited

2003-10-30 Thread Shane Mingins
Hi How do I use OJB and ODMG to ensure that during an update transaction to an object: 1. Other threads can do a read of this object 2. The object returned from the read does not show any of the changed state from the update transaction until the update transaction has been committed. Thanks Sha

implementations of ObjectCache

2003-10-30 Thread Marcello Zaniboni
Hi. I am exploring the implementations of ObjectCache. Where can I find documents about ObjectCacheJCSImpl, ObjectCachePerClassImpl, ObjectCacheUnlimitedImpl, etc.? In the javadoc I do not find enough information Thanks, Marcello Zaniboni ---

help with auto-update and/or auto-delete

2003-10-30 Thread Andy Czerwonka
If I have a 1..n relationship in my object, eg: Car--->Parts and I do something like: Car car = new Car(); car.getParts().add(new Engine()); broker.store(car); I expect one record in my Car table and one in my Parts table. Perfect - that's what I have. Now, I do a: car.setParts(new ArrayList

Cache problem

2003-10-30 Thread Michael Scholz
Hello, i'm selecting an object and than i change this object and store it. The next selection with OJB provides me the unchanged object and the third selection always provides me the changed object. I tried to clear the cache of the broker, but this causes that every selection after the change

RE: problem/question with getIteratorByQuery()

2003-10-30 Thread Andy Czerwonka
You need it for the lazy instantiation via the iterator On Thu, 2003-10-30 at 09:06, [EMAIL PROTECTED] wrote: > > get rid of the transaction... why are you doing a > > broker.close() before > > you starting iterating? Not sure what you are trying to do. > > I'm doing a broker.close() to be sure

RE: problem/question with getIteratorByQuery()

2003-10-30 Thread Sylvain.Thevoz
> get rid of the transaction... why are you doing a > broker.close() before > you starting iterating? Not sure what you are trying to do. I'm doing a broker.close() to be sure to put the broker instance back to the connection pool. Sylvain -

store object[]

2003-10-30 Thread Rémi Bars
How do u store a m:n relation which looks like an array? when i try to do that i get the following error java.lang.ClassCastException at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Persistenc eBrokerImpl.java:785) at org.apache.ojb.broker.core.PersistenceBrokerImpl.store

Re: problem/question with getIteratorByQuery()

2003-10-30 Thread Andy Czerwonka
get rid of the transaction... why are you doing a broker.close() before you starting iterating? Not sure what you are trying to do. getIteratorByQuery() is a lazy version of getCollectionByQuery(). If does a count when creating the iterator and a select on each iter.next(). your code should loo

Re: PersistentFieldIntrospectorImpl

2003-10-30 Thread Armin Waibel
Hi again, Rémi Bars wrote: I'm not familiar with java.beans package. So what's wrong invoking "Method m = getPropertyDescriptor().getWriteMethod();" write method for the property to set the value? this method (getPropertyDescriptor().) don't see the parent's field. hmm, I don't understand

problem/question with getIteratorByQuery()

2003-10-30 Thread Sylvain.Thevoz
Hello, I have a question/problem about the function getIteratorByQuery(): Here is a code: code Iterator iter = null; try { broker = PersistenceBrokerFactory.defaultPersistenceBroker(); broker.beginTransaction(); iter = broker.getIteratorByQuery(query); broker.commitTransaction();

Re: PersistentFieldIntrospectorImpl

2003-10-30 Thread Rémi Bars
> I'm not familiar with java.beans package. > So what's wrong invoking > "Method m = getPropertyDescriptor().getWriteMethod();" > write method for the property to set the value? this method (getPropertyDescriptor().) don't see the parent's field. remi

Re: PersistentFieldIntrospectorImpl

2003-10-30 Thread Armin Waibel
Sorry, get your last post too late ;-) Armin Armin Waibel wrote: Hi, Rémi Bars wrote: Hi all, i don't understand the use of the PersistentFieldIntrospectorImpl class. in the OJB.properties i read: # - PersistentFieldIntrospectorImpl # uses JavaBeans compliant calls only to access persiste

Re: PersistentFieldIntrospectorImpl

2003-10-30 Thread Armin Waibel
Hi, Rémi Bars wrote: Hi all, i don't understand the use of the PersistentFieldIntrospectorImpl class. in the OJB.properties i read: # - PersistentFieldIntrospectorImpl # uses JavaBeans compliant calls only to access persistent attributes. # No Reflection is needed. But for each attribute x

Re: PersistentFieldIntrospectorImpl

2003-10-30 Thread Rémi Bars
ok it is in the doc tutorial3.htm sorry :) remi - Original Message - From: "Rémi Bars" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Thursday, October 30, 2003 3:34 PM Subject: PersistentFieldIntrospectorImpl > Hi all, > > i don't understand the use of the Per

PersistentFieldIntrospectorImpl

2003-10-30 Thread Rémi Bars
Hi all, i don't understand the use of the PersistentFieldIntrospectorImpl class. in the OJB.properties i read: # - PersistentFieldIntrospectorImpl # uses JavaBeans compliant calls only to access persistent attributes. # No Reflection is needed. But for each attribute xxx there must be # pu

Re: odmg/foreign key contraint fails

2003-10-30 Thread Gunnar Hilling
Hi Gerhard, At first I'd like to thank You for the hints! > Hi again, > > According to the docs, the auto-xy options should be left at their > defaults for ODMG to work correctly. I'm not sure how this really > affects things, but obviously something goes wrong with > auto-update=true. > > The

Re: odmg/foreign key contraint fails

2003-10-30 Thread Gunnar Hilling
OK, I solved *nearly* all of my problems (at least those related to OJB ;-). Now I persist "Zertifikat" with db.makePersistent() before adding "Option". Remaining problem: The collection of "Zertifikat" is empty *unless* the Object is loaded from the database. refresh="true" is set on the Collect

Re: odmg/foreign key contraint fails

2003-10-30 Thread Gerhard Grosse
Hi again, According to the docs, the auto-xy options should be left at their defaults for ODMG to work correctly. I'm not sure how this really affects things, but obviously something goes wrong with auto-update=true. The remaining problem is probably solved by doing both a zz.addOption(o1) *and*

Re: RE : problem between Broker and org.apache.commons(Borrow broker from pool failed)

2003-10-30 Thread Armin Waibel
Emmanuel Dupont wrote: Maybe you have reach the max number limit of connection borrowed. superfluous to say ... and don't forget to call broker.close() after using a PersistenceBroker instance. This will return pooled PB instance back to pool. regards, Armin In ojb.properties check the flag :

Re: odmg/foreign key contraint fails

2003-10-30 Thread Gunnar Hilling
By the Way: I'm using ManageableSet for my Collections (both) and ojb from cvs (maybe one week old). -Gunnar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: OJB & weblogic problem - No record found

2003-10-30 Thread Armin Waibel
Hi Alen, I can't speak for weblogic server (I don't use it), but we have a similar redeploy problems with jboss (ok, we got a exception after redeploy) until we deploy the whole ejb-examples with all ojb.jars + config files + libraries in a sar directory (jboss specific deployment format). Sorry,

RE : problem between Broker and org.apache.commons(Borrow broker from pool failed)

2003-10-30 Thread Emmanuel Dupont
Maybe you have reach the max number limit of connection borrowed. In ojb.properties check the flag : ConnectionFactoryClass, it seems you use the ConnectionFactoryPooledImpl And whenExhaustedAction=0 Isn't it ? -Message d'origine- De : Réda Benzair [mailto:[EMAIL PROTECTED] Envoyé :

Re: odmg/foreign key contraint fails

2003-10-30 Thread Gunnar Hilling
On Thu, 30 Oct 2003 08:58:33 +0100, Gerhard Grosse wrote: Hello Gerhard, Thanks for your Proposal. I think the problem is somewhere where you pointed out. But it't not exactly what you proposed. I think there is a problem whith "auto-update" and "auto-retrieve"- Options. If "Option" is auto-updat

RE: Simple performance improvement Re: m:n relations mapping...

2003-10-30 Thread oliver . matz
Hello, > -Original Message- > From: Andy Malakov [mailto:[EMAIL PROTECTED] > Problem: Right after insert, PersistenceBrokerImpl calls > storeCollections () method that performs redundant DELETE FROM... > operation. The problem has been mentioned by myself in the developer list together

problem between Broker and org.apache.commons(Borrow broker from pool failed)

2003-10-30 Thread Réda Benzair
Hi I have a problem in the excecution with this error : Error handled :org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed org.apache.ojb.broker.PBFactoryException: Borrow broker from pool failed I do not know which is the cause of this error on the level of OJB. her

RE : 1:1 navigable && EmptyCache bug

2003-10-30 Thread Emmanuel Dupont
Hi Edson, I apologize; I wanted to say in the collection-descriptor. Each time I have a Foreign Key reference in the reference_descriptor I have an inverse Foreign Key in a collection descriptor. Maybe I'm wrong...I thought you all time oblige to have a collection descriptor in such case

Re: 1:1 navigable && EmptyCache bug

2003-10-30 Thread Edson Carlos Ericksson Richter
Yes, I've done this yesterday, and it works. Thanks for the tip. Edson Richter - Original Message - From: Gerhard Grosse To: [EMAIL PROTECTED] Sent: Thursday, October 30, 2003 5:04 AM Subject: Re: 1:1 navigable && EmptyCache bug Hi Edson, I think with EmptyCache OJB can

Re: 1:1 navigable && EmptyCache bug

2003-10-30 Thread Edson Carlos Ericksson Richter
Can you explain a bit more? I never seen inverse foreign keys in references... How this apply in sample XML bellow? - Original Message - From: Emmanuel Dupont To: 'OJB Users List' Sent: Thursday, October 30, 2003 4:59 AM Subject: RE : 1:1 navigable && EmptyCache bug Is it because you don

Weird question on QueryByCriteria

2003-10-30 Thread Danilo Tommasina
Hi, I cannot see a nice solution to my problem, I would like to do a (PersistenceBroker API) QueryByCriteria that uses where-clauses on two tables that have no relations to each other. ex.: 2 tables TAB_A ( ID_A, VALUE_A ) and TAB_B ( ID_B, VALUE_B ) now i need a query like: SELECT ID_A, VAL

Re: 1:1 navigable && EmptyCache bug

2003-10-30 Thread Gerhard Grosse
Hi Edson, I think with EmptyCache OJB cannot detect loops in your object relations, because it does not maintain object identity. I'm afraid you need to use some non-empty cache implementation or remove the back-reference that causes the loop. hth Gerhard On Wed, 29 Oct 2003 19:36:59 -0300, "Eds

Re: odmg/foreign key contraint fails

2003-10-30 Thread Gerhard Grosse
Hi Gunnar, First thing I would try is to add db.makePersistent(o1) to your code. This affects the order of generated SQL statements and might solve your problem. hth Gerhard On Wed, 29 Oct 2003 18:29:31 +0100, Gunnar Hilling <[EMAIL PROTECTED]> wrote: >Hello, >I got a problem with the followin

RE : 1:1 navigable && EmptyCache bug

2003-10-30 Thread Emmanuel Dupont
Is it because you don't have any Inverse_foreignkey in your reference descriptor ? -Message d'origine- De : Edson Carlos Ericksson Richter [mailto:[EMAIL PROTECTED] Envoyé : mercredi 29 octobre 2003 23:37 À : 'OJB Users List' Objet : 1:1 navigable && EmptyCache bug Hi! If using EmptyCa

Re: OQL Query

2003-10-30 Thread Gerhard Grosse
Hi Bob, You can obtain a PersistenceBroker instance from the ODMG transaction by casting it to the interface HasBroker and then use OJB queries. The only difference is that you have to read-lock the query results yourself: PersistenceBroker pb = ((HasBroker) tx).getBroker(); Object result = broke

Re: OJB JDO & multiple database

2003-10-30 Thread Thomas Mahler
Hi Christophe, Christophe.Demarey wrote: Hi, Is there a way how I can simultaneously use multiple databases from OJB JDO ? OJB allows us to specify multiple jdbc-connection in the database repository but I don't know how to choose a jdbc-connection via the OJB JDO api ? Currently our JDO solu