Eclipse quickly EJB - 3. One-to-one two-way relationship CMR (2)

xiaoxiao2021-03-06  25

Second, add business methods in UserManagementBean

Eclipse quickly EJB - 3. Design a one-to-one two-way relationship CMR (1) Eclipse quick start EJB - 3. One-to-one two-way relationship CMR (3)

1. Add a USERINFOLOCALHOME variable UserHome and put it in the EJBCREATE and EJBPASSIVATE methods.

2. Add the following business methods in turn.

About how to add, if you want yourself, you can take advantage of JBoss-Ide

Add Business Method (Look at the article);

Or Simple copying I have done good code.

These methods are very simple, and it is not easy to say, it is easy to read.

Ok, save,

Generate EJB CLASSES, start MySQL (after startup, first build the last article in the CMP_SAMPLE library)

The useertable table is removed. ),

Start JBoss server,

Deploy Module.

If everything is normal, two tables are automatically created in the CMP_SAMPLE library: useteable and userinfotable

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

New Post(0)