My EJB learning course (seven)

zhaozj2021-02-16  65

Finally, you can come out again. I haven't been busy on the last week, and the company took us out of Happy. But now it is cool, can't go to the water. I was frozen in an instant in two minutes. Special cold.

Well, the words retired. I have been watching CMP, entity bean, but I have to make EntityBean first to do what I know how to configure the server, I found a guide to configure the JBoss server, I feel good, I will give you Share.

Http://www.uml.org.cn/j2ee/j2ee121505.htm

JBoss3.07 configuration

There are two places where JBoss is configured, one is a log information option for JBoss, so that we can get detailed information about deployment in the deployment of EJB; the other is the data source in JBoss, so that we can use EntityBeans managed by container persistence to operate data in the database.

(1) First we describe the changes to the log information option, enter the server / default / conf directory in the directory where JBoss is located, find the file log4j.xml, open it with the text editor, modify the property as follows:

Modify one:

change into:

Modify 2:

Modify to:

After modifying these properties, when we deploy CMP EntityBean, you will see the SQL plug-in statement that is automatically generated for the deployed CMP EntityBean and the EJB-QL statement included in the CMP EntityBean; check sentence.

(2) Next, we tell the configuration of the data source. Step 1: We entered the DOCS / EXAMPLES / JCA directory under the JBoss folder, open mysql-service.xml with the text editor, and modify the part of them:

mysqlds (Data Source Name)

JDBC: mysql: // localhost: 3306 / resultManager

(Database URL)

com.mysql.jdbc.driver

(Database driver)

Name = "Username" type = "java.lang.string"> Database (database user)

Name = "Password" type = "java.lang.string">

SAILING (Database User Password)

After saving the modified content, copy the mysql-service.xml file to the JBoss folder, the server / default / deploy directory, at which time the file in the deploy directory is shown below:

In the second step, we will copy the JAR file containing the MySQL JDBC 2.0.14 driver to the Server / Default / Lib directory of the JBoss installation directory. At this time, the files in the lib directory are shown below:

Now we have completed the previous configuration, and we will tell the development of CMP EntityBean.

Let's first configure the JBoss, then prepare, we want to start CMP, it is a database! ! !

Related resources: with sound access new year fireworks animation effects - html-code

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

New Post(0)