I would write a custom task which stores the listener-adresses as property.
Inside your code you could reuse the Ant classes if you need ...
(oata.taskdefs, oata.util)
Jan
<getOracleListener property="ora.port"/>
<target name="doSomething" if="ora.port">
...
</target>
class GetOracleListenerTask extends Task {
String property; // setter
public execute() {
List<URL> urls = getPossibleListenerUrls();
for(URL url : urls) {
if (isReachable(url)) {
getProject.setNewProperty(property, url);
return;
}
}
}
// return a list of possible oracle listeners
// maybe from a file
private List<URL> getPossibleListenerUrls() {}
// checks if that given url is ok
private boolean isReachable(URL url) {}
}
>-----Ursprüngliche Nachricht-----
>Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Gesendet: Dienstag, 20. März 2007 23:37
>An: [email protected]
>Betreff: RE: Question about loop in Ant
>
>http://www.cenqua.com/fisheye/demo/browse/~raw,r=1.4/ant/docs/m
>anual/CoreTasks/sequential.html
>--
>Charles Knell
>[EMAIL PROTECTED] - email
>
>
>
>-----Original Message-----
>From: Farid Izem <[EMAIL PROTECTED]>
>Sent: Tue, 20 Mar 2007 22:32:12 +0100
>To: [email protected]
>Subject: Question about loop in Ant
>
>Hi All,
>
>I have write a ant script which check the availibility of
>Oracle listener
>based on tcp reachibility (waitfor task) and jdbc connection
>(sql task).
>
>I'd like to make somehing like that :
>
><while>
> <condition is false>
> <antCall target="MyTarget" />
> </condition>
></while>
>
>Is there something i can do easily or do i need to write my
>own ant task ?
>
>Kind Regards,
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]