You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Jason Pell <ja...@pellcorp.com> on 2015/04/09 02:00:51 UTC

MTOM only when dealing with operations that have attachments

Hi,

If MTOM is enabled, its enabled for all operations, even those which have
no need for it.  Is this part of the standard, or would it be possible to
be smarter about when to enable it?

Ideally only operations that accept / return attachments should have MTOM
enabled (at least if this particular configuration was possible via a
property)

I already have a local hack to allow clients to disable mtom completely via
an accept header.  But wanted your thoughts before I introduce another hack
into our code, if a cleaner solution would be acceptable into cxf.

Re: MTOM only when dealing with operations that have attachments

Posted by Daniel Kulp <dk...@apache.org>.
> On Apr 8, 2015, at 8:00 PM, Jason Pell <ja...@pellcorp.com> wrote:
> If MTOM is enabled, its enabled for all operations, even those which have
> no need for it.  Is this part of the standard, or would it be possible to
> be smarter about when to enable it?
> 
> Ideally only operations that accept / return attachments should have MTOM
> enabled (at least if this particular configuration was possible via a
> property)
> 
> I already have a local hack to allow clients to disable mtom completely via
> an accept header.  But wanted your thoughts before I introduce another hack
> into our code, if a cleaner solution would be acceptable into cxf.

The issue is determining which operations can accept/return MTOM and which cannot.   I think mtom-enabled is a contextual property (if it isn’t, it could be) that COULD be set on a per-operation level.    It’s just a matter of getting it set when appropriate.


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com