Xdoclet, reference and modify-inherited

2004-09-16 Thread Mickael LEFEVRE
Hello, We use OJB 1.0.1 with one class per table. To be simple, we have 3 classes : B extend A, and A have a reference to C. The C id in A is anonymous. A have the flag ' determine-extends="false" ' In B we could ignore the reference to C, but not the C id (which is anonymous). If we put :

which tuto to start with ? was (Re: [newbie] ojb build failed on MacOS X.3.5)

2004-09-16 Thread Yvon Thoraval
Le 16 sept. 04, à 21:14, Thomas Dudziak a écrit : The beginner's tutorial on the OJB website uses this to introduce you to OJB. Is somewhere a specific link to this tuto ? because i've found : A full featured ODMG 3.0 compliant API. (See the ODMG Tutorial for an introduction.) See JDO tutoria

RE: Optimistic Locking exception with 1.0 - doesn't happen with rc4

2004-09-16 Thread Kollivakkam R. Raghavan
An update on this issue. It turned out to be a problem with our code. It looks like rc4 was actually not identifying this condition whereas 1.0 added a check to look for the locking condition when the update fails. So 1.0 was correctly throwing an exception. In any case, based on this mail, I ha

Re: adding a LIMIT or TOP to a query

2004-09-16 Thread Charles N. Harvey III
That certainly is much easier. I'll let you know how it turns out. Thanks so much for the tip. Charlie Jakob Braeuchi said the following on 9/16/2004 4:37 PM: hi charles, using the broker may be easier: String sql = broker.serviceSqlGenerator().getPreparedSelectStatement(query, cld); jakob Jakob

Re: adding a LIMIT or TOP to a query

2004-09-16 Thread Jakob Braeuchi
hi charles, using the broker may be easier: String sql = broker.serviceSqlGenerator().getPreparedSelectStatement(query, cld); jakob Jakob Braeuchi schrieb: hi charles, you could use SqlQueryStatement#getStatement. but the constructor of SqlQueryStatement need Platform , ClassDescriptor , Query que

junit: BUILD SUCCESSFUL was (Re: [newbie] ojb build failed on MacOS X.3.5)

2004-09-16 Thread Yvon Thoraval
Le 16 sept. 04, à 21:14, Thomas Dudziak a écrit : If you're about to quickstart with OJB, it would be best if you start with the newest stable version which is 1.0.1 (rc2 is quite old btw). Also, with this version you should not need to build OJB from source. Simply download the bin version (with

Re: [newbie] ojb build failed on MacOS X.3.5

2004-09-16 Thread Thomas Dudziak
Yvon Thoraval wrote: Hey all, new to ojb, i do have some experience with hsqldb and plan to migrate from sql to oql. then i wanted to follow the quickstart at your web site and install db-ojb-1.0.rc2. First off, two things: If you're about to quickstart with OJB, it would be best if you start w

[newbie] ojb build failed on MacOS X.3.5

2004-09-16 Thread Yvon Thoraval
Hey all, new to ojb, i do have some experience with hsqldb and plan to migrate from sql to oql. then i wanted to follow the quickstart at your web site and install db-ojb-1.0.rc2. however i get stuck here about this error message after a : nord-2-81-57-96-20:~/Desktop/db-ojb-1.0.rc2> sh bin/bui

Re: Configure generated SQL in OJB: HOWTO do that? Will Velocity solve my problem?

2004-09-16 Thread Jakob Braeuchi
hi ajitesh, ojb allows you to replace the whole sql-generator, but then it's totally up to you ... ojb.properties: # # SqlGenerator #

Re: Version and optimistic locking

2004-09-16 Thread Pulat Yunusov
No problem, Armin. :) Pulat Armin Waibel wrote: Pulat Yunusov wrote: Great, Armin. Are you committing this to CVS any time soon? Thanks, Done! It's in CVS now (both 1.1 trunk and 1.0.x branch - OJB_1_0_RELEASE). Thanks for bag this bug ;-) Armin Pulat Armin Waibel wrote: > In statement 3 above, v

Re: Version and optimistic locking

2004-09-16 Thread Armin Waibel
Pulat Yunusov wrote: Great, Armin. Are you committing this to CVS any time soon? Thanks, Done! It's in CVS now (both 1.1 trunk and 1.0.x branch - OJB_1_0_RELEASE). Thanks for bag this bug ;-) Armin Pulat Armin Waibel wrote: > In statement 3 above, valueOf() will return false when updateLock pars

Re: Version and optimistic locking

2004-09-16 Thread Pulat Yunusov
Great, Armin. Are you committing this to CVS any time soon? Thanks, Pulat Armin Waibel wrote: > In statement 3 above, valueOf() will return false when updateLock parsed > from XML is null. Examining RepositoryXmlHandler's debug logs indicates > that null is indeed assigned to updateLock when the

RE: Configure generated SQL in OJB: HOWTO do that? Will Velocity solve my problem?

