【问题标题】:MessageDrivenBean unable to validate user on remote serverMessageDrivenBean 无法验证远程服务器上的用户
【发布时间】:2019-08-19 01:45:02
【问题描述】:

我正在尝试侦听远程 Wildfly 服务器上的 JMS 队列。我已成功连接到遥控器以向同一用户发送消息,但是当我设置 MessageDrivenBean 时出现错误。

@MessageDriven(name = "MessageListenerBean", activationConfig = {
        @ActivationConfigProperty(propertyName = "user", propertyValue = "username"),
        @ActivationConfigProperty(propertyName = "password", propertyValue = "p@ssw0rd!"),
        @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false"),
        @ActivationConfigProperty(propertyName = "destination", propertyValue = "/queue/receive"),
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
        @ActivationConfigProperty(propertyName="connectionParameters", propertyValue = "host=localhost;port=8080")})
public class MessageListenerBean implements MessageListener {

错误是

AMQ222216: Security problem while creating session: 
AMQ119031: Unable to validate user from invm:0. 
Username: username; SSL certificate subject DN: unavailable

我假设我的配置不正确,但如何?

【问题讨论】:

    标签: java jms wildfly


    【解决方案1】:

    您需要在激活配置中指定正确的connectorClassName。默认值为org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory,这就是它使用invm 连接器连接到本地代理的原因。使用这个:

    @ActivationConfigProperty(propertyName="connectorClassName", propertyValue = "org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory")
    

    【讨论】:

      猜你喜欢
      • 2022-10-25
      • 1970-01-01
      • 2012-09-25
      • 1970-01-01
      • 2020-11-08
      • 2020-01-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多