duplicate ID exception in cluster

2006-12-05 Thread Will Glass-Husain
Hi, I just set up a new 2 server cluster with two instances of Tomcat both reading/writing from a single database. I'm using Torque 3.0, the default ID Broker and MySQL 5. (InnoDB) My problem... Under heavy load, I notice that most write requests on one of the servers fails with a duplicate ID

torque project compile with ant

2006-12-05 Thread Aljosa Mohorovic
i get this error when i try ant -f build-torque.xml compile, any idea why? i searched wiki and google but didn't find anything. Buildfile: build-torque.xml compile: [javac] Compiling 24 source files to C:\Documents and Settings\Administrator\Desktop\torque-gen-3.3-RC1\test\bin\classes

AW: duplicate ID exception in cluster

2006-12-05 Thread Thoralf Rickert
Hi! I just set up a new 2 server cluster with two instances of Tomcat both reading/writing from a single database. I'm using Torque 3.0, the default ID Broker and MySQL 5. (InnoDB) It's not the answer for your question, but why do you use ID Broker with MySQL? It has integrated auto

Re: AW: duplicate ID exception in cluster

2006-12-05 Thread adam . s . allgaier
Have you tried increasing the number of the cached ids? I believe 10 is the default. Adam Thoralf Rickert

RE: torque project compile with ant

2006-12-05 Thread Greg Monroe
Hmm, since the error is in the Torque test project, I'll assume that your trying to build the Torque project from the source distro using ant. It this is not the case, see the end of this note. The best way to build Torque is to use Maven (V1.0). Since this is what the developers use all the

RE: torque project compile with ant

2006-12-05 Thread Thomas Fischer
Do not use the schema files and the from the test project as templates for your own project. The schema files from the test project are processed through a filter which replaces the @ tokens. Better start with the examples from the tutorial. Thomas Aljosa Mohorovic [EMAIL PROTECTED] schrieb

Re: torque project compile with ant

2006-12-05 Thread Aljosa Mohorovic
On 12/5/06, Greg Monroe [EMAIL PROTECTED] wrote: The best way to build Torque is to use Maven (V1.0). Since this is what the developers use all the time, it's guaranteed to work. It's relatively painless to install and learn to run. i'm not using maven because command: maven plugin:download

RE: torque project compile with ant

2006-12-05 Thread Greg Monroe
First thing to try is to use version=3.3-RC1 on the maven plug-in command. 3.3 has not been officially released (but some of the docs may refer to it in advance). If this doesn't fix it, I saw a reference to the 301 errors occuring because the Apache.org folks moved the repository from

RE: duplicate ID exception in cluster

2006-12-05 Thread Greg Monroe
Thoralf is right, the only way to make the idBroker cluster safe is to use transactions on any Peer doInsert/Update methods. E.g.: Connection con = null; try { con = Transaction.begin(dbName); MyTablePeer.doInsert( criteria, con); Transaction.commit(con); } catch(TorqueException e) {

RE: duplicate ID exception in cluster

2006-12-05 Thread Damien Corbishley
I would let the database generate the unique ID's. That's one of the things they are good at. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Will Glass-Husain Sent: 05 December 2006 15:05 To: torque-user@db.apache.org Subject: duplicate ID exception

Re: duplicate ID exception in cluster

2006-12-05 Thread Will Glass-Husain
Hi, Thanks for the note. Ok, I'll set defaultIdMethod=native which should handle it. However, It surprises me that the IDBroker doesn't work in a cluster environment. The error message for non-transaction safe database says don't use Torque with a non-transaction database with multiple

Re: duplicate ID exception in cluster

2006-12-05 Thread Henning P. Schmiedehausen
Will Glass-Husain [EMAIL PROTECTED] writes: Hi, I just set up a new 2 server cluster with two instances of Tomcat both reading/writing from a single database. I'm using Torque 3.0, the default ID Broker and MySQL 5. (InnoDB) Real cluster or just master/slave (or master/master with only one

Re: duplicate ID exception in cluster

2006-12-05 Thread Will Glass-Husain
Hi Henning! It's a real (Tomcat) cluster. Two instances of Tomcat talking to a single database. (no database replication). I use Apache/mod_jk to split requests (based on session) between the two Tomcats. Allows me to run high number of users with a memory-heavy application. Thought briefly