Thanks, Glen and Steve
I fonund out that the threshold is set by ManagedMemoryDataSource constructor and
it is instantiated in AttachmentPart (line 420 in 1.1beta source).
The second prameter of that constructor "maxCached" which is hard-coded value 1024.
(ManagedMemoryDataSource.MAX_MEMORY_DISK_CACHED seems not to affect the threshold, I
think)
The easiest way seems to modify that hard coded value to another.
But it should be configurable by the property of MessageContext.
I would modify so if I could...
Thanks,
----
Yoshi
---- Original Message -----
From: "Glen Daniels" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 05, 2003 1:39 PM
Subject: RE: attachment temporary files
>
> It appears there are hard coded values for this speckled in various places
>throughout the source, and the default
seems to be 16K (ManagedMemoryDataSource.MAX_MEMORY_DISK_CACHED). This definitely
seems like something that should be
configurable.
>
> It would be quick and easy to enable a JVM-wide setting for this, by adding a static
>getter/setter in the
ManagedMemoryDataSource class and setting the value when an engine's
<globalConfiguration> is read. However, a better
solution would be to allow the default to be set on a per-engine or per-service basis.
Please feel free to try this out
and submit a patch.
>
> (essentially at some point someone creates one of these things in the context of an
>engine invocation. That means a
MessageContext is active, which means properties are available. The
"attachments.MaxBytesBeforeCaching" property (or
whatever) could be used, if present, to set the field rather than the default or hard
coded values)
>
> --Glen
>
> > -----Original Message-----
> > From: Eiji Yoshida [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, February 04, 2003 10:31 PM
> > To: [EMAIL PROTECTED]
> > Subject: attachment temporary files
> >
> >
> > Hi, everyone
> >
> > I have a question about attachment temporary files.
> > When SOAP message wtih attachment is sent, Axis
> > generates the attachment files into
> > %TOMCAT_HOME%\axis\WEB-INF\attachments directory
> > according to attachment size.
> > If the size of attachment exceeds 1024B, its temporary file
> > is generated.
> >
> > I'd like to change the limitation of attachment size which
> > is threshold of generating temporary files.
> > To change the limitation, I must modify axis source code?
> > (ref. AttachmentPart.java, ManagedMemoryDataSource.java)
> >
> > Or do anyone know the other solution?
> >
> > Thanks in advance,
> >
> > ------
> > Yoshi
> >
>