You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by indika kumara <in...@gmail.com> on 2010/02/17 11:22:23 UTC

Supporting JMS Object Messages

Hi All

I have attached herewith a patch to support Object Messages. What I did is
as follows

1)   Add a content type rule as follows

              <parameter name="transport.jms.ContentType">

                      <rules>


<objectMessage>application/java-serialized-object</objectMessage>

                        </rules>

                </parameter>

Even there is no content type for Java object messages, I have to specify
one due to fact the JMS message receiver validates the content type.
Furthermore, if there is content type, we can specify message builder /
formatters.

2)      When an Object message is received, it is wrapped with an
ObjectDataSource and processed by the ObjectMessageBuilder. Within the
ObjectMessageBuilder , if the content type is
‘’application/java-serialized-object" , It just wraps the ObjectDataSource
using a DataHandler. The actual object can be accessed directly through the
ObjectDataSource.  This is useful for Apache Synapse as a mediator can
access the object directly and do whatever it needs. If the content type is
something other than ‘’application/java-serialized-object”, selects the
correct builder for the content type and build the java object with it by
giving object as an XML stream. I here used XML Encoder... I will change it
later.

3)      When sending Object Messages, within the JMS transport, the object
can be directly accessed from the ObjectDataSource.  For other transport, if
it is useful, ObjectMessageFormatter can be used.At later, I can improve
ObjectDataSource to rerun the representation of Object based on the content
type.  E.g. XML, byte, etc… representations

Any feedback is welcome. I will improve as per any suggestions and update
the patch and also create a JIRA .

Thanks

Indika

Re: Supporting JMS Object Messages

Posted by indika kumara <in...@gmail.com>.
Andreas

I have created a JIRA ticket [1] and attached the path there.

Thanks
Indika

[1] https://issues.apache.org/jira/browse/WSCOMMONS-525

On Thu, Feb 18, 2010 at 1:21 AM, Andreas Veithen
<an...@gmail.com> wrote:
> That is probably because GMail is smart enough to show your original
> mail instead of the message received from the mailing list. The
> mailing list manager definitely removes attachments. See [1].
>
> [1] http://markmail.org/thread/mzjqhlqpjmmdaofs
>
> On Wed, Feb 17, 2010 at 14:38, indika kumara <in...@gmail.com> wrote:
>> Andreas ,
>>
>> I can download the attached patch... BTW , I am attaching it again.
>>
>> Thanks
>> Indika
>>
>> On Wed, Feb 17, 2010 at 6:39 PM, Andreas Veithen
>> <an...@gmail.com> wrote:
>>>
>>> Indika,
>>>
>>> Somehow the attachment got lost...
>>>
>>> Andreas
>>>
>>> On Wed, Feb 17, 2010 at 11:22, indika kumara <in...@gmail.com> wrote:
>>> > Hi All
>>> >
>>> > I have attached herewith a patch to support Object Messages. What I did is
>>> > as follows
>>> >
>>> > 1)   Add a content type rule as follows
>>> >
>>> >               <parameter name="transport.jms.ContentType">
>>> >
>>> >                       <rules>
>>> >
>>> >
>>> > <objectMessage>application/java-serialized-object</objectMessage>
>>> >
>>> >                         </rules>
>>> >
>>> >                 </parameter>
>>> >
>>> > Even there is no content type for Java object messages, I have to specify
>>> > one due to fact the JMS message receiver validates the content type.
>>> > Furthermore, if there is content type, we can specify message builder /
>>> > formatters.
>>> >
>>> > 2)      When an Object message is received, it is wrapped with an
>>> > ObjectDataSource and processed by the ObjectMessageBuilder. Within the
>>> > ObjectMessageBuilder , if the content type is
>>> > ‘’application/java-serialized-object" , It just wraps the ObjectDataSource
>>> > using a DataHandler. The actual object can be accessed directly through the
>>> > ObjectDataSource.  This is useful for Apache Synapse as a mediator can
>>> > access the object directly and do whatever it needs. If the content type is
>>> > something other than ‘’application/java-serialized-object”, selects the
>>> > correct builder for the content type and build the java object with it by
>>> > giving object as an XML stream. I here used XML Encoder... I will change it
>>> > later.
>>> >
>>> > 3)      When sending Object Messages, within the JMS transport, the object
>>> > can be directly accessed from the ObjectDataSource.  For other transport, if
>>> > it is useful, ObjectMessageFormatter can be used.At later, I can improve
>>> > ObjectDataSource to rerun the representation of Object based on the content
>>> > type.  E.g. XML, byte, etc… representations
>>> >
>>> > Any feedback is welcome. I will improve as per any suggestions and update
>>> > the patch and also create a JIRA .
>>> >
>>> > Thanks
>>> >
>>> > Indika
>>
>

