tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Morelock <subscripti...@phillipmorelock.com>
Subject Re: DataSources and JNDI
Date Thu, 23 May 2002 17:21:48 GMT
are you following microsoft's directions?  they worked for me on jboss at
least.




On 5/23/02 8:04 AM, "Adam Greene" <agreene@romulin.com> wrote:

> I'm trying to get the Microsoft SQL Driver to work in doing DataSources.  It
> has a class called com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory,
> but I must not be getting the config right or something because it keeps
> returning Nulls out of the JNDI.
> 
> server.xml:
> 
>         <Resource name="jdbc/TestDB" auth="Container"
> type="javax.sql.DataSource"/>
>       
>         <ResourceParams name="jdbc/TestDB">
>           <parameter>
>               <name>factory</name>
>               
> <value>com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory</value>
>           </parameter>
>           <parameter>
>               <name>user</name>
>               <value>sa</value>
>           </parameter>
>           <parameter>
>               <name>password</name>
>               <value><removed></value>
>           </parameter>
>           <parameter>
>               <name>databaseName</name>
>               <value>Testdatabase<value>
>           </parameter>
>           <parameter>
>               <name>serverName</name>
>               <value>myserver</value>
>           </parameter>
>           <parameter>
>               <name>PortNumber</name>
>               <value>1433</value>
>           </parameter>
>         </ResourceParams>
> 
> java Code:
> 
> Context ctx = new InitialContext();
> 
> 
> DataSource ds = (DataSource) ctx.lookup("java:/comp/env/jdbc/TestDB");
> 
> 
> 
> Thanks for any help you can give.
> 
> Adam Greene
> Team Leader
> ROMulin Group Inc
> Ph:   (506) 863-1014
> Fax: (506) 854-6886
> http://www.romulin.com
> 
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message