1 Reply Latest reply on Feb 9, 2006 2:54 AM by Roman Krutyakov

    Empty "java:" namespace in web application

    Roman Krutyakov Newbie

      I need to use TransactionManager in my web-application (UserTransaction is not enough, i need full JTA support), but cant access to resources in "java:" namespace, because its empty for application.
      Application is deployed as ROOT.war in deployment directory (context root - "/"). Did i miss something in deployment?

      JNDIView result

      java: Namespace
      
       +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
       +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
       +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
       +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
       +- comp (class: javax.naming.Context)
       +- jdbc (class: org.jnp.interfaces.NamingContext)
       | +- WorkDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
       | +- WorkXADS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
       +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
       +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
       +- jaas (class: javax.naming.Context)
       | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
       | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
       | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
       +- timedCacheFactory (class: javax.naming.Context)
      Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
       +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
       +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
       +- Mail (class: javax.mail.Session)
       +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
       +- TransactionManager (class: org.jboss.tm.TxManager)
      
      
      Global JNDI Namespace
      
       +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
       +- jmx (class: org.jnp.interfaces.NamingContext)
       | +- invoker (class: org.jnp.interfaces.NamingContext)
       | | +- RMIAdaptor (proxy: $Proxy34 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
       | +- rmi (class: org.jnp.interfaces.NamingContext)
       | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
       +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
       +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
       +- jdbc (class: org.jnp.interfaces.NamingContext)
       +- UserTransactionSessionFactory (proxy: $Proxy12 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
       +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
       +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
       +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
       +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
       +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
       +- queue (class: org.jnp.interfaces.NamingContext)
       | +- A (class: org.jboss.mq.SpyQueue)
       | +- testQueue (class: org.jboss.mq.SpyQueue)
       | +- ex (class: org.jboss.mq.SpyQueue)
       | +- DLQ (class: org.jboss.mq.SpyQueue)
       | +- D (class: org.jboss.mq.SpyQueue)
       | +- C (class: org.jboss.mq.SpyQueue)
       | +- B (class: org.jboss.mq.SpyQueue)
       +- topic (class: org.jnp.interfaces.NamingContext)
       | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
       | +- testTopic (class: org.jboss.mq.SpyTopic)
       | +- securedTopic (class: org.jboss.mq.SpyTopic)
       +- console (class: org.jnp.interfaces.NamingContext)
       | +- PluginManager (proxy: $Proxy35 implements interface org.jboss.console.manager.PluginManagerMBean)
       +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
       +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
       +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
       +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
       +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
      


      java namespace:
      


      Test jsp source:
      <%@ page language="java" session="true" import="javax.naming.*" contentType="text/html; charset=windows-1251" %>
      <html>
       <head>
       <title>Test page for S1</title>
       </head>
       <body>
       <%
       String listing = "java namespace: \n";
       InitialContext ctx = new InitialContext();
       try {
       NamingEnumeration lst = ctx.listBindings("java:");
       while (lst.hasMoreElements()) {
       listing = listing + lst.nextElement() + "\n";
       }
       } catch (Exception e) {
      listing = listing + e.getMessage();
       }
       %>
       <pre>
       <%=listing%>
       </pre>
       </body>
      </html>
      


      Platform:
      JBoss 4.0.3SP1
      J2SE 1.5
      Linux 2.6.12