We don't have any command line tool to do that but it would not be difficult to 
add one.

You could have a component that registers itself with the Termination Hooks and 
then either sends you a notification or terminates itself (and, and for 
example, you block on it until it terminates).

The termination hook sends information about the name of the component that has 
terminated and its termination record.

An example for of how to use the termination hooks is the Trace component: 
org/smartfrog/services/trace/SFTrace

    /** Terminate tracer. */
    private SfTerminateWithTracer sfTerminateWithTracer = new 
SfTerminateWithTracer();
...
//add hook
sfTerminateWithHooks.addHook(sfTerminateWithTracer);
...
//remove hook
sfTerminateWithHooks.removeHook(sfTerminateWithTracer);
...

//Example of listening to hook events.
   /**
     * Utility inner class- terminate tracer
     */
    private class SfTerminateWithTracer implements PrimHook {
    /**
     * sfHookAction for terminating
     *
     * @param prim prim component
     * @param terminationRecord TerminationRecord object
     *
     * @throws SmartFrogException in case of any error
     */
        public void sfHookAction(Prim prim, TerminationRecord terminationRecord)
            throws SmartFrogException {
            Date date = new Date(System.currentTimeMillis());
            try {
                
prim.sfReplaceAttribute("sfTracesfTraceTerminateLifeCycle",date);
            } catch (RemoteException rex){
                printMsg(rex.toString(),null);
            }
            printMsgTerminate(getDN(prim), terminationRecord.errorType, 
terminationRecord.toString(), date);
        }
    }


Regards,

Julio

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dominik Pospisil
Sent: 23 January 2008 13:49
To: [EMAIL PROTECTED]
Subject: [Smartfrog-support] Determinig deployment termination status

Hello,

is there a way how to determine deployment termination status outside of SF
environment? I want to achaive something like this:

1) call sfStart shell script
2) block until component terminates
3) check component TerminationRecord (normal/abnormal)

Currently, I am periodically checking if component is still alive using
sfDiagnostics. But I am not able to catch component termination status. I can
easily do this by adding some notification code to sf components. But I
really want to implement this mechanism generally, working for all
components.

Thanks a lot,

- Dominik

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Smartfrog-support mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/smartfrog-support

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Smartfrog-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartfrog-users

Reply via email to