How do I use connection factories?
I am using IMQ for a use case, i have three question for imq:
1.I make a broker or connection factory for all of my use case, or i make more
brokers or connection factories for functions in one use case? if i don't use
object store,when i send a msg i will create a connection factory every time?
2.when i send a msg to a special user i want only, will i create a new Queue
for the user dynamically? if not, how can I do?
3. when i send a msg to many users,will i create a new Topic or publish to a
used Topic?
1. Connection factory encapsulates configurations for creating connection objects.
If all of your use case use same configurations for connection to broker, then
you can use one connection factory to create all your connections.
2. You can also use message properties and selectors .. please see
http://webmirror.sfbay.sun.com/products/jms/tutorial on Message Selectors.
If your concern is in security sense, you can use access controls. Please see iMQ 2.0 Administration Guide.
3. Depends on your application. Generally many users would subscriber to a
topic and the publisher will publish messages to the topic. JMS specification
and http://webmirror.sfbay.sun.com/products/jms/tutorial on Publish/Subscribe
Message Domain may help to clarify some of the concepts.