管理控制台中的Websphere connectionfactory的SSL

时间:2014-05-30 17:31:05

标签: java websphere

我想为我在Websphere管理控制台中创建的Connectionfactory启用SSL。如何在Websphere Application Server和Java Client之间创建SSL连接?我可以使用管理控制台吗?我应该创建密钥和信任商店吗?有什么好的指南我可以使用吗?

这是我的代码:

Hashtable prop = new Hashtable(); prop.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); prop.put(javax.naming.Context.PROVIDER_URL, "iiop://localhost:2809"); prop.put(javax.naming.Context.SECURITY_PRINCIPAL, User); prop.put(javax.naming.Context.SECURITY_CREDENTIALS, Password); InitialContext Ctxt = new InitialContext(prop); ConnectionFactory ConFac = (javax.jms.ConnectionFactory) Ctxt.lookup("MyConnectionFactory");

现在我收到以下错误:

javax.naming.NamingException:获取WsnNameService属性时出错[根异常是org.omg.CORBA.TRANSIENT:初始和转发的IOR无法访问

java.net.ConnectException:connect:本地计算机上的地址无效,或者端口在远程计算机上无效

无论我的错误如何:有人如何在Websphere Application Server和Java Client之间创建SSL连接?

0 个答案:

没有答案