users@jersey.java.net

Re: [Jersey] Cleanup of jersey-multipart BodyPartEntity data

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 18 Feb 2009 10:36:28 +0100

On Feb 18, 2009, at 8:22 AM, Craig McClanahan wrote:

> Andrew R Feller wrote:
>>
>>
>> Any idea when a 1.0.2 STABLE release of jersey-multipart will be
>> available?
> After double checking with Paul (d'oh, because I was looking cross-
> eyed and didn't see it :-), jersey-multipart 1.0.2 is indeed in the
> appropriate Maven repository:
>
> http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-multipart/1.0.2/
>

Also see the dependencies document:

   https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.2/jersey/dependencies.html

This is referenced from the main Jersey project page (click on the
download icon). That an previous versions are also referenced here:

   https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.2/jersey/dependencies.html

Paul.

> If you're using Maven, you can declare a dependency on it like this:
>
> <dependency>
> <groupId>com.sun.jersey.contribs</groupId>
> <artifactId>jersey-multipart</artifactId>
> <version>1.0.2</version>
> </dependency>
>
> as long as you have the java.net Maven repository defined in your
> POM (which you'd need to get the rest of Jersey anyway). Otherwise,
> the above link is the right starting point for downloading the JAR.
>


> Craig
>
>
>> Great work; keep it up!
>>
>> Andrew
>>
>> --
>> Andrew Feller, Analyst
>> LSU University Information Services
>> 200 Frey Computing Services Center
>> Baton Rouge, LA 70803
>> Office: 225.578.3737
>> Fax: 225.578.6400
>>
>> From: Craig McClanahan [mailto:Craig.McClanahan_at_Sun.COM]
>> Sent: Tue 2/17/2009 3:23 PM
>> To: users_at_jersey.dev.java.net
>> Subject: Re: [Jersey] Cleanup of jersey-multipart BodyPartEntity data
>>
>> Andrew Feller wrote:
>>>
>>> SCENARIO: Issuing multipart POST request to Jersey REST web
>>> service with multiple file attachments; file attachments being
>>> stored to disk in java.io.temp directory and not being cleaned up
>>> ENVIRONMENT: Windows 2000, Java 6, Tomcat 6.0, jersey-bundle-1.0.1
>>> SNAPSHOT, jersey-multipart-1.0.1 SNAPSHOT
>>>
>>> I am looking to upgrade to the latest versions of the Jersey
>>> bumdle and multipart, but I wanted to bring this up. I know from
>>> an earlier post ( http://n2.nabble.com/Problem-saving-binary-data-using-Jersey-multipart-td2242402.html
>>> ) that jersey-multipart will store data exceeding the buffer size
>>> to file, however I would like these files cleaned up at the end of
>>> a request.
>>>
>> Are you calling multiPart.cleanup() after you have processed the
>> contents? That will cause the temporary files to be cleaned up.
>>
>> And yes, it is unfortunate that the application developer has to
>> remember to do this, but a better solution is not known at this time.
>>> Thoughts?
>>>
>>> Thanks,
>>> Andrew
>> Craig
>>
>>>
>>> --
>>> Andrew Feller, Analyst
>>> LSU University Information Services
>>> 200 Frey Computing Services Center
>>> Baton Rouge, LA 70803
>>> Office: 225.578.3737
>>> Fax: 225.578.6400
>>
>