The developer version of JBoss 4.0 is an open source application server, and he takes HyperSonicDB as his default database. However, developers may also use a database other than HyperSonicDB, in which we will see how to configure other databases on JBoss.
Introduction JBoss4.0 uses a JDBC profile to configure database connections, which provides data sources for EJBs and other J2EE applications. If you want to use the database other than HypersonicDB, you will modify this profile. This article will focus on the following parts:
JBoss EJB Deployment Descriptor Oralce Database Configuring the configuring the SYSBASE database configures the configuration of the configuration of the DB2 database in infomix database configuration
JBoss's EJB deployment descriptor Standardjaws.xml (in x: / jboss4 / server / default / conf) is a standard deployment description file that maps CMP entity EJB. It is used to configure CMP entity EJB, you can also use jaws.xml instead. You can copy this file Copy to the meta-inf directory in the EJB .jar file. This file is used to describe the following information:
Describe a data source and mapping type. Describe the table description type mapping of EJB mapping
The data source here is a JNDI name that can be obtained through this JNDI to obtain a data source connection pool. JBoss4 default data sources are HypersonicDB. If you need to use other data sources, you need to modify the jaws.xml file.
Standardjbosscmp-jdbc.xml (in x: / jboss4 / server / default / conf) is a standard deployment description file configured for the JBoss CMP container, you can also use a custom profile -jbosscmp-jdbc.xml instead of it. This file is also placed in the meta-INF directory of the EJB.jar file. It is also a need to modify it by default or hypersonicDB as a database.
Oracle database configuration
Oracle is a very popular enterprise database with its operational stability and reliability. To configure Oracle on JBOSS, what is the first thing we have to do is to copy the Oracle's JDBC driver to ClassPath. We copied this JDBC driver to the server / default / lib directory. In order to use Oracle's transaction processing data source we must also copy /DOCS/examples/jca/oracle-xa-ds.xml to the / Server / Default / Deploy directory. If you use a non-transactional data source, copy the /DOCS/examples/jca/oracle-ds.xml file to the / Server / Default / Deploy directory.
Next, we need to modify the Oracle-de.xml configuration file. The
Oracle OCI Type 2 Driver
Class: Oracle.jdbc.driver.Oracledriver
URL: JDBC: Oracle: OCI8: @
Oracle OCI Thin Type 4 Driver
Class: Oracle.jdbc.driver.Oracledriver
URL: JDBC: Oracle: Thin: @
Class: Oracle.jdbc.xa.client.OraclexADataSource
URL: JDBC: Oracle: Thin: @
Class: Oracle.jdbc.driver.Oracledriver
URL: JDBC: Oracle: OCI8: @
In the Connection URL
Next, modify the StandardJbossCMP-JDBC.XML or JBOSSCMP-JDBC.XML configuration file, set
Finally, we need to modify the login-config.xml file to use Oracle, below is the
"Org.jboss.Resource.security.configuredIndityLoginmodule" Flag = "required"> Modified Oracle-DS.xml, Standardjaws.xml, StandardJbosscmp-JDBC.XML, and later you can use Oracle in JBoss4. MySQL database configuration mysql is an open source database, with many open source projects and small communities are using it. To use MySQL in JBoss4, first you want to put the mysql JDBC in the classpath. Similarly, copy it to the / server / default / lib directory, copy /DOCS/examples/jca/mysql-ds.xml to the / Server / Default / Deploy directory. Modify the mysql-ds.xml file, set Flag = "required"> SYSBASE database configuration Sybase Adaptive Server Enterprises (ASE) is the Sysbase's database server. ASE can be used on UNIX and Linux platforms. Similarly, we have to drive its database to the classpath, copy it into the / server / default / lib directory, then copy the /DOCS/examples/jca/sybase-ds.xml to / Server / Default / Deploy directory . Modify the Sybase-DS.xml file to set jbosscmp-jdbc> Finally modify the login-config.xml file to use the SYSBASE database. Set "Org.jboss.resource.security.configuredIndityLoginmodule" flag = "required"> module-option> login-module> authentication> Modified Sybase-DS.xml, StandardJaws.xml, StandardJbosscmp-jdbc.xml, and login-config.xml files Use sysbase in JBOSS. DB2 Database Configuration IBM's DB2 is a perfect, easy to use the database server, which can be used on Linux, UNIX, and Windows platforms. Use DB2 on JBoss4 as long as you copy db2java.zip to the / Server / Default / Lib directory. Then copy the /DOCS/examples/jca/db2-ds.xml to the / server / default / deploy directory, then modify the Here is the corresponding StandardJbosscmp-JDBC.XML (or JBossCMP-JDBC.XML) file: Flag = "required"> "Username"> SA module-option> JBoss.jca: service = localtxcm, name = db2ds module-option> login-module> authentication> application-policy> Finish the above configuration can use DB2 on JBOSS Informix database Configuration IBM's InfoxMix database server is used as a data warehouse, analysis and reporting. Use the Informix database on JBoss4, first copy it to the / server / default / lib directory, then copy / serve / default / deploy In the directory, if you use a transaction (XA) JDBC, copy the /DOCS/examples/jca/informix-xa-ds.xml file. The next step is to modify this Informix-DS.xml file, set the Set the defaults> jbosscmp-jdbc> Finally, add