• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

running application from stateless session bean

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using windows os and writing a stateless session bean.
My question is can i run an application (exe file) present in the local system from the ejb.
i.e i have written a helper class for achieving the above said objective. Can I call helper class from the bean?
Thanks in advance.
Regards
Arun
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Will it work? Probably yes, at least in most containers. Is it a good idea? Probably not...
Kyle
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
Thanks for the input.
Infact i tryed using weblogic6.1 application server it worked. Even i feel it is not correct. Then what would be the work around to achive the above said task?
-arun
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The question is really what your external command really does. Another problem you might want to consider is that your .exe will just run on Windows

Peter
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Reinhardt,
Yes the ejb is designed to work in windows env, hences it will not case a problem. the exe file i am refering is an application which triggers some process to start in the system.
Now my question is how to run that exe located in the remote system from an EJB. I mean how to get a runtime of a remote system?
Thanks in advance.
-arun
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't. You're going to have to put some kind of agent that can start this program (on whatever system) in response to some sort of signal.
This could be as simple as a little Java program that listens on a socket and then starts off the program in response to a message, or as complex as a system that listens on a JMS queue and then does the same thing.
Kyle
 
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic