:)))
I'm using exact same thing and it's working perfectly :
there an example
servlet:
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());
}
don't forget to import :
import java.sql.*;
import java.util.*;
import javax.sql.*;
import javax.naming.*;
the exact same thing is working for JSPs as well...
just read the documentation of weblogic and allaire ..
btw weblogic supply the jdbc20 drivers as well but it's missing in they
docs.
dorbin
--- 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.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists