Hi Oleg,Apologies for been this late to reply...

There is a little catch that you might need to consider.. Axis2 MIME parsing
works similar to StAX. Axis2 MIME parser does differed parsing of the MIME
messages. It parses MIME parts only when needed and requested by the AXIOM
model. Axiom requests the contents of the attachments only when somebody
reads the contents of the corresponding OMText object (not when it creates
the object model). So altogether when using MTOM+ Axiom it's a double
layer differed parsing, differed parsing of XML & differed parsing of
Attachments. But to be honest I'm not sure whether there are any people
taking advantage of this.. One reason for us not use the JavaMail was it's
inability to do differed MIME parsing..
Also Axis2 supports streaming of attachments. That means somebody can
directly stream the attachments stream from the input to the output. This
comes handy when proxying or mediating. This case might become unusable (I
can't really remember how it works now :(.. ) if we read and parse the whole
MIME message.. Once again I'm not sure whether people really use it
(Synapse??)..

All and all I believe the ability to differed parse MIME attachments will be
a good feature for MIME4J too..

thanks,
Thilina

On Wed, Sep 17, 2008 at 1:06 PM, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:

>
> Thilina,
>
> Mime4j parser works similarly to SAX. It is an event based API. One can
> provide a custom handler implementing a particular custom processing
> logic in response to appearance of a certain MIME element in the data
> stream, such as a MIME header or a content part.
>
> Oleg
>
> > thanks,
> > Thilina
> >
> >
> > > Oleg Kalnichevski wrote:
> > >
> > >> Folks,
> > >>
> > >> Would there be any interest in a SwA implementation based on Apache
> > >> mime4j [1]? Mime4j can handle very complex MIME messages, is
> reasonably
> > >> fast, and, most importantly, can stream complex MIME messages in and
> out
> > >> with a predictable memory footprint (using just a small internal
> buffer
> > >> of a constant length)
> > >> I _personally_ find Java Activation API pretty suboptimal and would
> like
> > >> Axiom to provide an alternative API based on a fully streamable model.
> > >> Let me know what you think.
> > >>
> > >> Oleg
> > >>
> > >> [1] http://james.apache.org/mime4j/index.html
> > >>
> > >>
> > >>
> > > --
> > > Sanjiva Weerawarana, Ph.D.
> > > Founder & Director; Lanka Software Foundation;
> http://www.opensource.lk/
> > > Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
> > > Member; Apache Software Foundation; http://www.apache.org/
> > > Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
> > >
> > > Blog: http://sanjiva.weerawarana.org/
> > >
> >
> >
> >
>
>


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

Reply via email to