db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bagnara <apa...@bago.org>
Subject Torque as avalon service and use of the DataSourceSelector service
Date Sat, 14 Oct 2006 17:21:03 GMT
Hi all,

we integrated Torque in Apache James trunk for our IMAP storage needs.
James is currently Avalon based and works on Avalon.

I saw there is an Avalon component for James but I saw it does not 
depend on the DataSourceSelector component that we currently use to 
access the db.

I thought we could write our own torque avalon service depending on 
datasourceselector but I'm not sure we can do this.

I see Torque need a static configuration of the class used as the 
datasource factory while using DataSourceSelector the datasource is 
obtained via dependency injection or service lookup.

Maybe we should switch from Torque static usage to TorqueInstance?

Pardon my ignorance on Torque: Using TorqueInstance is it possible to 
override its getDataSource to ask the datasource to the DataSourceSelector?

I see that generated "om" contains static "Torque.method" calls: how do 
this integrate with the TorqueInstance usage/configuration?

Is this possible? Otherwise I think I have to use publish the datasource 
selector via JNDI and to use the JNDI factory or to put the 
datasourceselector in a static field and then access it via a custom 
factory but I don't like this solutions (static fields/singleton are bad 
in then avalon world) so I'm investigating other options first.

Thank you for any suggestion!
Stefano


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


Mime
View raw message