【问题标题】:Is it possible to get Websphere deploymentDescriptor like ibm-ejb-jar-bnd.xmi via JMX?是否可以通过 JMX 获得像 ibm-ejb-jar-bnd.xmi 这样的 Websphere deploymentDescriptor?
【发布时间】:2014-08-25 17:09:33
【问题描述】:

我希望通过 JMX 从 Websphere deploymentDescriptor 中获取 EJB 的 jndi 绑定名称。但是我只找到了getDeploymentDescriptor方法,它只能获取原始的ejb-jar.xml。是否可以通过JMX获取像ibm-ejb-jar-bnd.xmi这样的Websphere deploymentDescriptor?或者其他一些可以为 EJB 获取 jndi 名称的方法

【问题讨论】:

    标签: ejb websphere jndi jmx


    【解决方案1】:

    可以通过wsadmin 命令实现。它将打印您以下信息:

    wsadmin>print AdminApp.view('DefaultApplication#Increment.jar+META-INF/ejb-jar.xml', '-BindJndiForEJBNonMessageBinding')
    
    BindJndiForEJBNonMessageBinding: Binding enterprise Bean to JNDI names
    
    Each non-message-driven enterprise bean in your application or module must be bound 
    to a Java Naming and Directory Interface (JNDI) name. For beans in a pre-EJB
     3.0 module, you have to use JNDI name for the bean to provide the binding. For
    beans in a EJB 3.0 module, you can optionally provide binding through JNDI name
    for the bean or local/remote home JNDI names. If JNDI name for the bean is specified,
    you cannot specify binding for its local/remote home and any business interface. 
    If no JNDI name is specified for beans in a EJB 3.0 module, runtime will
    provide a container default.
    
    Module:  Increment EJB module
    Bean:  Increment
    URI:  Increment.jar,META-INF/ejb-jar.xml
    Target Resource JNDI Name:  Increment
    Local Home JNDI Name:
    Remote Home JNDI Name:
    

    由于 wsadmin 使用 JMX,您应该也可以在那里找到所需的方法。
    为什么您需要以编程方式阅读它并且不能依赖默认绑定?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-04
      • 2011-06-05
      • 2018-12-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多