1, index.jsp Context ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup("java:/testdb"); Connection con = ds.getConnection(); String sql = "select top 5 * from tbnewsphoto ";
2, mssql-xa-service.xml <depends optional-attribute-name="ManagedConnectionFactoryName"> <!--embedded mbean--> MSSQLXaDS <!--real attributes--> <config-property name="XADataSourceProperties" type="java.lang.String">ServerName=localhost;DatabaseName=MyData;SelectMethod=cursor</config-property> <config-property name="XADataSourceClass" type="java.lang.String">com.microsoft.jdbcx.sqlserver.SQLServerDataSource</config-property> <!--hack--> <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Minerva JDBC XATransaction ResourceAdapter 3, mssql-service.xml <depends optional-attribute-name="ManagedConnectionFactoryName"> <!--embedded mbean--> <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=testdb"> testdb <config-property name="ConnectionURL" type="java.lang.String">jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyData</config-property> <config-property name="DriverClass" type="java.lang.String">com.microsoft.jdbc.sqlserver.SQLServerDriver</config-property> <!--set these only if you want only default logins, not through JAAS--> <config-property name="UserName" type="java.lang.String">sa</config-property> <config-property name="Password" type="java.lang.String"></config-property> 4. when i run jboss 3.0 Incompletely deployed packages: [EMAIL PROTECTED] { url=file:/C:/JBOSS/server/defaul t/deploy/mssql-service.xml } deployer: [EMAIL PROTECTED] status: null state: FAILED watch: file:/C:/JBOSS/server/default/deploy/mssql-service.xml lastDeployed: 1093518248968 lastModified: 1093518248921 mbeans: , [EMAIL PROTECTED] { url=file:/C:/JBOSS/server/defau lt/deploy/mssql-xa-service.xml } deployer: [EMAIL PROTECTED] status: null state: FAILED watch: file:/C:/JBOSS/server/default/deploy/mssql-xa-service.xml lastDeployed: 1093518249046 lastModified: 1093518249031 mbeans: ]MBeans waiting for classes: MBeans waiting for other MBeans: 19:04:11,765 INFO [URLDeploymentScanner] Started 19:04:11,765 INFO [MainDeployer] Deployed package: file:/C:/JBOSS/server/defaul t/conf/jboss-service.xml 19:04:11,765 INFO [Server] JBoss (MX MicroKernel) [3.0.8 (CVSTag=JBoss_3_0_8 Da te=200306050849)] Started in 0m:8s:719ms 5, browser looks like this HTTP ERROR: 500 testdb not bound View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846290#3846290 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846290 ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user