`

MyEclipse EJB 3.0 Development Overview

    博客分类:
  • Java
阅读更多

My Eclipse EJB 3.0 Development Overview

EJB 3 Support | Editing and Validation Tools | EJB 3.0 Overview


This page presents an overview of EJB 3.0 features available in MyEclipse 6.0.

To get a better feel for MyEclipse and learning more about it, please check out our product Documentation for more material.  

 


 

EJB 3.0 Project Creation

Use the File > EJB Project menu item to invoke the EJB project wizard. Alternatively, you can invoke the EJB project wizard from the New project wizard (File > New > Other).


Creating a new EJB 3.0 project

Create an EJB 3.0 project by selecting the Java EE 5.0 - EJB3 radio button. Optionally add persistence support.


New EJB Project wizard - Page 1


Specify the runtime JNDI data source and select a MyEclipse database driver and schema for design time support.


New EJB Project wizard - Page 2


You may change the EJB 3.0 project's design time driver association at any time using the Java Persistence properties page. To invoke this page, right click on the project and select Properties from the context menu. From the Properties dialog shown below, expand the MyEclipse node and select Java Persistence.


Java Persistence properties page



Reverse Engineering Entities and Facades from Databases


Initiate Entity generation from the context menu of an EJB 3.0 project. This will launch the EJB3 Reverse Engineering Wizard.


Entity generation from an EJB 3.0 project

Entity generation can also be initiated from the Database Browser view.


Entity generation from a DB Table

The reverse engineering process is fully customizable. Using the EJB3 Reverse Engineering Wizard you can choose the artifacts to generate and the database tables from which the artifacts will be based.


Select artifacts to be reverse engineered

Following are several sample snippets of the code generated by the Reverse Engineering process.


Snippets of generated code



Advanced Entity Editing Tools


MyEclipse Java Persistence Perspective


MyEclipse Java Persistence perspective

JPA Details View


The JPA Details view makes it easy to edit entity annotations.


JPA Details view - Editing table details



JPA Details view - Editing column details


JPA Annotation Table and Column Content Assist



Table content assist



JPA column content assist


JPA Entity Validation

Errors in your mapping are detected and displayed in the editor and problems view.


Column validation in the Java editor



Mapped by validation in the Java editor



JPA validation errors shown in Java editor


The JPA Entity Validator can be enabled or disabled at the project level.


JPA validation preferences

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics