You should be able to embed a custom jms endpoint inside your SU
along with your serialized object class.  In the SU, you will need
to add a <classpath><location>.</location></classpath> tag
which will include the SU in the classpath.

To override the default behavior, you can
 * create a custom processor and register it using
    META-INF/services/org/apache/servicemix/jms/custom
   and reference it
       <jms:endpoint processorName="custom" ... />
   The custom file is a property file which should include:
     consumer=org.apache.servicemix.jms.jca.JcaConsumerProcessor

 * create a class derived from the JmsEndpoint and use it
       instead of the <jbi:endpoint /> tag.  Remember that
       the xbean.xml file is just an enhanced spring file,
      so you can just use plain spring.

The other way is to use the lightweight jms component and
provide a custom org.apache.servicemix.components.jms.JmsMarshaler
implementation.  This will be easier.  The marshaler layer has not
been backported to servicemix-jms yet :(

On 9/7/06, mwhs <[EMAIL PROTECTED]> wrote:


In my case, I must integrate an out-of-house component which occasionally
sends object messages to a JMS topic. No chance to marshal this inside the
component.

Is there a best practice for that?


gnodet wrote:
>
> The problem with this solution is that you tie the jms BC to
> the marshalling layer, which is not a good thing, imho.
>
> You could use xstream to marshal your pojo to xml in
> your component instead.
>
> Note that I do understand that for performance reasons,
> one would not want to marshal / unmarshal pojos
> between SE invocations and keep the pojo form.
> ServiceMix has some features to support that, but
> they are not used by standard jbi components.
>
> On 9/7/06, mwhs <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> Wouldn't it be possible to marshal the payload of an object message to
an
>> xml structure using xstream for instance?
>>
>> A feature I am definitly missing is the possibility to operate on my
>> pojos/beans when I transform or enrich a message. Is this planned in a
>> future version?
>>
>> Best regards,
>> Martin
>>
>>
>> gnodet wrote:
>> >
>> > Do you have any idea how you would map a
>> > MapMessage / ObjectMessage to a JBI
>> > normalized message.  I haven't thought
>> > about it yet ...
>> >
>> > On 9/7/06, johper <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Tried sending MapMessage to Servicemix for routing it from
JBoss-queue
>> to
>> >> another JBoss-queue with ServiceMix jms consumer/provider pair,
>> getting:
>> >> 2006-09-07 10:33:30,363 ERROR
>> >> [
org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor]
>> >> [...]
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> >
>> >
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/MapMessage-and-or-ObjectMessage-tf2226788.html#a6187531
>> Sent from the ServiceMix - User forum at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>

--
View this message in context:
http://www.nabble.com/MapMessage-and-or-ObjectMessage-tf2226788.html#a6187726
Sent from the ServiceMix - User forum at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to