Developing Java EE applications using myeclipse: Creating EJB 2 Session Bean Project with Xdoclet (iii)

Source: Internet
Author: User
Tags jboss jboss server

MyEclipse time limit seconds kill! Event Hot Start >>

"MyEclipse Latest version download"

Iii. Configuring Xdoclet supported Projects

By default, the MyEclipse EJB project is not configured to use the Xdoclet feature. This section focuses on the steps for using Xdoclet support and performing Xdoclet code generation to enable and configure FIRSTEJB EJB projects to obtain the dependent source code and deployment components of trader EJBs.

The standard EJB Xdoclet configuration is first added to the FIRSTEJB project. The ultimate goal of this section is to generate a xdoclet configuration that creates an ant script that myeclipse executes to generate additional EJB components that are required to deploy trader EJBs.

1. Right-click FIRSTEJB, then select Properties, expand MyEclipse, and then select Xdoclet.

Xdoclet Configuration page

2. Click Add Standard, select Standard EJB, and then click OK.

Note: In addition to the preconfigured Xdoclet modules provided by MyEclipse, you can also create your own Xdoclet custom configuration. The process of integrating a custom Xdoclet module is beyond the scope of this document.

Add a standard EJB configuration

After you add a standard EJB module to the list, select it to display the Doclet it contains. Note Ejbdoclet appears in the list in the lower-left corner, and the Subdoclets under Jbdoclet contains the required and optional subtasks. Many child events do not apply to simple stateless session beans, such as the trader EJB.

default sub-task for standard Ejbdoclet

3. Delete the unwanted subtasks, leaving only the list shown in the image below. To delete subtasks, simply click each subtask and select Remove. Each item in this configuration represents the EJB Xdoclet child task.

Trader EJB Requirements for Xdoclet EJB sub-tasks

4. (optional) If you specify a non-default source folder when you create the project, you must update the following elements: Ejbdoclet>destdir, Deploymentdescriptor>destdir, and fileset> The project relative path property of Src. Select each element in the lower-left panel, and then view and modify its respective properties in the lower-right panel.

5. Click the Build tab to configure the project's Xdoclet build file policy.

Note: If this is a new project, set the build policy to the default policy, so you can skip to step 7.

6. Select the use dynamic build specificationpolicy option.

If you are using an existing project that already contains a xdoclet configuration, you can choose to delete unnecessary xdoclet-build.xml files. It no longer requires a more detailed description of these policies, see the table below. By default, new projects are set up to use dynamic build policies. You can override the default value for the item on the Parameters page.

Xdoclet Build file policy configuration

Warning! when the Xdoclet configuration property of the project is modified, the project's Xdoclet-build.xml file is overwritten by the new version. Use the Using Xdoclet-build.xml file policy when you must manually manage Xdoclet-build.xml files.

7. Click the Ok,xdoclet configuration to save to a file named. Xdoclet. Also, if the use Xdoclet-build.xml file Build policy is enabled, MyEclipse generates a file named Xdoclet-build.xml from the Xdoclet setting and stores the file in the project's root folder.

3.2 Configuring the Application Server Xdoclet (optional)

Xdoclet is able to generate server-specific deployment descriptors.

Note: you will see later the steps for deploying FIRSTEJB to the local JBoss server, which use the JBoss subtasks.

1. Right-click FIRSTEJB, select Properties, expand MyEclipse, and then select Xdoclet.

2. Select the standard EJB to view the task, right-click Ejbdoclet, and select Add.

3. Select JBoss, then click OK.

4. Select JBoss subtask, double-click the Destdir property, enter Src/meta-inf in the Value field, and click OK.

set JBoss subtask properties

5. Click OK in the Properties window.

For more information, please visit MyEclipse Chinese network >>

Developing Java EE applications using myeclipse: Creating EJB 2 Session Bean Project with Xdoclet (iii)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.