Hi,

I am trying to access a MS Sql server DataSource. I have done the following:

1. Modified mssql-ds.xml to refer to my server.
2. Placed mssql-ds.xml in the server/default/deploy directory
3. Copied the SQL server jars to the server/default/lib directory

I get messages back from jboss saying the following:

[MyDS] Bound connection factory for resource adapter for 
ConnectionManager 'jboss.jca:service=LocalTxCM,name=MyDS to 
JNDI name 'java:/MyDS'

When I use JNDIView from the jmx-console I get the following:

MyDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)

However when I try and use this data source with the following code I
get a NamingException - MyDS not bound:

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
DataSource ds = (DataSource)envCtx.lookup("MyDS"); <-- Exception here

Cheers

Rob Tomlin



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to