Wednesday, December 21, 2011

JDeveloper: JEE Web Application

I had to throw together a quick demo of the JDeveloper JEE functionality and was pleasantly surprised what Jdeveloper give you for free. Will be posting some of what I have found.

Create a New JEE Web Application and press OK button

Fill in your info here  replacing ProjectName with your project
Name: App
Package prefix: eg:
Next * 5

Now on to creating an EJB Entity: Select Entities from Tables and click ok

As we are creating the first ejb in the app you can click next on the persistance unit screen.

I am going to select the  countries and regions tables from the HR schema by selecting them and clicking the blue arrow after querying all the tables. Next.

Next Select Discover foriegn keys dynamically.

Next * 3 but take note of the info in the screens. (You can change the class and package names etc)

Now take note of the java classes created complete with annotaions and relationships very nifty.
Also take a look at the persistence.xml file created in the META-INF dir.

You have created you first next on to a session bean to expose methods on these entities. Will post this soon.

No comments:

Post a Comment