db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tek1 <t...@pobox.com>
Subject [PATCH] locating database.dtd in torque.jar [why accessing internet for dtd every execution? (solved)]
Date Tue, 24 Dec 2002 01:09:48 GMT
sorry for the repost.  forgot to include "[PATCH]" in the subject.

this is a repost from torque-users as the below would like to be submitted 
as a possible patch. thank you.

----


thanks for your reply jake.

actually, the database.dtd file is inside the torque-3.0.jar file, but the 
DTDResolver class was not picking it up for some reason.

so i took a look inside the 
org.apache.torque.engine.database.transform.DTDResolver class' source code 
and found the problem.

i'm not 100% sure if this is correct, but in the constructor, instead of using:

         InputStream dtdStream = getClass().getResourceAsStream("database.dtd");

i used:

         InputStream dtdStream = 
this.getClass().getClassLoader().getResourceAsStream("database.dtd");

with this change, it's able to pickup the database.dtd from the .jar, so it 
no longer accesses the internet.

if this looks like a viable patch, to whom do we submit the patch?

thanks.




At 13:30 02/12/23 -0800, you wrote:
>Sure, put it on your local disk and change the refernce from the actual 
>XML file that is referencing it.
>
>tek1 wrote:
>
>>is there a way to disable torque from accessing the internet to lookup 
>>the dtd upon every execution?
>>
>>ant is displaying:
>>
>>     Resolver: used http://jakarta.apache.org/turbine/dtd/database.dtd
>>
>>everytime...
>>
>>thanks.


--
To unsubscribe, e-mail: 
<mailto:turbine-torque-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: 
<mailto:turbine-torque-user-help@jakarta.apache.org>




Mime
View raw message