Announcement Announcement Module
Collapse
No announcement yet.
JNDI works differently for different beans using JBoss? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JNDI works differently for different beans using JBoss?

    I was configuring my beans to look up JNDI resources in JBoss and finally got things to look up properly but with inconsistent ways to look up using JNDI. Some beans required java:/ and others didn't. I don't understand why that is. Can anyone please explain how this is?

    Thanks in advanced!

    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName">
    <value>java:/DefaultDS</value>
    </property>
    </bean>
    <bean id="queue1" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName">
    <value>queue/testQueue</value>
    </property>
    </bean>
    <bean id="queue2" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName">
    <value>queue/testQueue1</value>
    </property>
    </bean>
    <bean id="jmsXAConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName">
    <value>java:/JmsXA</value>
    </property>
    </bean>

  • #2
    The java:/ prefix means that the entry is published in the local namespace, and is not visible from remote servers.

    Bring up your JMX console, select the JNDIView MBean, and select the List operation to view your JNDI namespace. This will show you which beans are published under the local namespace, and thus require the prefix.

    Comment

    Working...
    X