Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Default identity used in JMSTopicTransportManager.createConnection(boolean)

The createConnection(boolean) method of JMSTopicTransportManager contains the following line of code:

 TopicConnection topicConnection = connectionFactory.createTopicConnection();

which invokes the no-argument variant of the TopicConnectionFactory>>createTopicConnection method, rather than the variant that takes a username and password (see http://java.sun.com/javaee/5/docs/api/javax/jms/TopicConnectionFactory.html).

My client has a business policy that precludes the use of the default/anonymous identity when creating topic connections, which has forced me to substitute an alternative JMSTopicTransportManager implementation (kind of painful).

The username and password values configured in the "jndi-naming-service" element of sessions.xml file are available in the context of JMSTopicTransportManager>>createConnection(boolean), via the getRemoteContextProperties() method inherited from TransportManager, so it certainly would be possible to use the 2-arg variant of the TopicConnectionFactory>>createTopicConnection method.

It would be helpful if the JMSTopicTransportManager could be configured, preferably via sessions.xml, to use the available username and password. I entered this into Bugzilla as an enhancement request, and have now changed it to a bug. (#254287)

What I'd like to know is whether there is some other way (beside substituting an alternative implementation of JMSTopicTransportManager) to accomplish this? If not, what is the recommended way to substitute an alternative implementation of JMSTopicTransportManager

Thanks,

Dave

--

==========
Dave Muirhead
dmuirhead@xxxxxxxxx

Back to the top