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 Thomas Fischer <tf...@apache.org> on 2006/03/04 15:44:52 UTC

initialisation of id brokers

Hi everybody,

I have tried to resolve the bug
http://issues.apache.org/scarab/issues/id/TRQS336
which says that no IDBroker thread should be started if it is 
not needed. IdBrokers live in the Database Map, but the IdMethod can be 
set per table. The information whether a 
table's idMethod is IdBroker is only available when its TableMap is 
available, which is created upon loading of the corresponding Peer class. 
So when a DatabaseMap is created, it is not known whether an IdBroker is 
needed because it is not sure that all Peer classes are loaded (in almost 
all cases, they are not loaded). So the solution until now was to start an 
IdBroker thread for all Database Maps, whether needed or not.
I'd like to change that behaviour to the following: When a Peer class is 
loaded, it checks whether its IdMethod is IdBroker. If yes, it prompts the 
DatabaseMap to start an IdBroker if there is not already one started.

Does anybody see any drawbacks / faults in this ?

    Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org