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 ?
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/