I've a stateless session bean implementing a web-service.
The following code works only in jboss 4.0.1sp1 and correctly return an InputStream of 17MB but returns an exception in jboss4.0.2final: "No cache"
Message msg = MessageContext.getCurrentContext().getRequestMessage();
Iterator attachs = msg.getAttachments();
while (attachs != null && attachs.hasNext())
{
AttachmentPart ap = (AttachmentPart) attachs.next();
int sz = ap.getSize();
DataHandler dh = api.getDataHandler();
InputStream is = dh.getInputStream();
}
NOTE:
- the code works for small attachments in both versions but only in jboss4.0.1sp1 if the attachment is bigger (17MB)
- the size is corectly returned (17MB) in both versions.
- I've had noticed that in the server/deply/tmp directory
What happens? Is there a bug in the final release?