Lets start building "Online Tweeter Enterprise Application" in NetBeans from scratch.
Creating an Enterprise Application Project in NetBeans - Follow steps mentioned below :
Step 1: Open NetBeans 7.0 or above version.
Step 2: Go to File Menu and Select New Project
Step 3: On clicking New Project menu item, a New Project dialog box appears which prompts us to Choose Project. Select Java EE from the Categories: panel and Select Enterprise Application from Projects: panel as shown in below fig.
Step 4: Click

New Enterprise Application dialog box gets open. It prompts us to provide Name and Location of the project.
a) Project Name: provide as shown in fig below
b) Project Location: provide as shown in fig below or you can provide as per your convenience.
c) Select the checkbox for "Use Dedicated Folder for Storing Libraries" and "Set as Main Project".
Step 5: Click

A new dialog box opens for New Enterprise Application prompting us to provide Server and Settings details. Choose details as mentioned in the fig below.
Step 6: Click
Tweeter Project has been created in NetBeans IDE. As per diagram below NetBeans IDE creates three modules ie.
1. Tweeter
2. Tweeter-ejb
3. Tweeter-war
In part 2 you will be able to Create a persistence Unit for application.
Creating an Enterprise Application Project in NetBeans - Follow steps mentioned below :
Step 1: Open NetBeans 7.0 or above version.
Step 2: Go to File Menu and Select New Project
Step 3: On clicking New Project menu item, a New Project dialog box appears which prompts us to Choose Project. Select Java EE from the Categories: panel and Select Enterprise Application from Projects: panel as shown in below fig.
Step 4: Click

New Enterprise Application dialog box gets open. It prompts us to provide Name and Location of the project.
a) Project Name: provide as shown in fig below
b) Project Location: provide as shown in fig below or you can provide as per your convenience.
c) Select the checkbox for "Use Dedicated Folder for Storing Libraries" and "Set as Main Project".
Step 5: Click

A new dialog box opens for New Enterprise Application prompting us to provide Server and Settings details. Choose details as mentioned in the fig below.
Step 6: Click
Tweeter Project has been created in NetBeans IDE. As per diagram below NetBeans IDE creates three modules ie.
1. Tweeter
2. Tweeter-ejb
3. Tweeter-war
In part 2 you will be able to Create a persistence Unit for application.