R: Questions: High/Low Sequence Manager
2. The sequence-name for my implementations are diffent, one is referenced only in the repository.xml, while I got direct access to the second in my application code. Sorry, I don't understand that. Can you explain more. I use a Sequence Manager (SequenceManagerHighLowImpl) normally for autoincrementing some entity fields (the primary keys), I configured it in the repository.xml; while I use a different Sequence Manager (a SequenceManagerHighLowImpl extension) inside my business logic classes. My question finally is: are there any known troubles using 2 SequenceManagerHighLowImpl istances (with different sequence name) on the same database? Thanks, Massimiliano Farnea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Questions: High/Low Sequence Manager
Hi all, I'm using in my application two implementation (extension) of the SequenceManagerHighLowImpl, one for managing primary keys and the last for generating an application protocol number sequence. I've choosen the SequenceManagerHighLowImpl because I might have more than a JVM pointing the same db. I have a couple of questions: 1. I can't understand the meaning of the grabSize parameter, can I set it to '1' (the protocol number sequence have to be continous) ? Any concurrency issues? 2. The sequence-name for my implementations are diffent, one is referenced only in the repository.xml, while I got direct access to the second in my application code. Are there any problems/advices in using two database driver sequence manager on the same db. Thanks in advance for your suggestions. Massimiliano Farnea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Problem with repository.xml when upgrading from RC2 to RC3
We haver an app running ok under Tomcat 3.3 JVM 1.3.1, OJB RC2 When we upgrade to OJB RC3, we could not initialize the OJB broker. The error is U should upgrade configuration files too: OJB.properties, repository.dtd and repository.xml. Check the differences with the files released with the rc3 archive. max - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: R: SequenceManagerHighLowImpl: trouble on rc3 - SOLVED?
a, Just to check: are you saying that it is possible to use the latest JDBC driver (that comes with Oracle 9.x) with Oracle 8.1.7? Do you have a link to more information about possible issues doing this? Thanks, I'm using the classes12-g.zip (i'm still on JDK1.3) JDBC Driver for Oracle 9.2 on a Oracle 8.1.7 db, and by now it seems to work. Anyway I'm planning to do a full migration to Oracle9, so I think that I shall not explore deeply this issue. My application is using OJB and Turbine and I simply replaced the old classes12.jar with the new driver. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: SequenceManagerHighLowImpl: trouble on rc3
Hi, strange! Could you post a test case or add a test to one of the existing test cases to reproduce your problem? Yes it's strange, I noticed a couple of thing ... that could be wrong: First of all, the problem seems the storing of the HighLowSequence object. The maxKey attribute is a 'long' now, so in the repository-internal.xml the field descriptor of this attribute should be: field-descriptor name=maxKey column=MAX_KEY jdbc-type=BIGINT / instead of field-descriptor name=maxKey column=MAX_KEY jdbc-type=INTEGER / Anyway, using BIGINT the first store of the sequence works fine but the followings doesn't work and I got a ClassCastException on a java.lang.Integer object. Now I'm playing with some debug on the sequence classes to understand where this type mismatch could be generated. I'll try to setup a test case for this issue Thanks again Massimiliano Farnea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: cache confusion
So I switched to using the ObjectCacheEmptyImpl until I understood caching better. But *even* *then* I found that objects were not always refreshed from the database. This was *totally* unexpected. I finally had to put a broker.clearCache() just after opening my transactions in order to guarantee that I actually pulled from the database. I have exactly the same problem, and I had to flush the cache manually as you did. Could someone explain this strange behaviour? Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NEWBIE: cannot update object with ODMG
I'm testing the ODMG layer with this example: /** * Update the Traente instance on the database */ public void update() { Database db = odmg.newDatabase(); // the current DB Transaction tx = null; //open database try { db.open(default, Database.OPEN_READ_WRITE); } catch (ODMGException ex) { ex.printStackTrace(); } tx = odmg.newTransaction(); String oqlQuery = select edit from + traente.className + where id = + traente.getId(); try { tx = odmg.newTransaction(); tx.begin(); OQLQuery query = odmg.newOQLQuery(); query.create(oqlQuery); DList result = (DList) query.execute(); Traente toBeEdited = (Traente) result.get(0); tx.lock(toBeEdited, Transaction.UPGRADE); toBeEdited = traente; tx.commit(); } catch (Throwable t) { // rollback in case of errors tx.abort(); t.printStackTrace(); }finally { try { db.close(); System.out.println(DB closed); } catch (ODMGException ex) { ex.printStackTrace(); } } } where 'traente' is a class attribute that rapresents the updated object that i would like to persist. After the method invocation the database still contains the old object, while retrieving again the reference 'toBeEdited' it seems to be updated. What do I miss? I'm using a test class on JBuilder, without any particular deployement enviroment. Thanks in advance Massimiliano Farnea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: NEWBIE: cannot update object with ODMG
-Messaggio originale- Da: Guido Beutler [mailto:[EMAIL PROTECTED] Inviato: giovedì 6 marzo 2003 13.08 A: OJB Users List Oggetto: Re: NEWBIE: cannot update object with ODMG Hi, - Original Message - From: Farnea Massimiliano [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 06, 2003 12:58 PM Subject: NEWBIE: cannot update object with ODMG you got 2 transactions now. I think you need only one. ok, u are right, but it doesn't seem to be the problem ... or the real problem. It still does not update. At the tutorial page the OJB crew uses tx.lock(toBeEdited, Transaction.WRITE); for updating values. I used both UPDATE and WRITE values ... with no success. toBeEdited = traente; what's traente at that point? traente is an object that contains the updated values of the object. This is how my test app works: 1. I get a Traente object from the db (with another class) and put it in 'traente' attribute. 2. I set some object properties of traente attribute. 3. I call the method update that you know, in which the traente attribute is used to update the db reference. I tried setting a single propery too. Example: toBeEdited.setNome(new name); tx.commit(); cheers, Guido Thanks, massimiliano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]