Hi,

While playing with the TDK I noticed another bad coupling
that I would like to fix. In a couple places in Torque
there are blobs of code like:

name = attrib.getValue("name")
if (name == null)
{
  name = TurbineDB.getDefaultDB();
}

To me that is bad because what is potentially a useful
stand-alone tool is tied to a service. A service that isn't
even running. The above code relies on a hardcoded value
in the MapBrokerService and the PoolBrokerService.

How I found this is by making the default database
configurable. I changed some methods in the PoolBroker
and MapBroker to look the value up instead of taking
it from a configuration. When testing the TDK I noticed
the dependency on TurbineDB in torque which causes things
to bomb all over the place because the services obviously
aren't running.

I see two ways out of this, either have a property in
the Torque task that specifies the default database or make
the name= attribute in torque manditory.

Having the name= attribute be manditory is a great
deal simpler as passing a property through from the
ant task into the model is not easy as it currently
stands.

Anyone else have any thoughts? I think this has to
be changed because referencing a service for a property
isn't the best way to go IMO.

-- 

jvz.

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to