Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

Notice removed Authoritative reference needed by Community Bot
Bounty Ended with kaos's answer chosen by Community Bot
added 132 characters in body
Source Link
user390517
user390517

I would like to do the following:

Write a file to disk. Then run a shell command. The shell command reads/manipulates this file sends a request over the network writes the response to another file and returns and exit value.

In order to run the shell command i have read about ProcessBuilder and Runtime.exec().

How exactly would one implement the above functionality. The webapp (struts) responsible will be hosted in Jbossas 7.1.

Do i need some like JCA since i.o and EJBs are not recommended (although only one server will be used in my case). Can i simply use a POJO (Struts action) i am not sure how to deal with multiple threads, although Struts actions are "thread safe".

Thanks in advaadvance,

If i were to use a pool of threads in order to handle multiple requests in parallel would this be a reason to use a JCA.

I would like to do the following:

Write a file to disk. Then run a shell command. The shell command reads/manipulates this file sends a request over the network writes the response to another file and returns and exit value.

In order to run the shell command i have read about ProcessBuilder and Runtime.exec().

How exactly would one implement the above functionality. The webapp (struts) responsible will be hosted in Jbossas 7.1.

Do i need some like JCA since i.o and EJBs are not recommended (although only one server will be used in my case). Can i simply use a POJO (Struts action) i am not sure how to deal with multiple threads, although Struts actions are "thread safe".

Thanks in adva

I would like to do the following:

Write a file to disk. Then run a shell command. The shell command reads/manipulates this file sends a request over the network writes the response to another file and returns and exit value.

In order to run the shell command i have read about ProcessBuilder and Runtime.exec().

How exactly would one implement the above functionality. The webapp (struts) responsible will be hosted in Jbossas 7.1.

Do i need some like JCA since i.o and EJBs are not recommended (although only one server will be used in my case). Can i simply use a POJO (Struts action) i am not sure how to deal with multiple threads, although Struts actions are "thread safe".

Thanks in advance,

If i were to use a pool of threads in order to handle multiple requests in parallel would this be a reason to use a JCA.

Notice added Authoritative reference needed by user390517
Bounty Started worth 50 reputation by Community Bot
edited tags
Link
Sreenath S
  • 1.3k
  • 1
  • 14
  • 21
Source Link
user390517
user390517

Implementation design regarding ProcessBuilder

I would like to do the following:

Write a file to disk. Then run a shell command. The shell command reads/manipulates this file sends a request over the network writes the response to another file and returns and exit value.

In order to run the shell command i have read about ProcessBuilder and Runtime.exec().

How exactly would one implement the above functionality. The webapp (struts) responsible will be hosted in Jbossas 7.1.

Do i need some like JCA since i.o and EJBs are not recommended (although only one server will be used in my case). Can i simply use a POJO (Struts action) i am not sure how to deal with multiple threads, although Struts actions are "thread safe".

Thanks in adva

default

AltStyle によって変換されたページ (->オリジナル) /