What to create your entity beans dynamically?
- Ensure that the JPS Tools are enabled.
- Right click the EJB Project folder and select properties
- On the left hand side of the properties window, select Project Facits
- Check the Java Persistence checkbox
- Build the beans from the database.
- Right click the EJB Project folder and select JPA Tools > Generate Entities from Tables...
- Ensure you are connected with the correct server and schema
- Select the entity beans you want in your project.
- Don't for get to tell it which package you want the beans in.
- Click next until it asks you for the sequences for each bean and enter in the appropriate sequence generators.
- Click finish and it will build all the entity beans for you.
The project will then build the beans for you assuming you have all the appropriate relationships etc.
Resources: Kent Jackson (BYU-Idaho Professor)
(Configuration: Eclipse Galileo for Java EE 6 using JBoss Server on Mac OS X 10.6 connecting to a VMware virtual machine with Windows running an academic licence version of Oracle)
0 comments:
Post a Comment
Have a question, comment, suggestion, or interesting bit of information you'd like to share? Please feel free to speak your mind.
(Blog comments that are spam, crude, have vulgar language (even mildly vulgar), are offensive, or otherwise inappropriate will summarily be deleted.)