Since I'm not using your exact driver, I've used Webogic for SQL Sever7, and
others for Sybase and Informix, I'm assuming that the driver is JDBC 2.0
compliant, since that's a requirement for connection pooling to be
available. The pooling has worked fine for me with all of the above
databases. Hummm, what am I missing.

-----Original Message-----
From: dan moy <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Date: Thursday, September 07, 2000 6:08 PM
Subject: Re: SQL Server DB Pooling


>Norm, I tried using a simpler name but I am still having problems. Here is
>the error message:
>
>500 Internal Server Error
>java.lang.ClassCastException: com.evermind.sql.OrionPooledDataSource
> at
>/examples/jsp/jdbctest/jdbctest.jsp._jspService(/examples/jsp/jdbctest/jdbc
test.jsp.java:49)
> (JSP page line 24)
> at com.evermind.server.http.EvermindHttpJspPage.service(JAX)
> at com.evermind.server.http.HttpApplication.t8(JAX)
> at com.evermind.server.http.JSPServlet.service(JAX)
> at com.evermind.server.http.di.pz(JAX)
> at com.evermind.server.http.di.forward(JAX)
> at com.evermind.server.http.dr.p4(JAX)
> at com.evermind.server.http.dr.p3(JAX)
> at com.evermind.util.f.run(JAX)
>
>I'm not sure where to go from here.
>
>Thanks,
>Dan
>On Thu, 7 Sep 2000 15:15:21 -0700, Orion-Interest wrote:
>
>>  Did you try a simpler name?0
>>
>>  I just use jdbc/MyNamdPooledDS for the JNDI in the datasource and for
the
>>  context reference?
>>  I'm wondering if the /pool/ is causing a location problem within JNDI?
>>
>>  Norm
>>
>>  -----Original Message-----
>>  From: dan moy <[EMAIL PROTECTED]>
>>  To: Orion-Interest <[EMAIL PROTECTED]>
>>  Date: Thursday, September 07, 2000 2:51 PM
>>  Subject: Re: SQL Server DB Pooling
>>
>>
>>  >Norman,
>>  >Thanks for your response, but I did try all of the other JNDI locations
>as
>>  >specified by my data-sources.xml but there was only one I could get to
>>  work;
>>  >the default location "jdbc/MyCoreDS".  All other when tried return a
>class
>>  >cast exception error.
>>  >
>>  >Any other ideas?
>>  >Thanks,
>>  >Dan
>>  >
>>  >On Thu, 7 Sep 2000 12:32:12 -0700, Orion-Interest wrote:
>>  >
>>  >>  Orion already pools the connection for you. Just reference the
pooled
>>  >>  datasouce:
>>  >>
>>  >>  Context ctx = new InitialContext();
>>  >>  DataSource ds = (DataSource)ctx.lookup( "jdbc/pooled/MypooledDS" );
>>  >>  Connection conn = ds.getConnection();
>>  >>
>>  >>  This will get you a connection from the pool, and return it when you
>>  >close
>>  >>  the connection.
>>  >>
>>  >>  -----Original Message-----
>>  >>  From: dan moy <[EMAIL PROTECTED]>
>>  >>  To: Orion-Interest <[EMAIL PROTECTED]>
>>  >>  Date: Thursday, September 07, 2000 12:20 PM
>>  >>  Subject: SQL Server DB Pooling
>>  >>
>>  >>
>>  >>  >Hello,
>>  >>  >I am interested in setting up database pooling using INet's Opta
>driver
>>  >for
>>  >>  >SQL server, but I am having trouble with the configuration.
>>  >>  >
>>  >>  >I can get the driver manager for single connections to work, but if
>I
>>  >try
>>  >>  >any of the pooled conections I am getting a Cast exception.
>>  >>  >
>>  >>  >Any help would be appreciated!  Thanks,
>>  >>  >Dan
>>  >>  >
>>  >>  >Here is my configuration:
>>  >>  >
>>  >>  >
>>  >>  ><data-source
>>  >>  > class="com.evermind.sql.ConnectionDataSource"
>>  >>  > location="jdbc/MyCoreDS"
>>  >>  > pooled-location="jdbc/pooled/MypooledDS"
>>  >>  > xa-location="jdbc/xa/MyXADS"
>>  >>  > ejb-location="jdbc/MyDS"
>>  >>  > name="My data-source"
>>  >>  > url="jdbc:inetdae:SQLSERVERA:1433"
>>  >>  > connection-driver="com.inet.tds.TdsDriver"
>>  >>  > username="sa"
>>  >>  > password=""
>>  >>  >/>
>>  >>  >
>>  >>  >Here is the code I am using to test this connection:
>>  >>  >
>>  >>  >
>>  >>  > PooledConnection pcon = null;
>>  >>  > Connection con = null;
>>  >>  > int i=0;
>>  >>  >
>>  >>  > System.out.println("Starting");
>>  >>  > try {
>>  >>  >        Context ctx = new InitialContext();
>>  >>  >
>>  >>  >/*
>>  >>  >      DataSource ds = (DataSource)ctx.lookup("jdbc/MyCoreDS");
>>  >>  >      con = ds.getConnection();
>>  >>  >*/
>>  >>  >        ConnectionPoolDataSource ds =
>>  >>  >(ConnectionPoolDataSource)ctx.lookup("jdbc/MyDS");
>>  >>  >        pcon = ds.getPooledConnection();
>>  >>  >        con = pcon.getConnection();
>>  >>  >
>>  >>  >        Statement s = con.createStatement();
>>  >>  >        ResultSet rs = s.executeQuery("select * from sysmessages");
>>  >>  >
>>  >>  >        while (rs.next()) {
>>  >>  >%>
>>  >>  ><tr>
>>  >>  > <td><%= i++ %></td>
>>  >>  > <td><%= rs.getString(4) %></td>
>>  >>  ></tr>
>>  >>  ><%
>>  >>  >        }
>>  >>  >
>>  >>  >        rs.close();
>>  >>  >        s.close();
>>  >>  > }
>>  >>  >
>>  >>  > catch (NamingException e)
>>  >>
>>  >>  > System.out.println(e.toString());
>>  >>  > }
>>  >>  > catch (SQLException e) {
>>  >>  > System.out.println(e.toString());
>>  >>  > }
>>  >>  > finally
>>  >>
>>  >>  > if (pcon != null)
>>  >>  > try {
>>  >>  > pcon.close();
>>  >>  > }
>>  >>  > catch(Exception e) {
>>  >>  > System.out.println(e.toString());
>>  >>  > }
>>  >>  > }
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >_______________________________________________________
>>  >>  >Say Bye to Slow Internet!
>>  >>  >http://www.home.com/xinbox/signup.html
>>  >>  >
>>  >>
>>  >>
>>  >
>>  >
>>  >
>>  >
>>  >
>>  >_______________________________________________________
>>  >Say Bye to Slow Internet!
>>  >http://www.home.com/xinbox/signup.html
>>  >
>>
>>
>
>
>
>
>
>_______________________________________________________
>Say Bye to Slow Internet!
>http://www.home.com/xinbox/signup.html
>


Reply via email to