You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Elmouj <fa...@bnpparibas.com> on 2007/09/07 19:31:21 UTC

Axis2 File Caching

I am using Axis2-1.2 and I am enabling file caching on both the Client and
the Server side using the following:

*************************************************************************
Server side through Axis2.xml

<axisconfig name="AxisJava2.0">

    <!-- ================================================= -->
    <!-- Parameters -->
    <!-- ================================================= -->
    <parameter name="cacheAttachments" locked="false">true</parameter>
    <parameter name="attachmentDIR" locked="false">temp
directory</parameter>

    <parameter name="sizeThreshold" locked="false">4000</parameter>
    .........
    .........
</axisconfig>


Enabling file caching for client side receiving by setting the Options as
follows.

options.setProperty(Constants.Configuration.CACHE_ATTACHMENTS,Constants.VALUE_TRUE);
options.setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR,TempDir);
options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, "4000");


*************************************************************************

The problem I am facing is that when the client is uploading a large file
and it suddenling reset the connection, and exception of "Error creating
temporary File" is triggered on the server side, a behaviour that is totaly
normal. HOWEVER, the file, the client is uploading (and axis2 is writting to
the disk) stays in the temporary directory specified in the Axis2.xml and
Axis doesn't delete it !!! (I know that temp files are not deleted by axis2
BUT I thought that this applies only for completed ones-the ones written to
the disk without any problem). Is there a solution so that I can get the
name of these files????

Tnx in advance.

Fahd. 
-- 
View this message in context: http://www.nabble.com/Axis2-File-Caching-tf4402803.html#a12560003
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 File Caching

Posted by Elmouj <fa...@bnpparibas.com>.

Sanka Samaranayke wrote:
> 
>>IMO, those in-completed files should be removed by Axis2 automatically.
Please 
>>log a JIRA.
> 
> I have posted this problem on the Apache JIRA forum before writting a JIRA
> report, but still I got no answer. However I am still wondering how to get
> the names of these files???? Does anybody have any idea!!!
> 
> 
> Fahd.
> 
> 
> -- 
> Sanka Samaranayake
> WSO2 Inc.
> 
> http://www.bloglines.com/blog/sanka
> http://www.wso2.org/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Axis2-File-Caching-tf4402803.html#a12610335
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 File Caching

Posted by Sanka Samaranayke <ss...@gmail.com>.
Elmouj wrote:
> I am using Axis2-1.2 and I am enabling file caching on both the Client and
> the Server side using the following:
>
> *************************************************************************
> Server side through Axis2.xml
>
> <axisconfig name="AxisJava2.0">
>
>     <!-- ================================================= -->
>     <!-- Parameters -->
>     <!-- ================================================= -->
>     <parameter name="cacheAttachments" locked="false">true</parameter>
>     <parameter name="attachmentDIR" locked="false">temp
> directory</parameter>
>
>     <parameter name="sizeThreshold" locked="false">4000</parameter>
>     .........
>     .........
> </axisconfig>
>
>
> Enabling file caching for client side receiving by setting the Options as
> follows.
>
> options.setProperty(Constants.Configuration.CACHE_ATTACHMENTS,Constants.VALUE_TRUE);
> options.setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR,TempDir);
> options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, "4000");
>
>
> *************************************************************************
>
> The problem I am facing is that when the client is uploading a large file
> and it suddenling reset the connection, and exception of "Error creating
> temporary File" is triggered on the server side, a behaviour that is totaly
> normal. HOWEVER, the file, the client is uploading (and axis2 is writting to
> the disk) stays in the temporary directory specified in the Axis2.xml and
> Axis doesn't delete it !!! (I know that temp files are not deleted by axis2
> BUT I thought that this applies only for completed ones-the ones written to
> the disk without any problem). 
IMO, those in-completed files should be removed by Axis2 automatically. Please 
log a JIRA.

Thanks,
Sanka


> Is there a solution so that I can get the
> name of these files????
>
> Tnx in advance.
>
> Fahd. 
>   


-- 
Sanka Samaranayake
WSO2 Inc.

http://www.bloglines.com/blog/sanka
http://www.wso2.org/


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


Re: Axis2 File Caching

Posted by Elmouj <fa...@bnpparibas.com>.
Hi Thilina,

>Hope you have replaced the above "temp directory" with a real directory.
Yes I'm using the real directory name :) . 
>You can get the name of the files through the FileDataSource which can
>be obtained by the DataHandler, provided if they are succesfully
>uploaded.
Yes, but I need to get it if they are NOT successfully downloaded
>IIRC somebody implemented (Samuel??) a mechanism to clean up the
>temporary files. I think that's in 1.3.. But I'm not sure whether that
>mechanism handles this situation.
I don't know this mechanism could you please provide more details?

Tnx for your concern,

Fahd
-- 
View this message in context: http://www.nabble.com/Axis2-File-Caching-tf4402803.html#a12617162
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 File Caching

Posted by Thilina Gunarathne <cs...@gmail.com>.
>     <!-- ================================================= -->
>     <!-- Parameters -->
>     <!-- ================================================= -->
>     <parameter name="cacheAttachments" locked="false">true</parameter>
>     <parameter name="attachmentDIR" locked="false">temp
> directory</parameter>
Hope you have replaced the above "temp directory" with a real directory.
>
>     <parameter name="sizeThreshold" locked="false">4000</parameter>
>     .........
>     .........
> </axisconfig>
>
>
> The problem I am facing is that when the client is uploading a large file
> and it suddenling reset the connection, and exception of "Error creating
> temporary File" is triggered on the server side, a behaviour that is totaly
> normal. HOWEVER, the file, the client is uploading (and axis2 is writting to
> the disk) stays in the temporary directory specified in the Axis2.xml and
> Axis doesn't delete it !!! (I know that temp files are not deleted by axis2
> BUT I thought that this applies only for completed ones-the ones written to
> the disk without any problem). Is there a solution so that I can get the
> name of these files????
You can get the name of the files through the FileDataSource which can
be obtained by the DataHandler, provided if they are succesfully
uploaded.

IIRC somebody implemented (Samuel??) a mechanism to clean up the
temporary files. I think that's in 1.3.. But I'm not sure whether that
mechanism handles this situation.

thanks,
Thilina
>
> Tnx in advance.
>
> Fahd.
> --
> View this message in context: http://www.nabble.com/Axis2-File-Caching-tf4402803.html#a12560003
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

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