looks like you need some system redesign. why are you treating an OutputStream as a data object?
yes this is a limitation of EJB, it is a limitation to all remote computing,
it definitely effects the design and messaging between tiers of your architecture,
Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
Joined: Sep 18, 2005
Hmmm... So I am already doing something wrong eh? I need to implement a download functionality and currently, what I intend to do is...
1. Make a session bean that accepts an output stream 2. Create a Servlet/Struts Action class which the user would access 3. In the Servlet/Struts class, pass the ServletOutputStream to a session bean method.
Basically, the sesssion bean would be the one to make the file on the fly. Do you guys have any suggestions? Thanks!
Your session bean should not know that its client is a servlet. Instead, write a class which creates a serializable object from the input stream. Make sure that every field in the object is also serializable. This object is then passed to the bean for processing.
Either i can not understand the requirements or there is something terribly wrong in here.
You want a download functionality as provided by a web browser? If yes, How will doing anything on the server help you download a file on the client? (Unless ofcourse, the client machine is open to be screwed by anyone on the internet) I think you have to run an applet on the client that fetches the file contents from the server, as a mime attachemnt of an HTTP request or may be someother way.