JBoss4.0 JDBC Data Source Configuration (2)

zhaozj2021-02-16  53

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 to com.sybase.jdbc2.jdbc.sybdriver, set to JDBC: Sybase: TDS: : / < Database>, where is the host name, port name, and database name, respectively. Also need to modify the and elements of Standardjaws.xml or Jaws.xml files:

Java: / Sybaseds

Sybase

Modify the and elements of StandardJbosscmp-JDBC.XML or JBossCMP-JDBC.XML files:

Java: / Sybaseds

Sybase

Finally modify the login-config.xml file to use the SYSBASE database. Set the element:

"Org.jboss.Resource.security.configuredIndityLoginmodule"

Flag = "Required">

SA

SA

JBoss.jca: service = localtxcm, name = Sybaseds

Modified Sybase-DS.xml, StandardJaws.xml, StandardJbosscmp-JDBC.XML, and you can use Sysbase in JBOSS after you and the login-config.xml file.

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 / Server / Default / Deploy directory, then modify the element position com.ibm.db2.jdbc.app.db2driver, Elements is JDBC: DB2: where the element represents the database service name.

Java: / db2ds

DB2

Here is the corresponding StandardJbosscmp-JDBC.XML (or JBossCMP-JDBC.XML) file:

Java: / db2ds

DB2

Finally, add the following in the Login-Config.xml file:

"Org.jboss.Resource.security.configuredIndityLoginmodule"

Flag = "Required">

Principal> SA

"Username"> SA

"Password">

JBoss.jca: service = localtxcm, name = db2ds

Complete 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 element to: com.informix.jdbc.iFxDriver Set element to

JDBC: Informix-Sqli: // : : informixserver = ,

Among them, , , represents the database hostname, database port, and database service name, respectively. Then modify the and elements of Standardjaws.xml or Jaws.xml files:

Java: / InformixDs

informixdb

Set the and elements in the JBossCMP-JDBC.XML file:

Java: / InformixDs

informixdb

Finally, add element in the login-config.xml file:

"Org.jboss.Resource.security.configuredIndityLoginmodule"

Flag = "Required">

SA

SA

JBoss.jca: service = localtxcm, name = informixds

This way, you can use the Informix database in JBOSS4.

in conclusion

JBoss4 uses the Hypersonic database by default, but if you see us as long as you have a simple modification of several configuration files, you can use the popular different databases on the market.

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

New Post(0)