2004-09-16 Thread Ajitesh Das
Thanks a lot Jacob... According to this scenario, this works. But Case A: if I want to generate my custom SQL how do I do that? Does OJB has any hooks or something where I can register my custom SQLImpl class ..like this. Case B: [This is somewhat torque related question] When OJB generates s

Re: Version and optimistic locking

2004-09-16 Thread Armin Waibel
> In statement 3 above, valueOf() will return false when updateLock parsed > from XML is null. Examining RepositoryXmlHandler's debug logs indicates > that null is indeed assigned to updateLock when the parsed attribute is > missing. doh! I think you got it! We should only set the updateLock field

Re: adding a LIMIT or TOP to a query

2004-09-16 Thread Jakob Braeuchi
hi charles, you could use SqlQueryStatement#getStatement. but the constructor of SqlQueryStatement need Platform , ClassDescriptor , Query query and Logger. i have a very old version of a sql-paging solution but it no longer fits into the current code. jakob Charles N. Harvey III schrieb: Hello

Re: Configure generated SQL in OJB: HOWTO do that? Will Velocity solve my problem?

2004-09-16 Thread Jakob Braeuchi
hi ajitesh, ojb creates the sql dynamically so there's no need for a velocity template. if you want to change from equal to like you can use Criteria#addLike. hth jakob Ajitesh Das schrieb: Hi List: I want to store an *supersize* byte array into a db table. How do I control the SQL generated by o

Re: Version and optimistic locking

2004-09-16 Thread Pulat Yunusov
Thanks for your reply, Armin. Using a debugger I found that RepositoryXmlHandler sets updateLock to false when "update-lock" is not specified. Here is how it assigns a value to the updateLock attribute of the current field descriptor object in RepositoryXmlHandler#startElement(): String updateL

Re: Version and optimistic locking

2004-09-16 Thread Armin Waibel
Hi Pulat, I checked the initialization value for 'updateLock' in FieldDescriptor class and it's 'true'. So if you don't specify a value the xml-parser should return 'true' or if this attribute was skipped the initial value (true) should be used in FieldDescriptor. In OJB test-suite are several

Re: Version and optimistic locking

2004-09-16 Thread Pulat Yunusov
I found that update-lock is false by default, that is when I don't specify it in the locking field descriptor. When I set this attribute to true explicitly, OJB increments the version field for every insert and update. I inspected the class-descriptor object passed to storeToDb() in Persistenc

user aliases for more then one attribute path segment

