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
>