Re: Supporting JMS Object Messages

Posted by Andreas Veithen <an...@gmail.com>.
That is probably because GMail is smart enough to show your original
mail instead of the message received from the mailing list. The
mailing list manager definitely removes attachments. See [1].

[1] http://markmail.org/thread/mzjqhlqpjmmdaofs

On Wed, Feb 17, 2010 at 14:38, indika kumara <in...@gmail.com> wrote:
> Andreas ,
>
> I can download the attached patch... BTW , I am attaching it again.
>
> Thanks
> Indika
>
> On Wed, Feb 17, 2010 at 6:39 PM, Andreas Veithen
> <an...@gmail.com> wrote:
>>
>> Indika,
>>
>> Somehow the attachment got lost...
>>
>> Andreas
>>
>> On Wed, Feb 17, 2010 at 11:22, indika kumara <in...@gmail.com> wrote:
>> > Hi All
>> >
>> > I have attached herewith a patch to support Object Messages. What I did is
>> > as follows
>> >
>> > 1)   Add a content type rule as follows
>> >
>> >               <parameter name="transport.jms.ContentType">
>> >
>> >                       <rules>
>> >
>> >
>> > <objectMessage>application/java-serialized-object</objectMessage>
>> >
>> >                         </rules>
>> >
>> >                 </parameter>
>> >
>> > Even there is no content type for Java object messages, I have to specify
>> > one due to fact the JMS message receiver validates the content type.
>> > Furthermore, if there is content type, we can specify message builder /
>> > formatters.
>> >
>> > 2)      When an Object message is received, it is wrapped with an
>> > ObjectDataSource and processed by the ObjectMessageBuilder. Within the
>> > ObjectMessageBuilder , if the content type is
>> > ‘’application/java-serialized-object" , It just wraps the ObjectDataSource
>> > using a DataHandler. The actual object can be accessed directly through the
>> > ObjectDataSource.  This is useful for Apache Synapse as a mediator can
>> > access the object directly and do whatever it needs. If the content type is
>> > something other than ‘’application/java-serialized-object”, selects the
>> > correct builder for the content type and build the java object with it by
>> > giving object as an XML stream. I here used XML Encoder... I will change it
>> > later.
>> >
>> > 3)      When sending Object Messages, within the JMS transport, the object
>> > can be directly accessed from the ObjectDataSource.  For other transport, if
>> > it is useful, ObjectMessageFormatter can be used.At later, I can improve
>> > ObjectDataSource to rerun the representation of Object based on the content
>> > type.  E.g. XML, byte, etc… representations
>> >
>> > Any feedback is welcome. I will improve as per any suggestions and update
>> > the patch and also create a JIRA .
>> >
>> > Thanks
>> >
>> > Indika
>

Re: Supporting JMS Object Messages

Posted by indika kumara <in...@gmail.com>.
Andreas ,

I can download the attached patch... BTW , I am attaching it again.

Thanks
Indika

