Trouble with JNDI lookup while using mutiple threads - Websphere

This is a discussion on Trouble with JNDI lookup while using mutiple threads - Websphere ; hi gurus I am facing a rather peculiar problem while doing a JNDI lookup. I have a condition wherei need to maintain an infinite loop from which to pool a database. To do this i am using a saperate thread. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Trouble with JNDI lookup while using mutiple threads

  1. Trouble with JNDI lookup while using mutiple threads

    hi gurus

    I am facing a rather peculiar problem while doing a JNDI lookup. I have a condition wherei need to maintain an infinite loop from which to pool a database. To do this i am using a saperate thread. The problem is that when i try to lookup my datasource from this thread the server gives me a namingexception.

    Further, this problem only occures when i am trying to lookup a resource reference, if i look up the datasource directly it works.

    any help or pointers would be greatly appreciated

    thanks
    Tarun

  2. Re: Trouble with JNDI lookup while using mutiple threads

    Hi Tarun,

    Were you able to resolve this issue. I seem to have a similar problem. I've created a custom service, which launches a task that is delayed to begin after my local server has finished starting up.

    When it gets to the JNDI lookup, it fails with the NamingException: "First component in name ... not found".

    I've tried doing the lookup directly in my code as well using the AccessBean and EjbFactory that can be created in WSAD. Doing the lookup directly or via an AccessBean gives the NamingException, while the EjbFactory method gives me a ClassNotFoundException for the EjbFactory (even though this class is in my project).

    Thanks,
    Mike


  3. Re: Trouble with JNDI lookup while using mutiple threads

    hi Tarun,
    I'm facing the same program when lookup for resource reference from Thread. Do u mind to share your solution with us ?


    thanks

+ Reply to Thread