2004-09-16 Thread Kohlweiss Georg
Hi! First of all I want to mention that OJB does a lot of work for me and is a great project! Many problems i had with user aliases i solved for my own, but now i can't find a way out :( Here's my problem: I have 2 Object-Classes ItemImpl and PropertyImpl (one item has many named properties,

Re: JTA with JDO

2004-09-16 Thread Armin Waibel
Hi Sudhakar, Namasivayam, Sudhakar (Cognizant) wrote: I am new to JDO n JTA. Is it possible to use JTA using OJB? Currently JDO 1.0.1 implementation does not support integration in managed environments. This will be done when JDO 2.0 api was released. PB-api and ODMG-api support integration in

Re: Optimistic Locking exception with 1.0 - doesn't happen with rc4

2004-09-16 Thread Pulat Yunusov
Kollivakkam, Is the value in your MOD_NUM incremented properly every time the record is updated? I am asking because I have a problem using the version field for optimistic locking. Thanks, Pulat Kollivakkam R. Raghavan wrote: No our application is one where client and server need to periodicall

Re: Search proxies without materialization

2004-09-16 Thread Piet Molenaar
Thnx, wrapping it in my own Collection is a good suggestion. At 15:54 9/16/2004, you wrote: Piet Molenaar wrote: Hi, First of all, ojb is great and I find great support on this list. Unfortunately I did not find a solution to the following problem. At the moment I'm implementing a persistent datala

Re: Search proxies without materialization

2004-09-16 Thread Thomas Dudziak
Piet Molenaar wrote: Hi, First of all, ojb is great and I find great support on this list. Unfortunately I did not find a solution to the following problem. At the moment I'm implementing a persistent datalayer for an application that has to perform queries over large sets of data. I only want to

Really strange problem! Please Help!

2004-09-16 Thread Fernando Bernardino
Hi everybody! I have a really strange problem. I'm working with OJB 1.0rc5, Oracle 8.1.7, JBoss 3.2.3. I have a table with a atributte "dt_atualizacao" data type "date". If I update this table changing the value of "dt_atualizacao", only this, OJB is changing another atributte (the first that is

Search proxies without materialization

2004-09-16 Thread Piet Molenaar
Hi, First of all, ojb is great and I find great support on this list. Unfortunately I did not find a solution to the following problem. At the moment I'm implementing a persistent datalayer for an application that has to perform queries over large sets of data. I only want to search for id's so I

Re: Is there any update on the following post about cache configurations?

2004-09-16 Thread Armin Waibel
Hi Mark, > It seems that 1 and 2 are provided by the ObjectCacheDefaultImpl in the odmg > layer with pessimistic locking in a non-clustered configuration. This is the > configuration we are running now. It looks like TransactionImpl.abort > eventually calls StateOldDirty.rollback that calls remo

RE: Transaction Isolation Level

2004-09-16 Thread Charles Anthony
Mebbe. currentTransaction is what we use, as it the "official" way to get the current transaction, and ultimately would end up calling the same method (TxManagerFactory is an OJB specific. Not that it makes much difference). > -Original Message- > From: Frank Renaers [mailto:[EMAIL PROTECT

RE: Transaction Isolation Level

2004-09-16 Thread Frank Renaers
Or maybe it's better to use 'TxManagerFactory.instance().getTransaction()' to check whether there's a transaction for the calling thread. -Original Message- From: Charles Anthony [mailto:[EMAIL PROTECTED] Sent: donderdag 16 september 2004 10:48 To: 'OJB Users List' Subject: RE: Transact

Re: Can you please look at this?

2004-09-16 Thread Armin Waibel
Hi Mark, sorry for ignore your posts, all your posts labeled as 'todo' in my mail client but ... ;-) Will try to answer today. regards Armin Mark Neighbors wrote: I posted the following on 2004-07-30. So far there hasn't been a response. Can you please look? Thanks * http://nagoya.apache

RE: Transaction Isolation Level

2004-09-16 Thread Charles Anthony
Hi - Our layer is above the ODMG layer, not the PB layer, so we do isBegun(){ Transaction tx = odmg.currentTransaction(); return tx == null ? false : tx.isOpen(); } ODMG maintains 1 broker per thread, which allows us to refer to the same broker all over the place without passing it abo

RE: Transaction Isolation Level

2004-09-16 Thread Frank Renaers
Hi, We are also using a thin layer above the OJB layer. How do you check whether a transaction is active (isBegun()??) Thanks, Frank Renaers Ikan Software -Original Message- From: Charles Anthony [mailto:[EMAIL PROTECTED] Sent: donderdag 16 september 2004 9:30 To: 'OJB Users List' Subj

Re: Optimistic Locking exception with 1.0 - doesn't happen with rc4

2004-09-16 Thread Armin Waibel
By the way, it seems that in your code snip PB.abortTransaction() was never be called. This will cause an error log when call PB.close(), something like "Broker is still in PB-transaction, do automatic abort before close!" and OJB will internal do an PB.abortTransaction() call. try {

Re: Optimistic Locking exception with 1.0 - doesn't happen with rc4

2004-09-16 Thread Armin Waibel
Kollivakkam R. Raghavan wrote: I am not using the ODMG API. I do see a beginTransaction call in the try/catch/finally block. Is there something more I need to do. Raghavan It's independent from the used API, on each store/delete operation OJB check for a running PB-tx and if none found this mess

RE: Optimistic Locking exception with 1.0 - doesn't happen with rc4

2004-09-16 Thread Kollivakkam R. Raghavan
I am not using the ODMG API. I do see a beginTransaction call in the try/catch/finally block. Is there something more I need to do. Raghavan -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 1:00 AM To: OJB Users List Subject: Re: Optimis

Re: Optimistic Locking exception with 1.0 - doesn't happen with rc4

2004-09-16 Thread Armin Waibel
oh, sorry policy.setSyncSeqNum seems to be mapped to column SYNC_SEQ_NUM, so the answer is no ;-) So all things seem to be ok - strange. Method JdbcAccess#executeUpdate doesn't change much between rc4 and 1.0.1. >>> 14-Sep-2004 16:23:42 WARN [010-Processor25] >>> .broker.core.PersistenceBrokerIm

RE: Optimistic Locking exception with 1.0 - doesn't happen with rc4

2004-09-16 Thread Kollivakkam R. Raghavan
No our application is one where client and server need to periodically sync. Up. Instead of using time to figure out what has changed we use a synchronization seq. number which the client and server exchange. So this is not the locking col. The locking column is the MOD_NUM column in the table.

RE: Transaction Isolation Level

2004-09-16 Thread Charles Anthony
Hi, We do something similar (for different reasons). We use a thin layer (closed source, sorry) above the OJB layer, and have created simple lazyBegin, lazyCommit methods that respectively open and close the pb transaction - lazyBegin begins a transaction if one has not already been started and r

Re: Optimistic Locking exception with 1.0 - doesn't happen with rc4

2004-09-16 Thread Armin Waibel
Hi Raghavan, do you increment the optimistic locking field by yourself with policy.setSyncSeqNum(SynchronizationLogic.getNextSynchronizationSequence Number().longValue()); ?? OJB itself does increment/reset the locking field, if you increment too, all the time a OLException will be thrown. regard

RE: Transaction Isolation Level

2004-09-16 Thread Frank Renaers
Hi Armin, Thanks for your support. Another question : In our application there's a business service layer which is in fact a kind of façade for the bo (ojb) layer. Each business service starts a transaction and does a commit or rollback at the end. But when we are running junit tests, we do not