The Jboss 4.0 developer version is an Open-source application server that uses HYPERSONICDB as his default database. However, developers may also want to use other kinds of databases other than HYPERSONICDB, and in this article we will see how to configure the use of other databases on JBoss.
Brief introduction
Jboss4.0 uses the JDBC configuration file to configure the database connection, which provides access to the EJB and other Java EE applications with the data source. If you want to use a database other than HYPERSONICDB, you will need to modify the configuration file. This article will focus on the following sections:
JBoss's EJB Deployment descriptor
Configuration of the Oralce database
Configuration of MySQL Database
Configuration of the Sysbase database
Configuration of the DB2 database
Configuration of the Infomix database
JBoss's EJB Deployment descriptor
Standardjaws.xml (located in X:\jboss4\server\default\conf) is a standard deployment profile that maps CMP entity EJBS. It is used to configure the CMP entity EJB, and you can also use Jaws.xml instead. You can copy this file to the Meta-inf directory in the EJB. jar file. This file is used to describe the following information:
Describes a data source and mapping type.
Table describing the EJB map
A finder method for describing EJBs
Description Type Mappings
The data source here describes a Jndi name that you can use to get a data source connection pool. JBOSS4 The default data source uses the HYPERSONICDB. If you use a different data source you need to modify the Jaws.xml file.
Standardjbosscmp-jdbc.xml (located in X:\jboss4\server\default\conf) is a standard deployment profile that configures the JBoss CMP container. You can also use a custom configuration file--jbosscmp-jdbc.xml to replace it. This file is also placed in the Meta-inf directory of the Ejb.jar file. The default is to use HYPERSONICDB as a database, and here you need to modify it.