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
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
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
Have you tried increasing the number of the cached ids? I believe 10 is
the default.
Adam
Thoralf
Rickert
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
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
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
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
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)
{
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
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
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
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
13 matches
Mail list logo