Regarding connection pooling

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaleeswaran
    New Member
    • Mar 2007
    • 132

    Regarding connection pooling

    hi !

    i am doing connection pooling.i am facing an exception like:

    javax.naming.No InitialContextE xception: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.fac tory.initial


    i tried to debug my code it showing error there:

    ds = (DataSource) ctx.lookup("jav a:comp/env/DB Name");

    i don't what is the problem..
    can you give me some idea..
    thanks ,
    kaleeswaran
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by kaleeswaran
    hi !

    i am doing connection pooling.i am facing an exception like:

    javax.naming.No InitialContextE xception: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.fac tory.initial


    i tried to debug my code it showing error there:

    ds = (DataSource) ctx.lookup("jav a:comp/env/DB Name");

    i don't what is the problem..
    can you give me some idea..
    thanks ,
    kaleeswaran
    How are you obtaining the context?
    Last edited by r035198x; Mar 18 '08, 11:00 AM. Reason: context

    Comment

    • kaleeswaran
      New Member
      • Mar 2007
      • 132

      #3
      Originally posted by r035198x
      How are you obtaining the context?

      InitialContext ctx = new InitialContext( );
      DataSource ds = (DataSource) ctx.lookup("jav a:comp/env/MySqlDS");

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by kaleeswaran
        InitialContext ctx = new InitialContext( );
        DataSource ds = (DataSource) ctx.lookup("jav a:comp/env/MySqlDS");
        Get fscontext.jar and read about how to use it.

        Comment

        Working...