Configure MSSQL data source in JBoss

Source: Internet
Author: User
Tags jboss server

1, to D:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/docs/examples/JCA/directory find the mssql-ds.xml file, modify the parameters, including the connection name, user name, password and so on.

  1. <? XML version = "1.0" encoding = "UTF-8"?>
  2. <Datasources>
  3. <Local-TX-datasource>
  4. <JNDI-Name> jcuckoo-Ds </JNDI-Name>
  5. <Connection-URL> JDBC: Microsoft: sqlserver: // localhost: 1433; databasename = mydatabase </connection-URL>
  6. <Driver-class> com. Microsoft. sqlserver. JDBC. sqlserverdriver </driver-class>
  7. <User-Name> SA </user-Name>
  8. <Password> </password>
  9. <Metadata>
  10. <Type-mapping> MS sqlserver2000 </type-mapping>
  11. </Metadata>
  12. </Local-TX-datasource>
  13. </Datasources>

Then publish the data source to copy the file to the D:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/Server/default/deploy/directory.
2, the corresponding mssql2000 driver msbase. jar, MSSQLServer. jar, msutil. Jar copy to D:/jboss-5.0.0.GA-jdk6/jboss-5.0.0.GA/Server/default/lib/directory.
3. Start the JBoss server to view the data source. Open the browser and go to the JBoss console, http: // localhost: 8080/JMX-console/
The data source is found in JBoss. JCA.
Name = jcuckoo-ds, service = performancebinding
Name = jcuckoo-ds, service = localtxcm
Name = jcuckoo-ds, service = managedconnectionfactory
Name = jcuckoo-ds, service = managedconnectionpool
Click name = jcuckoo-ds, service = managedconnectionpool to connect to the console. You can reset the settings. However, the value set in this file will be lost when JBoss is restarted. If you do not want to lose it, you can modify the previous configuration file.

  1. <? XML version = "1.0" encoding = "UTF-8"?>
  2. <Datasources>
  3. <Local-TX-datasource>
  4. <JNDI-Name> jcuckoo-Ds </JNDI-Name>
  5. <Connection-URL> JDBC: Microsoft: sqlserver: // localhost: 1433; databasename = mydatabase </connection-URL>
  6. <Driver-class> com. Microsoft. sqlserver. JDBC. sqlserverdriver </driver-class>
  7. <User-Name> SA </user-Name>
  8. <Password> </password>
  9. <Min-pool-size> 3 </min-pool-size>
  10. <Max-pool-size> 30 </max-pool-size>
  11. <Metadata>
  12. <Type-mapping> MS sqlserver2000 </type-mapping>
  13. </Metadata>
  14. </Local-TX-datasource>
  15. </Datasources>

Since the data source can be dynamically released, after modification, refresh and you will see it. The data source has been configured.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.