ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject Re: Telnet to AS400
Date Wed, 13 Sep 2006 23:23:18 GMT
Hi,

I advise against using telnet, it is not practical to automate deployments.


Using ssh instead of telnet would be the first step I would recommend you. A quick search
in Google tells me that there are ssh servers implementations for AS400.

In a second step, to automate WebSphere deployments, the best is to use the JMX APIs of WebSphere.


Smartfrog is a tool that you might want to consider to orchestrate your deployments. Steve
Loughran can tell you more about it.



Regards,

Antoine
-------- Original-Nachricht --------
Datum: Wed, 13 Sep 2006 17:55:54 -0500
Von: "Ben Corpus" <bencor@cdw.com>
An: user@ant.apache.org
Betreff: Telnet to AS400

> Hi All,
> 
>  
> 
> I am using Apache Ant 1.6.5.  I want to use its Telnet task to automate
> Java deployments to WAS (Websphere Application Server) server running on
> the AS400.  The problem I encounter is in the nested <read> tag (line 6)
> - it hangs on that line of execution.  
> 
>  
> 
> Here's the target code:
> 
>  
> 
> 1          <target name="stop">
> 
> 2                      <echo message="****** Stopping WAS... ******"/>
> 
> 3                      <echo message="applicationName=${app.name}"/>
> 
> 4                      <echo message="user.id=${telnet.userid}
> pw=${telnet.password}"/>                       
> 
> 5                      <telnet server="${was.targetmachine}"
> userid="${telnet.userid}" password="${telnet.password}">
> 
> 6                                  <read string=">"/>
> 
> 7                                  <write>wsadmin</write>
> 
> 8                                  <read string=">"/>
> 
> 9                                  <write>set appman [$AdminControl
> queryNames type=ApplicationManager,process=server1,*]</write>
> 
> 
> 10                                 <read string=">"/>
> 
> 
> 11                                 <write>$AdminControl invoke $appman
> stopApplication {"${app.name}"}</write>
> 
> 12                                 <read string=">"/>
> 
> 13                                 <write>exit</write>
> 
> 14                                 <read string=">"/>
> 
> 15                                 <write>exit</write>        
> 
> 16                     </telnet>
> 
> 17         </target>
> 
>  
> 
> I have checked my dependencies and they are alright:
> 
>             - commons-net-1.4.1
> 
>             - jakarta-oro-2.0.1
> 
>  
> 
> I have checked my classpath
> 
>  
> 
> I have tried these other return characters:
> 
>             - ">"
>             - " "
>             - ""        (this stops the hanging, but the remaining lines
> of code never execute)
> 
>  
> 
> I anyone out there has experienced a similar problem and overcome it,
> please advise.
> 
>  
> 
> Thanks,
> 
> Ben
> 
>  

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


Mime
View raw message