You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Deb Rogind <de...@rogind.com> on 2003/02/13 20:46:49 UTC

ID Broker id maintenance

Hello,

I have a web application running under tomcat which uses torque, velocity
and mysql db. I am using the defaultIdMethod = "idbroker", not "native", so
rely on ID broker to furnish primary key indices. When inserting members
into a table from a different thread, the next_id of id_table (ID Broker is
being used, not the native autoincrement feature of mysql)  skips large
blocks of numbers. The indices are getting increasingly (almost alarmingly)
large. What are the implications of this behavior of ID broker over time? I
am thinking of regenerating the entire database to use "native" and then
repopulating it.  Do you think this is necessary / worth the effort?

Please refer to this link:
http://www.developer.com/java/article.php/1457081 , excerpt:

The defaultIdMethod parameter tells Torque how to handle integer primary key
columns. If "native" is selected, Torque will allow the underlying database
to use its own native implementation. If "idBroker" is specified, Torque
will use its own vendor-neutral implementation which will work even for
databases that don't support auto-incrementing primary keys. The downside to
using the ID Broker is that it forces Torque to do a lot of acrobatics to
keep the ids in sync between multiple threads or processes (or even
servers), something that the native database implementations can usually
handle better.

Thanks for your help,
Debbie Rogind