Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

Advice for invoking external binary from a servlet

Thread view: 
Kira Yamato - 27 Jul 2007 02:02 GMT
Hello NG.  I need an advice on what is the best way to do the following:

I have an UNIX-style binary program that communicates through stdin and
stdout.  I like to expose its functionality to the web.  Users will
work with this program interactively, so session states must be kept.

Here's an approach I came up with:  I want to use java.io.Process to
invoke an instance of the external program.  Then store this Process
object as a session object in the servlet.

I like to know what unforeseen issues may be associated with this
approach.  For example,
1) Do I have any cleanup issues to worry about?  Like orphan process
launched but never terminated even though the session expires.
2) Or any other issues that you can see?

Or perhaps there is another better way to go about this.

I am much appreciated for any insights.  Thanks.

Signature

-kira

Nigel Wade - 27 Jul 2007 11:54 GMT
> Hello NG.  I need an advice on what is the best way to do the following:
>
[quoted text clipped - 13 lines]
>
> Or perhaps there is another better way to go about this.

Does it have to be done via a web service?

Have you considered setting up a captive ssh account with the executable as the
login binary? That way a user would have direct communication with the
executable over an encrypted link, but without having to encapsulate the whole
process in HTTP.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.