Hi dorbin
i am also have exactly the same code & neccessary imports.I have
connectionbean which does the connectionpool implementation.
if i use jsp:sql tag with datasource it works fine.
i have number of servlets which talk to the database often.earlier i was
having same connectionbean without connectionpool implementation.
>
> try{
> InitialContext ctx = new InitialContext();
> DataSource ds =
> (DataSource)ctx.lookup("java:comp/env/jdbc/"+ "my_conn");
> this.conn = ds.getConnection();
> }catch(Exception ex){
> System.out.println("my_servl:\t"+ex.toString());
> }
the above exception gives me this details
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial
sahaya.
>--- sahaya ranialex <[EMAIL PROTECTED]> wrote:
> > I am trying to use connection pool.I am using jDriver from weblogic
> > for
> > SQLserver 7.0,
> > Here is my part of the code.
> >
> > Class.forName("weblogic.jdbc.mssqlserver4.Driver").newInstance();
> > InitialContext context = null;
> > Connection connection = null;
> > context = new InitialContext();
> > DataSource ds = (DataSource) context.lookup("java:comp/env/jdbc/" +
> > dsn);
> > connection = ds.getConnection();
> >
> >
> > i am getting
> >
> > javax.naming.NoInitialContextException: Need to specify class name in
> >
> > environmen
> > t or system property, or as an applet parameter, or in an application
> >
> > resource f
> > ile: java.naming.factory.initial
> >
> > Is there any configuration missing? where can i find the
> > filejava.naming.factory.initial.
> >
> > For configuring the weblogic driver ,i suppose to edit the
> > weblogic.properties file which comes with weblogic app driver.
> >
> > I am using JRun 3.0,as servlet, jsp container.
> > i am not using any EJB's
> > How do i do it?
> >
> > sahaya.
> >
>
~~~~~~~~~~~~~ Paid Sponsorship ~~~~~~~~~~~~~
Get Your Own Dedicated Win2K Server! Instant Activation for $99/month w/Free
Setup from SoloServer PIII600 / 128 MB RAM / 20 GB HD / 24/7/365 Tech Support
Visit SoloServer, https://secure.irides.com/clientsetup.cfm.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists