we have a design like this :
our installed service upon tomcat has a method getDatabaseData(String request) (RMI Client) which receive data from database using (RMI Server implementation) existing on the core.
we want to do something that our installed service which is inside tomcat make a xml file and send it to client now :
we have thought about a solution that :
but this solution is not informative for us because the size of this file is so big and if we want to do this our tomcat server storage will get full so fast & get down, so we're looking for a solution for real time streaming data to user instead of creating the whole file. I mean a way to send the data to user in a xml template when data is receiving from the CORE.
Do you have any idea ?
(by the way the web service upon tomcat has been written using Spring MVC & Spring Security)
Data streams support binary I/O of primitive data type values ( boolean , char , byte , short , int , long , float , and double ) as well as String values. All data streams implement either the DataInput interface or the DataOutput interface.
Java EE at a Glance. Java Platform, Enterprise Edition (Java EE) is the standard in community-driven enterprise software. Java EE is developed using the Java Community Process, with contributions from industry experts, commercial and open source organizations, Java User Groups, and countless individuals.
One example of a DataSink is a file writer object that stores the media in a file. A DataSink is created according to the factory mechanism used to create a Player . Adds an event listener for events generated by this DataSink . Closes the connection to the destination described by the output MediaLocator .
I can give you a pice of code from my current project, where we return a file in struts action:
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=\"" + fileName + "\"");
ServletOutputStream out = response.getOutputStream();
out.write(file);
Is this what you are looking for?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With