Hi, Lucas:

Thank you so much for your suggestions. I successfully made it working with
the QUEUE service.

Tun



On Mon, Sep 19, 2011 at 5:43 PM, Sharon Lucas <luc...@us.ibm.com> wrote:

> Here are a couple of ways you could implement this:
>
> 1) You can use the STAF MONITOR service.  In your remote Java program you
> can submit a LOG request to the MONITOR service to log a status message.
>  And in your STAF code, you can submit a QUERY request to the MONITOR
> service periodically to query the last messaged logged to the monitor to get
> the current status message last logged by the remote Java program.
>
> or
>
> 2) You can use the STAF QUEUE service.  In your remote Java program you can
> submit a QUEUE request to the QUEUE service to send a status message to your
> STAF code handle's queue.  And in your STAF code, you can periodically
> submit a GET WAIT [<Timeout>] request to the QUEUE service to get messages
> off its STAF handle's queue.
>
> --------------------------------------------------------------
> Sharon Lucas
> IBM Austin,   luc...@us.ibm.com
> (512) 286-7313 or Tieline 363-7313
>
>
>
>
> From:        Tun Wei <wei...@gmail.com>
> To:        staf-users@lists.sourceforge.net,
> Date:        09/19/2011 04:48 AM
> Subject:        [staf-users] question about getting status mesage from
> remote        server in Java
> ------------------------------
>
>
>
> Hi, guys:
>
> I am a java developer and new to the STAF. I have a question about how to
> get status message from remote Java code back to my STAF code. Following is
> what I want to do, and could you please give me some suggestions?
>
> In my local STAF code, I am using this STAF code to call a java program on
> a few remote servers to configure my remote server's env. The STAF code can
> be my control node. it works fine and is able to start my remote Java
> program. But my problem here is that, in my STAF code, I am only able to
> retrive the status of the remote Java program after the Java progam finished
> its whole job.
>
> For example. in the remote Java program, I have step1: init remote env,
> step2: config env, step3:validate env and step4: finalize env. After each
> step, the java program will log a status mesage. Right now, after my STAF
> code successfully invoked this Java program, it just wait for the whole
> results. However, I would like to see the STAF keeps getting step 1's
> message, step 2's message, step 3's message and step 4's message. I feel I
> should use STAF monitor API in my STAF code and STAF Queue API in my remote
> Java program. Is this a right way to do this? And Could you please suggest
> me the right STAF APIs' name to do this?
>
> Thank you so much for the help
> Tun
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> Learn about the latest advances in developing for the
> BlackBerry&reg; mobile platform with sessions, labs & more.
> See new tools and technologies. Register for BlackBerry&reg; DevCon today!
> http://p.sf.net/sfu/rim-devcon-copy1_______________________________________________
> staf-users mailing list
> staf-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/staf-users
>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to