On Feb 4, 2011, at 11:22 AM, Rajith Attapattu wrote:
> Hi,
>
> Some Qpid users like to create connections and destinations dynamically
> instead of using the jndi.properties file.
> All though there is a reasonable way of creating Queues and Topics using
> session.createQueue and session.createTopic respectively, there is currently
> no proper way of creating connections.
>
> Therefore people resort to using AMQConnection class., which is less than
> ideal.
> Chances are that this class can change, get deprecated in favour of a better
> implementation etc.. in a future release.
>
> Perhaps we should provide a stable API for creating connections without
> having to use internal implementation specific classes for folks who want to
> do it dynamically.
> Maybe something along the lines of,
>
> Qpid {
>
> public javax.jms.ConnectionFactory createConnectionFactory(String user,
> String password);
>
> public javax.jms.ConnectionFactory createConnectionFactory(String url);
>
> public javax.jms.Connection createConnection(String user, String password);
>
> public javax.jms.Connection createConnection(String url);
>
> public javax.jms.Destination(String addr);
>
> }
>
> That way we can shield a Qpid user from changes in a reasonable way.
> However we need to impress upon our users that the preferred way is to use
> the JNDI mechanism.
> On the other hand users could use the above mechanism to create connections
> and destinations and inject them into their preferred JNDI mechanism rather
> than using our JNDI implementation.
>
> Thoughts ?
>
Seems reasonable. The JMS spec even allows for this, in that while JNDI is
recommended via admin objects, nothing forces it's use. Seems like a reasonable
feature for our clients that don't want to contend with JNDI.
Regards,
Weston
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]