Hi all.

i write a program that use mssql server for DB.
in servlets i can use sql server connection properly.
but when i try to use sqlserver in EJB, an exception occurs.
i found that in my ejb, when i get DB connection, it point to Default ds 
(HSQLDB).
i think i must make a configuration file that tell jboss that i want to use 
mssql connection on there. but what and how ?

i have these configuration files in my program and i also do copy mssql driver  
in ..\server\default\  and mssql-ds.xml in ..\server\default\deploy\ .

thanks

// mssql-xa-ds.xml ===========


 <xa-datasource>
  <jndi-name>myjndi</jndi-name> 
  <track-connection-by-tx /> 
  <isSameRM-override-value>false</isSameRM-override-value> 
  
<xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
 
  <xa-datasource-property name="ServerName">server</xa-datasource-property> 
  <xa-datasource-property name="DatabaseName">mydb</xa-datasource-property> 
  <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property> 
  <user-name>user</user-name> 
  ****** 
 
  <type-mapping>MS SQLSERVER2000</type-mapping> 
  
  </xa-datasource>
  

//web.xml ================

...

 <resource-ref>
  <res-ref-name>jdbc/myjndi</res-ref-name> 
  <res-type>javax.sql.DataSource</res-type> 
  <res-auth>Container</res-auth> 
 </resource-ref>

....

//jboss-web.xml==============
....
 <resource-ref>
  <res-ref-name>jdbc/myjndi</res-ref-name> 
  <res-type>javax.sql.DataSource</res-type> 
  <jndi-name>java:/myjndi</jndi-name> 
 </resource-ref>

....


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955182#3955182

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955182

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to