JBoss4.0 data source configuration

xiaoxiao2021-03-06  35

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 雠 雠 梦    陆 陆  庀 庀 庀 庀 庀 娴 父 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据 数据Configuration JBoss 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. Description of the EJB map Description EJB's Finder method description type map The data source here is a JNDI name that can be obtained through this JNDI to get 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 Configuring Oracle has 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 settings of the Tags and are as follows: Oracle OCI Type 2 DriverClass: Oracle.jdbc.driver.OracleDriver URL: JDBC: Oracle: OCI8: @ Oracle OCI Thin Type 4 DriverClass: Oracle.jdbc.driver.OracleDriver URL: JDBC: Oracle: Thin: @ : : Oracle OCI Xa Type 2 Driverclass: Oracle.jdbc.xa.client.OrclexADataSource URL: JDBC: Oracle: Thin: @ : : Oracle OCI Type 2 Driverclass: Oracle.jdbc.driver.OracleDriver URL: JDBC: Oracle: OCI8: @ is installation in the Connection URL Oracle's computer host name, is the port of the Oracle database, is the database name. Next, we will modify the Standardjaws.xml or Jaws.xml configuration file, and use the and elements below: java: / oracleds Oracle8 Next, modify StandardJbosscmp-JDBC.XML or JBossCMP-JDBC.XML configuration files, set and elements to use Oracle.

java: / oracleds Oracle8 We need to modify login-config.xml file using Oracle, the following is element login-config.xml file: sa sa jboss.jca: service = localtxcm, name = ORACLEDS 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 to set the set to JDBC: mysql: // / , where / > Is the database hostname is the database name.

转载请注明原文地址:https://www.9cbs.com/read-57979.html

New Post(0)