JBoss: Binding values into JNDI in JBoss EAP 6 similar to JNDIBindingServiceMgr

前端 未结 3 1940
既然无缘
既然无缘 2020-12-19 21:45
  1. How do I bind an arbitrary string to JNDI in JBoss EAP 6? I used to do it through org.jboss.naming.JNDIBindingServiceMgr MBean in previous EAP version.

3条回答
  •  隐瞒了意图╮
    2020-12-19 22:21

    What if simply:

    InitialContext ctx = new InitialContext();
    ctx.bind("varName", "value");
    

    If you use that code inside of a JBoss instance you can bind variables into jndi. Remember to use the correct format for varName to bind the variable in the desired scope.

提交回复
热议问题