On Wed, Feb 17, 2010 at 6:39 PM, Andreas Veithen
<an...@gmail.com> wrote:
>
> Indika,
>
> Somehow the attachment got lost...
>
> Andreas
>
> On Wed, Feb 17, 2010 at 11:22, indika kumara <in...@gmail.com> wrote:
> > Hi All
> >
> > I have attached herewith a patch to support Object Messages. What I did is
> > as follows
> >
> > 1)   Add a content type rule as follows
> >
> >               <parameter name="transport.jms.ContentType">
> >
> >                       <rules>
> >
> >
> > <objectMessage>application/java-serialized-object</objectMessage>
> >
> >                         </rules>
> >
> >                 </parameter>
> >
> > Even there is no content type for Java object messages, I have to specify
> > one due to fact the JMS message receiver validates the content type.
> > Furthermore, if there is content type, we can specify message builder /
> > formatters.
> >
> > 2)      When an Object message is received, it is wrapped with an
> > ObjectDataSource and processed by the ObjectMessageBuilder. Within the
> > ObjectMessageBuilder , if the content type is
> > ‘’application/java-serialized-object" , It just wraps the ObjectDataSource
> > using a DataHandler. The actual object can be accessed directly through the
> > ObjectDataSource.  This is useful for Apache Synapse as a mediator can
> > access the object directly and do whatever it needs. If the content type is
> > something other than ‘’application/java-serialized-object”, selects the
> > correct builder for the content type and build the java object with it by
> > giving object as an XML stream. I here used XML Encoder... I will change it
> > later.
> >
> > 3)      When sending Object Messages, within the JMS transport, the object
> > can be directly accessed from the ObjectDataSource.  For other transport, if
> > it is useful, ObjectMessageFormatter can be used.At later, I can improve
> > ObjectDataSource to rerun the representation of Object based on the content
> > type.  E.g. XML, byte, etc… representations
> >
> > Any feedback is welcome. I will improve as per any suggestions and update
> > the patch and also create a JIRA .
> >
> > Thanks
> >
> > Indika

Re: Supporting JMS Object Messages

Posted by Andreas Veithen <an...@gmail.com>.
Indika,

Somehow the attachment got lost...

Andreas

On Wed, Feb 17, 2010 at 11:22, indika kumara <in...@gmail.com> wrote:
> Hi All
>
> I have attached herewith a patch to support Object Messages. What I did is
> as follows
>
> 1)   Add a content type rule as follows
>
>               <parameter name="transport.jms.ContentType">
>
>                       <rules>
>
>
> <objectMessage>application/java-serialized-object</objectMessage>
>
>                         </rules>
>
>                 </parameter>
>
> Even there is no content type for Java object messages, I have to specify
> one due to fact the JMS message receiver validates the content type.
> Furthermore, if there is content type, we can specify message builder /
> formatters.
>
> 2)      When an Object message is received, it is wrapped with an
> ObjectDataSource and processed by the ObjectMessageBuilder. Within the
> ObjectMessageBuilder , if the content type is
> ‘’application/java-serialized-object" , It just wraps the ObjectDataSource
> using a DataHandler. The actual object can be accessed directly through the
> ObjectDataSource.  This is useful for Apache Synapse as a mediator can
> access the object directly and do whatever it needs. If the content type is
> something other than ‘’application/java-serialized-object”, selects the
> correct builder for the content type and build the java object with it by
> giving object as an XML stream. I here used XML Encoder... I will change it
> later.
>
> 3)      When sending Object Messages, within the JMS transport, the object
> can be directly accessed from the ObjectDataSource.  For other transport, if
> it is useful, ObjectMessageFormatter can be used.At later, I can improve
> ObjectDataSource to rerun the representation of Object based on the content
> type.  E.g. XML, byte, etc… representations
>
> Any feedback is welcome. I will improve as per any suggestions and update
> the patch and also create a JIRA .
>
> Thanks
>
> Indika