[jboss-user] [JBoss Seam] - Re: use seam gen to connect to mssql server

JoviJojo do-not-reply at jboss.com
Fri Jan 12 14:38:04 EST 2007


thanks for the reply:
seam-gen generated ds.xml
-----------------
<?xml version="1.0" encoding="UTF-8"?>

   
   <local-tx-datasource>
      <jndi-name>ndpjDatasource</jndi-name>
      <connection-url>jdbc:hsqldb:.</connection-url>
      <driver-class>org.hsqldb.jdbcDriver</driver-class>
      <user-name>sa</user-name>
      
<!-- 
      <exception-sorter-class-name>
         org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
      </exception-sorter-class-name>
      
         <type-mapping>mySQL</type-mapping>
      
-->
   </local-tx-datasource>
    

-----------------------------
then i modified this ds.xml to connect to mssql server
<?xml version="1.0" encoding="UTF-8"?>

   
   <local-tx-datasource>
      <jndi-name>ndpjDatasource</jndi-name>
      <connection-url>jdbc:jtds:sqlserver://localhost:1433;DatabaseName=ndpj;SelectMethod=cursor</connection-url>
      <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
      <user-name>sa</user-name>
      sa
<!-- 
      <exception-sorter-class-name>
         org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
      </exception-sorter-class-name>
      
         <type-mapping>mySQL</type-mapping>
      
-->
   </local-tx-datasource>
    

--------------
it ONLY work when you connect to hypersonic db first, then modify the ds.xml to connect to sql server, it will NOT work if you use seam gen directly connect to mssql server!!!
strange.


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

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



More information about the jboss-user mailing list