2 Replies Latest reply on Sep 17, 2001 8:24 AM by Nishant

    problem with jndi lookup

    Nishant Newbie

      Hi all.
      I am using JBoss-2.2.2.
      I am trying to lookup "TransactionManager" which is defined in the jndi namespace. This is how am am looking up:
      org.jboss.tm.TxManager tMgr = (org.jboss.tm.TxManager)ctx.lookup("java:TransactionManager");

      However I get the exception:
      javax.naming.NameNotFoundException: TransactionManager not bound.

      But, I see that this name is bound by
      viewing the JBoss JNDI namespace through the link:
      http://localhost:8082/
      I click on "service=JNDIView" on this page and then click the list button.

      It lists the namespaces bound. Here is the list:

      java: Namespace
      +- MinervaXACMFactory (class: org.opentools.minerva.connector.jboss.MinervaXACMFactory)
      +- SQLServerPool (class: org.opentools.minerva.jdbc.xa.XAPoolDataSource)
      +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
      +- DefaultJMSProvider (class: org.jboss.jms.jndi.JBossMQProvider)
      +- ActivityPool (class: org.opentools.minerva.jdbc.xa.XAPoolDataSource)
      +- comp (class: javax.naming.Context)
      +- MinervaSharedLocalCMFactory (class: org.opentools.minerva.connector.jboss.MinervaSharedLocalCMFactory)
      +- jaas (class: javax.naming.Context)
      | NonContext: null
      +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
      +- Mail (class: javax.mail.Session)
      +- MinervaNoTransCMFactory (class: org.opentools.minerva.connector.jboss.MinervaNoTransCMFactory)
      +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
      +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
      +- TransactionManager (class: org.jboss.tm.TxManager)

      Global JNDI Namespace
      +- TopicConnectionFactory (class: org.jbossmq.SpyTopicConnectionFactory)
      +- XAQueueConnectionFactory (class: org.jbossmq.SpyXAQueueConnectionFactory)
      +- jmx (class: org.jboss.jmx.server.JMXAdaptorImpl)
      +- UILXAQueueConnectionFactory (class: org.jbossmq.SpyXAQueueConnectionFactory)
      +- RMIXAQueueConnectionFactory (class: org.jbossmq.SpyXAQueueConnectionFactory)
      +- RMIQueueConnectionFactory (class: org.jbossmq.SpyQueueConnectionFactory)
      +- XATopicConnectionFactory (class: org.jbossmq.SpyXATopicConnectionFactory)
      +- UILXATopicConnectionFactory (class: org.jbossmq.SpyXATopicConnectionFactory)
      +- RMIXATopicConnectionFactory (class: org.jbossmq.SpyXATopicConnectionFactory)
      +- RMITopicConnectionFactory (class: org.jbossmq.SpyTopicConnectionFactory)
      +- invokers (class: org.jnp.interfaces.NamingContext)
      | +- ActivityBean (class: org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker)
      | +- StateComponentBean (class: org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker)
      +- queue (class: org.jnp.interfaces.NamingContext)
      | +- D (class: org.jbossmq.SpyQueue)
      | +- C (class: org.jbossmq.SpyQueue)
      | +- B (class: org.jbossmq.SpyQueue)
      | +- A (class: org.jbossmq.SpyQueue)
      | +- controlQueue (class: org.jbossmq.SpyQueue)
      | +- testQueue (class: org.jbossmq.SpyQueue)
      | +- ex (class: org.jbossmq.SpyQueue)
      | +- testObjectMessage (class: org.jbossmq.SpyQueue)
      | +- E (class: org.jbossmq.SpyQueue)
      +- topic (class: org.jnp.interfaces.NamingContext)
      | +- testDurableTopic (class: org.jbossmq.SpyTopic)
      | +- example (class: org.jbossmq.SpyTopic)
      | +- testTopic (class: org.jbossmq.SpyTopic)
      | +- metrics (class: org.jbossmq.SpyTopic)
      | +- bob (class: org.jbossmq.SpyTopic)
      | +- beancache (class: org.jbossmq.SpyTopic)
      +- UILQueueConnectionFactory (class: org.jbossmq.SpyQueueConnectionFactory)
      +- ActivityBean (class: $Proxy0)
      +- StateComponentBean (class: $Proxy1)
      +- jmx:cassini:rmi (class: org.jboss.jmx.server.RMIConnectorImpl)
      +- QueueConnectionFactory (class: org.jbossmq.SpyQueueConnectionFactory)
      +- UILTopicConnectionFactory (class: org.jbossmq.SpyTopicConnectionFactory


      As can be seen under the java namespace: "TransactionManager" has been bound.
      However as I said when I lookup the namespace by:
      org.jboss.tm.TxManager tMgr = (org.jboss.tm.TxManager)ctx.lookup("java:TransactionManager");
      I get the exception:
      javax.naming.NameNotFoundException: TransactionManager not bound.

      Can anyone help?
      thanks.
      Nishant