users@jax-rpc.java.net

Re: Re: DataHandler OutOfMemory problem

From: Martin Marinschek <martin.marinschek_at_gmail.com>
Date: Thu, 16 Dec 2004 10:33:17 +0100

There was no resolution whatsoever in my case,

what I did was to break up the files I am streaming, not a great solution.

maybe this time we get a little further...

regards,

Martin


On Thu, 16 Dec 2004 09:30:40 -0000, Ian Jones <ijones_at_piper-group.com> wrote:
> Martin,
>
> Having looked through the mailing list archives a bit more closely I
> noticed you indeed posted a very similar mail to mine some time ago
> about all of this.
>
> However there didn't seem to be any real conclusion at the end of it -
> unless I missed it! Did you get around the problem in the end? If so,
> could you tell me what you did.
>
> For everyone: Is it, simply, the case that DataHandler in JAX RPC isn't
> really designed for very large file transfer? In which case what is the
> recommended way of transferring files? An obvious alternative is to
> just use plain sockets to stream the file directly but this is not as
> neat as just using the JAX RPC service for everything.
>
> Many thanks for any help or pointers,
>
> Ian.
>
> -----Original Message-----
> From: Martin Marinschek [mailto:martin.marinschek_at_gmail.com]
> Sent: 15 December 2004 11:43
> To: users_at_jax-rpc.dev.java.net
> Subject: Re: DataHandler OutOfMemory problem
>
> I was having the same problem - the answer so far was that the
> datahandler stream is at some time read into some memory structure;
> and therefore streaming is not entirely possible.
>
> If there is any solution someone comes up with for that I would be
> very interested, too!
>
> regards
>
> Martin
>
> On Wed, 15 Dec 2004 11:15:29 -0000, Ian Jones <ijones_at_piper-group.com>
> wrote:
> >
> >
> >
> > Hi all,
> >
> >
> >
> > I'm using a DataHandler to download a file from our server to a local
> PC.
> > This is working fine until the files get relatively large, e.g. I'm
> > currently attempting to transfer a zipped up file that is about 30Mb,
> and
> > then I the client reports an OutOfMemory error.
> >
> >
> >
> > Here's a code snippet of the point in the code where the error is
> occurring:
> >
> >
> >
> > logger.info("Requesting file");
> >
> >
> >
> > // ask for the file here
> >
> > DataHandler dh = client.getFile(filePath);
> >
> >
> >
> > logger.info("Got data handler");
> >
> >
> >
> > I get the first log message - "Requesting file" - and then the error.
> So it
> > is the retrieval of the DataHandler from the server, by calling
> > client.getFile() above, that is causing the error. The getFile()
> method on
> > the server simply does this:
> >
> >
> >
> > public DataHandler getFile(String filename) throws RemoteException
> {
> >
> > return new DataHandler(new FileDataSource(new
> File(filename)));
> >
> > }
> >
> >
> >
> > I've increased the heap size of the java process running the client
> and this
> > stops the problem occurring. Is this the only way to stop this
> happening?
> > Or could I be doing something incorrectly to cause this problem? I
> need to
> > be able to deal with transferring files up to about 500Mb.
> >
> >
> >
> > Any help will be greatly appreciated.
> >
> >
> >
> > Ian Jones
> >
> > Senior Analyst Developer
> >
> > Piper Group plc
> >
> > Email: ijones_at_piper-group.com
> >
> > Tel: + 44 (0) 1454 284900
> >
> > Fax: + 44 (0) 1454 284950
> >
> > www.piper-group.com
> >
> >
> >
> > Information contained in this e-mail is intended for the use of the
> > addressee only, and is confidential and may be the subject of legal
> > professional privilege. Any dissemination, distribution, copying or
> use of
> > this communication without permission of the addressee is strictly
> > prohibited. The views expressed in this communication may not
> necessarily be
> > the views held by Piper Group plc.
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net