-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSLContext is overridden with default #12
Comments
@lukehu99 in other words, if an |
It is the sample code to create the JMS connection with my sslContext. But the sslContext is overwritten by the Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, JNDIloc);
InitialContext jndiContext;
jndiContext = new InitialContext(env);
javax.jms.ConnectionFactory cf = (javax.jms.ConnectionFactory) jndiContext.lookup("ConnectionFactory");
com.rabbitmq.jms.admin.RMQConnectionFactory rmqcf = (com.rabbitmq.jms.admin.RMQConnectionFactory) cf;
rmqcf.useSslProtocol(sslContext);
javax.jms.Connection connection = cf.createConnection(); And TIBCO BW is something like xml configuration. It is not allowed to invoke the |
@acogoluegnes @garyrussell @artembilan any thoughts on the comment above? |
By browsing the code, the problem of Regarding the other part, we could introduce a |
Nearly brings it to parity with c.r.c.ConnectionFactory. Fixes #1. [#128309631]
@lukehu99 Just a heads up: we released 1.6.0.RC1 of the JMS client yesterday, with fixes for this issue https://groups.google.com/forum/#!topic/rabbitmq-users/WB_lLwFoiFc |
Hi,
We plan to use the JMS connection in TIBCO BW 5.x. In BW, we define the file JNDI and use the "com.sun.jndi.fscontext.RefFSContextFactory" as the InitialContext class to lookup the JMS connection factory. Due to the limitation of TIBCO BW, it does not allow us to useSslProtocol() to configure the sslContext manully. Is it possible to introduce some properties in the JMS connetion facory for SSL, such keystore, trustkeystore and passwords and let connection facotry configure the sslConext by itself? If so, we can configure those SSL properties in the .bindings file there.
One more thing on the method createConnection(String username, String password) of class
com.rabbitmq.jms.admin.RMQConnectionFactory. In the test with java code, I found that the sslContext will be overwriten by the default sslContext even the sslContext has been configured by the maybeEnableTLS(). The reason is the following setRabbitUri() will reset sslContext again. Is it possible to change the order of the those two methods?
Best Regards,
Luke
The text was updated successfully, but these errors were encountered: