Programming Q Chalanachithram.com | Topics | Search
Hide Clipart | Log Out | Register | Edit Profile

Last 30 mins | 1 | 2 | 4 hours     Last 1 | 7 Days

Chalanachithram.com DB » TF Industry related » Archive through June 08, 2012 » Programming Q « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Khandada
Side Hero
Username: Khandada

Post Number: 2819
Registered: 10-2008
Posted From: 64.79.135.151

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, June 07, 2012 - 02:48 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

simba
thanks a lot bro...i think i will take the timer route
Humpty Dumpty sat on a wall,Humpty Dumpty had a great fall
Top of pagePrevious messageNext messageBottom of page Link to this message

Khandada
Side Hero
Username: Khandada

Post Number: 2818
Registered: 10-2008
Posted From: 64.79.135.151

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, June 07, 2012 - 02:41 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

mav, analog
yeah looks like the sh script has to do something

will explore..thanks
Humpty Dumpty sat on a wall,Humpty Dumpty had a great fall
Top of pagePrevious messageNext messageBottom of page Link to this message

Simba
Side Hero
Username: Simba

Post Number: 5833
Registered: 02-2008
Posted From: 206.210.27.33

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, June 07, 2012 - 02:40 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

@khan bhai,

you can always terminate a Process (forked by ProcessBuilder) using a java timer (time-based termination)
For status based termination, let the external process write the status to disk/network/database, you can monitor the resource at terminate if need be.
Top of pagePrevious messageNext messageBottom of page Link to this message

Analog
Comedian
Username: Analog

Post Number: 1707
Registered: 05-2008
Posted From: 192.91.66.189

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, June 07, 2012 - 02:36 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Khandada:




Is it possible to initialize a global variable to some value before invoking the script, and change that variable inside the script before exiting...

You can track this variable and time limit to know the status of the shell script...Java idea ledu BTW
NenoDi neeve gelichi... nee gelupu naadani thalachi... raagaalu ranjilu roje raaji rammanTi
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 38255
Registered: 01-2008
Posted From: 70.39.231.172

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, June 07, 2012 - 02:22 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

create trigger file at the end of script and let the java program poll for file and time out after a time..java specific kaadu..general unix scripting angle
Who is this DB member?
Top of pagePrevious messageNext messageBottom of page Link to this message

Khandada
Side Hero
Username: Khandada

Post Number: 2814
Registered: 10-2008
Posted From: 64.79.135.151

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, June 07, 2012 - 02:10 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

I have a java process which is going to execute a shell script
I will be calling the script via the ProcessBuilder class

when the script is executed...it will return a value of 0 ( successful) or another value (fail) as exit return value
this is fine as long as the script completes

I need to handle the case when the process initiated by the script is stuck - say network outage or something...it does not return anything back to the calling java process

any ideas on how to set a threshold kind of time value programmatically to handle hanging threads/external processes?
Humpty Dumpty sat on a wall,Humpty Dumpty had a great fall

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image HASH(0x9be7648){Movie Clipart}
Show / Hide regular icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Show / Hide Filmy icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  


Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: