You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bperquku <bp...@gmail.com> on 2008/05/21 15:57:14 UTC

apache commons net

Hi all,

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.

Thnx.
-- 
View this message in context: http://www.nabble.com/apache-commons-net-tp17364248p17364248.html
Sent from the Commons - Dev mailing list archive at Nabble.com.


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


Re: apache commons net

Posted by James Carman <ja...@carmanconsulting.com>.
Yes, I'd use another directory.  So, during upload, you upload it to
the "uploading" directory.  When it's done uploading, move it to the
"inbox" directory.

On Thu, May 22, 2008 at 5:26 AM, Niklas Gustavsson <ni...@protocol7.com> wrote:
> On Thu, May 22, 2008 at 11:22 AM, bperquku <bp...@gmail.com> wrote:
>> Yes, it is FTP (ftp service runing under AIX is called proftpd).
>
> Then you'll have to do what James described. Either upload the file to
> a different directory or name and then move it when done. FTP has as
> far as I know no way of locking the file on the server.
>
> /niklas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

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


Re: apache commons net

Posted by bperquku <bp...@gmail.com>.
Thank you very much.


Niklas Gustavsson wrote:
> 
> On Thu, May 22, 2008 at 11:22 AM, bperquku <bp...@gmail.com> wrote:
>> Yes, it is FTP (ftp service runing under AIX is called proftpd).
> 
> Then you'll have to do what James described. Either upload the file to
> a different directory or name and then move it when done. FTP has as
> far as I know no way of locking the file on the server.
> 
> /niklas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/apache-commons-net-tp17364248p17400637.html
Sent from the Commons - Dev mailing list archive at Nabble.com.


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


Re: apache commons net

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Thu, May 22, 2008 at 11:22 AM, bperquku <bp...@gmail.com> wrote:
> Yes, it is FTP (ftp service runing under AIX is called proftpd).

Then you'll have to do what James described. Either upload the file to
a different directory or name and then move it when done. FTP has as
far as I know no way of locking the file on the server.

/niklas

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


Re: apache commons net

Posted by bperquku <bp...@gmail.com>.
Yes, it is FTP (ftp service runing under AIX is called proftpd).

Niklas Gustavsson wrote:
> 
> On Thu, May 22, 2008 at 9:18 AM, bperquku <bp...@gmail.com> wrote:
>>
>> Actually, name of the file is not relevant. The server process check for
>> files (not for names) and is implemented by someone else (i dont have
>> source
>> code).
> 
> You didn't mention what protocol you are using, is it FTP?
> 
> /niklas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/apache-commons-net-tp17364248p17400551.html
Sent from the Commons - Dev mailing list archive at Nabble.com.


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


Re: apache commons net

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Thu, May 22, 2008 at 9:18 AM, bperquku <bp...@gmail.com> wrote:
>
> Actually, name of the file is not relevant. The server process check for
> files (not for names) and is implemented by someone else (i dont have source
> code).

You didn't mention what protocol you are using, is it FTP?

/niklas

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


Re: apache commons net

Posted by bperquku <bp...@gmail.com>.
Actually, name of the file is not relevant. The server process check for
files (not for names) and is implemented by someone else (i dont have source
code).

jwcarman wrote:
> 
> Name it something different during upload.  When it's finished, do a
> rename.  For instance, while you're uploading, name the file
> myfile.uploading and then when it's done, just rename it to myfile.
> 
> 
> On Wed, May 21, 2008 at 9:57 AM, bperquku <bp...@gmail.com> wrote:
>>
>> Hi all,
>>
>> 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.
>>
>> Thnx.
>> --
>> View this message in context:
>> http://www.nabble.com/apache-commons-net-tp17364248p17364248.html
>> Sent from the Commons - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/apache-commons-net-tp17364248p17398725.html
Sent from the Commons - Dev mailing list archive at Nabble.com.


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


Re: apache commons net

Posted by James Carman <ja...@carmanconsulting.com>.
Name it something different during upload.  When it's finished, do a
rename.  For instance, while you're uploading, name the file
myfile.uploading and then when it's done, just rename it to myfile.


On Wed, May 21, 2008 at 9:57 AM, bperquku <bp...@gmail.com> wrote:
>
> Hi all,
>
> 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.
>
> Thnx.
> --
> View this message in context: http://www.nabble.com/apache-commons-net-tp17364248p17364248.html
> Sent from the Commons - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

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