J2EE Configuration Guide (1)

zhaozj2021-02-17  46

J2EE Configuration Guide (1)

1. Introduction This article describes the configuration of the J2EE environment. All the files involved in the J2EE installation directory, these files are text files, you can have any text editor to edit them. Usually, you have not changed these files. But if you use the database driver is not Cloudscape, you need to follow the contents of this chapter. 2. JDBC Drive Default J2EE After installation, support the Cloudscape database (a demo database provided by Sun), if your EJB is not connected to the Cloudscape database, then you need to configure it. (If you don't determine this version of J2EE support you use the JDBC driver, please see related information at 11111.) 3. Drive You must put the driver file (.jar file) Copy to $ J2EE_HOME / lib / system directory. And to ensure that the file is included in the environment variable of J2EE_CLASSPATH. 4.J2EE_CLASSPATH Environment Variable J2EE Server The connection database is driven through the JDBC. Locate the location of the driver file (.jar file) via J2EE_CLASSPATH. You can set this variable on the command line before starting J2EE. But we recommend you set the J2EE_CLASSPATH variable in the script. Editing User Profiles is a step in the process of installation. In UNIX, the user profile is bin / userconfig.bat in /bin/userconfig.sh, down / userconfig.bat: You should also remove the driver file (.jar file) in the ClassPath environment variable. 5. JDBC 1.0 drivers to configure jdbc 1.0 drivers, edit the jdbc.drivers and jdbc.datasources of the config / default.properties file. DataSource. Again it is that the driver file must be included in the J2EE_CLASSPATH environment variable. The value of the jdbc.drivers attribute jdbc.drivers attribute is a series of colon-split JDBC drivers. The format is as follows: jdbc.driver = ::... Name, one is the URL of the database. Typical case is: JNDI name is the logical name of the database, and RUL specifies the actual location of the database. JNDI names and URL are specified during EJB coding. RUL's format, please refer to the documentation of the JDBC driver provider. The syntax of JDBC.DataSources is as follows: jdbc.datasources = |||... | Symbol has two functions. First, it separates a few JNDI_DATASOURCE; second, it separates JNDI_DataSource> and elements in each JNDI_DataSource. The syntax of JNDI_DataSource element is as follows: JDBC / starting with JDBC keyword, JNDI_NAME is the DataSouce name specified in the JNDI directory .

For example: jdbc.datasources = JDBC / ORACLE | JDBC: Oracle: Thin @ RTC: 1521: ACCT | JDBC / MYDB | JDBC: TEST 6. Support JTA JDBC2.0 driver configures JTA's JDBC2.0 driver, you need to set up The value of the following attributes: jdbc20.datasources XADataSource..jndiname xadatasource..classname XADataSource..dbuser xadatasource..dbpassword Xadatasource..prop. You must also include JDBC driver files in the J2EE_CLASSPATH environment variable. JDBC20.DataSources Properties JDBC20.DataSource value and JNDI name connection, used to locate the location of DataSouce (it is the parameter of the Lookup method). The syntax of jdbc20.datasource is as follows: jdbc20.datasources = ||| The role is two, first, separated JNDI_DataSource, and form a pair, second, separated each pair JNDI_DataSource>, element. And JNDI_XA_DATASOURCE has the same syntax: the JDBC / JDBC keypower begins. JNDI_NAME is a DataSource name, which points to the JNDI directory. For example: jdbc20.datasources = jdbc / merant | jdbc / xamerant | jdbc / finch | jdbc / xafinch xadatasource attribute XADataSource..jndiname property Specifies the JNDI name of XA DataSource. The syntax is as follows: XADataSource..jndiname = JDBC / N represents each set of Xadatasource. The first JDBC2.0 driver N is 0, the next one is 1, 2, etc. JNDI_XA_DATASOURCE Elements and JDBC20.DataSources specified by the XADataSource..dbuser and XADataSource..dbpassword properties specify database users and passwords. Usually the user has administrator's permissions (more information, see 2222 the distribute.transaction.recovery). XADataSource..prop. Specify the value associated with a specific property value. The actual value may be a JDBC driver. For example: xadatasource.0.jndiname = jdbc / XAMerant xadatasource.0.classname = com.merant.sequelink.jdbcx.datasource.SequeLinkDataSource xadatasource.0.prop.url = jdbc: sequelink: // mypc: 5000 / [Oracle]

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

New Post(0)