aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes execute binary or unix-script from EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "execute binary or unix-script from EJB" Watch "execute binary or unix-script from EJB" New topic
Author

execute binary or unix-script from EJB

Olexiy Prokhorenko
Ranch Hand

Joined: Jul 11, 2004
Posts: 97
hello guys,

what is the best way to run external binary or Unix-script from EJB?
is there are any special requirements? notes? important moments?

I would be thankful if you'll be able to share some knowledge on this topic.

thanks.


<a href="http://www.BossTalks.com" target="_blank" rel="nofollow">http://www.BossTalks.com</a><br />Free advices and help for entrepreneurs: from Idea to IPO<br />Software and IT Project Management forum
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Olexiy,

First of all, you might consider that your bean could be enlisted within a transaction. It would make me feel quite uncomfortable to know that the result of the transaction depends upon the result of an external process. If your process updates a file but the transaction rolls back, will the file be in a consistent state? Isn�t too much of a thought to have global (distributed) 2PC transactions depending upon an external, uncontrolled process?
Second of all it might raise security issue. You have to grant to the container the permission to run that process. This means that all deployed applications can run the same process.
Finally you might find this article pretty interesting:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html
Regards.


I think, therefore I exist -- Rene Descartes
Olexiy Prokhorenko
Ranch Hand

Joined: Jul 11, 2004
Posts: 97
Hello Valentin,

I understand all possible transactions problems.
Unfortunatelly, there is a legacy part of our existing system, which we can't re-write using J2EE power at the moment. I will have to use it AS IS.

That's why I just have to call external binaries and scripts.

Thank you for your link.
Will try to dig deeper into this.

By the way, one of requirements will be generating PDF from existing URL. Can anybody suggest some open-source J2EE library for this purpose?

Thanks.
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
We're using iText and is pretty good. See:
http://www.lowagie.com/iText
Shibu Raj
Greenhorn

Joined: Jan 24, 2005
Posts: 17
For Generation of PDF files we have created a web service which accepts the data in XML file and the formatting info as XSLT file. This is flexible in the sense, other applications also call the same webservice to have the PDF generation power. We used Apache Axis and XML/XSL FO for the PDF conversation.

Good Luck!

Thanks
Shibu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: execute binary or unix-script from EJB
 
Similar Threads
hprof in weblogic 8?
generate a text file in another server ??
setuid
check status of web application
ANT FTP download new line problem.