
Originally Posted by
dejanp
Is there a reason not to use plain old http?
Company security police prohibited http communication between web DMZ and application server DMZ
Here is code I implmented in Stateless Session EJB to retrieve the pdf file frome jboos serve to web container
Code:
public InputStream getPDFByApplID ( String applID,String fileName, int bufferSize) throws IOException, EJBException{
byte[] buffer = new byte[bufferSize];
InputStream fis = new BufferedInputStream (new FileInputStream (fileName));
return fis;
It highly likely get out of menory error. just because if defined bufferSize is too big.
But It is working for limited thread access ( web tier's POJOs call this method).
Any good solutions can reduce the possibilites to out of menory error?