Which version are you using?

On 3/30/06, toxel <[EMAIL PROTECTED]> wrote:
>
> I want to send file with size 18M. But I send 10M and program blocking at
> method aos.write(buffer,0,read);
> When I restart program not broker, my program blocking after send 184 KB.
> When I restart program and broker I send only 10M again
>
> I use all standard properties to run activemq and creating connection
> factory
>
>
>                                         long start = 
> System.currentTimeMillis();
>                                         OutputStream aos = 
> ((ActiveMQConnection)
> connection).createOutputStream(dest);
>                                         FileInputStream fis = new 
> FileInputStream(new File("e:/vfp.jar"));
>                                         byte[] buffer = new byte[8 * 1024];
>                                         try {
>                                                 long countB = 0;
>                                                 int read = fis.read(buffer);
>                                                 while (read != -1) {
>                                                         
> aos.write(buffer,0,read);
>                                                         read = 
> fis.read(buffer);
>                                                         countB += read;
>                                                         if (countB % (1024 * 
> 1024) == 0)
>                                                                 
> System.out.println("write " + (int)(countB / (1024 * 1024)) + "
> mb");
>                                                 }
>                                         } catch (IOException e) {
>                                                 // обработка исключения
>                                                 e.printStackTrace();
>                                         } finally {
>                                                 try {
>                                                         aos.flush();
>                                                         aos.close();
>                                                         fis.close();
>                                                 } catch (IOException e) {
>                                                         // обработка 
> исключения
>                                                         e.printStackTrace();
>                                                 }
>                                         }
>                                         System.out.println("OK " + 
> (System.currentTimeMillis() - start));
> --
> View this message in context: 
> http://www.nabble.com/problem-with-streams-t1368296.html#a3669570
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Reply via email to