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

EJB Development Quickstart with MyEclipse---7

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

Jump to: navigation, search

Running XDoclet Code Generation

Once you've configured your project's XDoclet settings you can run the XDoclet code generator at any time. Typically you should execute XDoclet after each change to the XDoclet EJB configuration or application server settings or when you modify the XDoclet annotations of any EJB bean implementation class.



Now is a good opportunity to execute XDoclet on the firstejb project and test the new XDoclet settings as Trader EJB has not yet been extended with new XDoclet-annotated business methods.


  • To run XDoclet on the firstejb right-click on the project and select MyEclipse > Run XDoclet from the context-menu (see Figure 15).


Image:Firstejb-xdocletrun.gif



Figure 15. Starting XDoclet code generation on EJB project


  • Monitor the Console view for anomalous output messages from the xdoclet-build script. Figure 16 depicts XDoclet progress messages as the TraderBean class is processed.


Image:firstejb-xdocletconsole2.gif



Figure 16. Console output of Run XDoclet action



Upon XDoclet's completion the firstejb project should include new versions of the Trader and TraderHome interfaces and the ejb-jar.xml and jboss.xml deployment descriptors. Figure 17 depicts the initial generation of these new project resources.



Note: When we created the TraderBean.java class during Section 5, we specified its Java package name as com.genuitec.trader.ejb and emphasized that the package name end in ".ejb". This is because the Standard EJB XDoclet packageSubstitution subtask creates a corresponding Java package name ending in ".interfaces" and adds generated EJB and Home interfaces to it. In our example, the com.genuitec.trader.interfaces package was created and it contains the for the Trader EJB and TraderHome interfaces. If you did not follow this package naming convention and are using default XDoclet setting some of the files may not be generated.



Image:firstejb-prexdoclet-annot.gif Image:Firstejb-postxdoclet-annot2.gif



Figure 17. Contents of EJB project before and after XDoclet generation

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