users@glassfish.java.net

File transfer from client -> server

From: Morten O. Hansen <mortenoh_at_gmail.com>
Date: Wed, 22 Apr 2009 05:48:23 +0200

Hi

What would be the best way to transfer files from the client to the server?
I have looked at using JMS, and while this works.. it seems to break what
JMS is supposed to be used for. The files are between 100kb and 10mb, but
the system should be able to handle 1gb files if necessary.

The file would be put into a database on the server side, and ideally it
should be able to stream the file into a blob (but it doesnt seem that
java.sql.Blob is supported by JPA?).

Any hints on where to look would be appreciated, even just a confirmation
that JMS is the way to go here. The server should also report back how much
data is received, but that part is surely fitted for JMS.

Thanks!
Morten