1 Reply Latest reply on May 16, 2005 5:09 PM by Michael Lipp

    java:comp servlet and new thread

    Michael Lipp Newbie

      Hi,

      I have a servlet that creates a new thread (actually, it is not me it is jetspeed that does this). The new thread does not seem to be able to access the "java:comp" environment created for the servlet (I tried JBoss 3.2.7 and JBoss 4.0.1). I get:

      22:09:32,830 INFO [STDOUT] Naming Exception while looking up DataSource (java:comp/env/jdbc/jetspeed)
      22:09:32,830 INFO [STDOUT] env not bound
      22:09:32,831 INFO [STDOUT] javax.naming.NameNotFoundException: env not bound
      22:09:32,832 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:490)
      22:09:32,832 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:498)
      22:09:32,832 INFO [STDOUT] at org.jnp.server.NamingServer.getObject(NamingServer.java:504)
      22:09:32,832 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:248)
      22:09:32,832 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606)
      22:09:32,833 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:697)
      22:09:32,833 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568)
      22:09:32,833 INFO [STDOUT] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      


      The configuration is OK, because I can access the JNDI entry in the "main" thread. AFAIK, while EJBs may not create new threads, servlets are allowed to do so. Should I report this as a JBoss bug?