commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: apache commons net
Date Wed, 21 May 2008 15:07:31 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bperquku,

bperquku wrote:
| I have a simple java applicatoion, that uploads a file in a computer
server
| (aix). In the server another process  checks for that file, processes it,
| and deletes it.
|
| Is there any possible way to set a lock in file that will be uploaded,
| because if the file size is big ex. 200 MB the process on server will
delete
| my file before my application finished uploading.

Are you able to modify either the client or the server? I would include
some kind of file signature so that the server can verify that the file
has been uploaded correctly.

We do this with our daily backups: we include a SHA signature file with
all backup files, and when we copy files, we copy the data first, then
the signature. So, if you see a data file with not signature, you can be
(relatively) sure that the upload has not completed. Once the sig file
appears (and is the correct size), you can run your checksumming
function against the data file to make sure that the transfer has
completed successfully.

After that has been verified, you can proceed with your data processing.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkg0OrMACgkQ9CaO5/Lv0PBgQgCgszrOYoZb5D603cuZiSullVzz
u50An0r6GC+l+pWOZk2bvAr4WhkYySeo
=xkSA
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message