Re: Nested MapMessage

2006-08-02 Thread jhakim

Thanks for adding this feature. I am sure it is going to be heavily used. BTW
- can you point me to where I can I download ActiveMQ 4.1?
-- 
View this message in context: 
http://www.nabble.com/Nested-MapMessage-tf1788442.html#a5617829
Sent from the ActiveMQ - Dev forum at Nabble.com.



Re: Nested MapMessage

2006-06-16 Thread jhakim

Clearly both setObject(name, map) and setObject(name, mapMsg) work. As you
correctly point out, using a hierarchical naming scheme would allow the
client to specify nesting and works with any MOM.

However, I would argue that forcing clients to write code to create/parse a
hierarchical naming scheme defeats the key goal of ease of use.

For instance, suppose one wants to create a framework for marshaling
arbitrary beans to JMS messages. A logical implmentation would be to use
reflection to discover bean properties and create a corresponding
MapMessage. Now, suppose that a bean contains other beans as properties. One
elegant approach would to marshal each bean property to a  nested
MapMessage. This exact strategy is used by many systems on Wall Street and
by open-source projects (messageforge.sourceforge.net).

BTW - the underlying JMS provider can, beneath the covers, use hierarchical
naming schemes and strip off properties from nested messages. As far as the
client is concerned, this should just be an implementation detail and not
the required way for clients to use the MOM.
--
View this message in context: 
http://www.nabble.com/Nested-MapMessage-t1788442.html#a4902932
Sent from the ActiveMQ - Dev forum at Nabble.com.



Re: Nested MapMessage

2006-06-16 Thread jhakim

Unfortunately, ObjectMessage does not work across heterogenous environments 
- I see lots of systems being built nowdays with C# clients and Java
servers.
--
View this message in context: 
http://www.nabble.com/Nested-MapMessage-t1788442.html#a4903443
Sent from the ActiveMQ - Dev forum at Nabble.com.



Re: Nested MapMessage

2006-06-14 Thread jhakim

One could allow Map or MapMessage or both as the second argument. The real
issue is that nested MapMessage should be allowed. I have no quibble with a
JMS provider allowing a Map as the second argument - as long as MapMessage
entries were accepted. 
--
View this message in context: 
http://www.nabble.com/Nested-MapMessage-t1788442.html#a4877006
Sent from the ActiveMQ - Dev forum at Nabble.com.



Re: Nested MapMessage

2006-06-14 Thread jhakim

There are a lot of real-world applications that need the ability to send
structured data via JMS. 

For example, take an application that wants to publish a portfolio of bonds
(or stocks - take your pick). The logical way to do it would be to have a
portfolio container message with zero or more (nested) bond messages. The
alternative, breaking a portfolio into a series of bond messages, is VERY
cumbersome and requires that the consumer reconstruct the portfolio.

This is but one instance of a real-world need to publish arbitrary message
structures. Nested MapMessage addresses this need directly and elegantly.


--
View this message in context: 
http://www.nabble.com/Nested-MapMessage-t1788442.html#a4877171
Sent from the ActiveMQ - Dev forum at Nabble.com.



Re: Nested MapMessage

2006-06-14 Thread jhakim

Yes. 

MapMessage has the same power and flexibility as XML (the universal
self-describing data structure) as long as arbitrary nesting is allowed.
Take away nesting and MapMessage becomes a very simplistic structure that
cannot easily handle real-world application needs. 

In recognition of this fact, many vendors allow nesting of MapMessage - e.g.
TIBCO EMS. Some vendors, such as SonicMQ provide proprietary APIs when it
comes to nesting. This, in my opinion, is a very poor design strategy
because it binds clients too closely with the vendor API.
--
View this message in context: 
http://www.nabble.com/Nested-MapMessage-t1788442.html#a4873966
Sent from the ActiveMQ - Dev forum at Nabble.com.



Re: Nested MapMessage

2006-06-14 Thread jhakim

The JMS MapMessage API already contains the method setObject(name, val). For
nested MapMessage, the second argument - val - would simply be a MapMessage.
No need to clutter the API with yet another method. By the way, this is just
what TIBCO EMS provides.
--
View this message in context: 
http://www.nabble.com/Nested-MapMessage-t1788442.html#a4875002
Sent from the ActiveMQ - Dev forum at Nabble.com.