On 6/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi, I still have problem. I appreciate your help. Here is the code that I use to send large file (it's part of the file ConsumerTool.java, it send out file after receiving message from RequestTool.java //////////begin///////////// if (message.getJMSReplyTo() != null) { activeMQSession = (ActiveMQSession)session; message1 = activeMQSession.createBlobMessage(new File("/tmp/0/testFile.exe")); replyProducer.send(message1); message1.acknowledge(); }
FWIW you only acknowledge messages you consume.
/////////end//////////////// Here is the code that I use to receive large file (it's part of the file RequestTool.java) ////////////begin//////////// message1 = consumer.receive(); if (message1 instanceof BlobMessage) { blobMessage = (BlobMessage) message1; in = blobMessage.getInputStream(); fout = new FileOutputStream("/tmp/testFile.exe"); while((i = in.read(fileData)) != -1) { fout.write(fileData, 0, i); } fout.close(); } else { System.out.println("Wrong, please send file: "); } ////////////end///////////// This is the error that I receive on the side that receive large file (RequestTool.java) /////////////////////begin//////////////// Error occur: [Ljava.lang.StackTraceElement;@187814
No other stack trace? -- James ------- http://macstrac.blogspot.com/