Forums Register Login

running application from stateless session bean

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Will it work? Probably yes, at least in most containers. Is it a good idea? Probably not...
Kyle
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
Get me the mayor's office! I need to tell her about this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 566 times.
Similar Threads
running application from stateless session bean
thread safety of helpmer methods in ejb
Struts2 Integrating Hibernate with Struts 2 Fraework
newbie - Stateless SessionBean calling static methods
inner class
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 20:38:12.