allwiki首页  
天下维客 你可以修改的网络知识库
首页最近更改优秀条目专题展示电脑科技词典软件学习网络知识电脑安全明星时尚天下百科
 

EJB Development Quickstart with MyEclipse---11

天下维客,你可以修改的网络知识库

Jump to: navigation, search

目录

Dependent Java Project Setup and Deployment Policy Configuration

Frequently the codebase of an EJB application may be partitioned between a primary MyEclipse EJB Project and 1 or more Java projects upon which the EJB project depends. Typically the role of these dependent Java projects is to localize common or shared code that has other uses beyond that of the EJB project. MyEclipse can be configured to package and merge the output of dependent Java projects into the deployment of an EJB Project. In this section we introduce the procedure for establishing project dependency and configuring deployment policies for dependent projects.

Establishing a Java Project dependency

A dependent Java project is defined through the EJB Project's Build Path properties . To access the Build Path properties dialog from the target EJB project's context-menu select Properties > Java Build Path > Projects. See Figure 22 for an example of establishing the Logging Java project as a dependent project of the firstejb project. Doing this enables firstejb project source code to have access to the classes defined by an example Logging Java project. Code completion, validation, and other tools are able to reference Logging project resources.

Image:firstejb-dependentproject.gif

Figure 22. Making the Logging Java project a dependent of the firstejb EJB Project

Configuring the Deployment Policy of Dependent Java Projects

The MyEclipse EJB Project Deployment Service provides 2 policies that define how dependent Java projects are processed during EJB Project deployment. Table 2 describes each of these policies.

Table 2. Dependent Java Project Deployment Policy descriptions

Image:EJB-tab-4.gif

The default deployment behavior for all EJB Projects is defined by the MyEclipse system preferences (See Figure 23).

Image:firstejb-deploypref.gif

Figure 23. MyEclipse default dependent Java project deployment preferences

Individual EJB Projects may override the system default behavior from the MyEclipse-EJB Project properties dialog (see Figure 24).

Image:firstejb-deployprop.gif

Figure 24. MyEclipse EJB Project deployment properties

Summary

This concludes your introduction to creating a session EJB with MyEclipse. Additional Quickstart documents are available that introduce working with Web Projects, editing, application server configuration, enterprise application projects and database development.

Personal tools
工具
金银币拍卖 金币拍卖预展  金银币网店 熊猫金银币 生肖金银币