Results 1 to 2 of 2

Thread: JNDI works differently for different beans using JBoss?

  1. #1
    Join Date
    Sep 2005
    Posts
    16

    Default 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. #2
    Join Date
    Sep 2004
    Location
    Texas
    Posts
    155

    Default

    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.
    Corby

Similar Threads

  1. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  2. Replies: 3
    Last Post: Sep 22nd, 2005, 10:14 AM
  3. JBoss DataSource not found
    By moacsjr in forum Data
    Replies: 10
    Last Post: Aug 25th, 2005, 01:26 PM
  4. JNDI DataSource lookup outside of JBoss
    By cpmcda01 in forum Data
    Replies: 4
    Last Post: Jun 15th, 2005, 03:56 PM
  5. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •