ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terrence Martin <twm...@its.to>
Subject Memory Usage in Taskdef
Date Mon, 01 Oct 2001 22:22:59 GMT
We are building some custom ant tasks to load data into our database via
XML. The way we have set things up is that we have multiple data loads for
each "service". Sometimes we also run some SQL between each XML loads as
well.

For example in service 1 we run several loaders

eg. service1

<target name="load_service1">

<customxmltask file="service1a.xml"/>
<customxmltask file="service1b.xml"/>

<sql
	driver="com.sybase.jdbc2.jdbc.SybDriver"
	url="jdbc:sybase:Tds:${servername}:${port}"
    	userid="${user}"
    	password="${password}"
    	delimiter="GO"
>
<transaction src="service1.sql"/>
</sql>

<customxmltask file="service1b.xml"/>

</target>

Now each call to customxmltask makes a new instance of our logic, connects
to the database, and then tries to release it.

My question is, after each customxmltask is executed does ant drop all of
the references to customxmltask? The reason I ask is that every time our
custom task runs we chew up about 10MB of RAM that is not released for
the lifetime of the ant process. Well it does not take too
many tasks before we exhaust our available memory.

Now I do not want to imply the problem is necessarily ant as our code
likely the problem. I just wanted to know if anyone on the list might have
some insight into how tasks are treated within ant after they are executed
and if that would shed any light on why the memory is not reclaimed.

Thank you..:)

Cheers,

Terrence


Mime
View raw message