什么是临时禁用消息监听器的好方法?我想解决的问题是:
现在,我正在使用Sun App Server.我通过在MessageConsumer中将其设置为null来禁用消息侦听器,并使用setMessageListener(myOldMessageListener)再次启用它,但在此之后我不再收到任何消息.
我想要在独立应用程序中传递这些行中的最后一行而不抛出任何异常:
Properties props = new Properties();
props.setProperty("java.naming.factory.initial",
"weblogic.jndi.WLInitialContextFactory");
props.setProperty("java.naming.provider.url",
"t3s://localhost:9002");
props.setProperty("java.naming.security.principal",
"<username>");
props.setProperty("java.naming.security.credentials",
"<password>");
Context ctx = new InitialContext(props);
Run Code Online (Sandbox Code Playgroud)
...但我在异常中获得此信息:
Warning Security BEA-090542 Certificate chain received from localhost - 127.0.0.1 was not trusted causing SSL handshake failure. Check the certificate chain to determine if it should be trusted or not. If it should be trusted, then update the client trusted CA configuration to trust the CA certificate that signed the peer certificate chain. If you are connecting to a WLS …