Create a new Java EE Enterprise Application
In your NetBeans IDE, hit the menu item File. Then select New Project… > Java EE > Enterprise Application.
Hit Next and enter some stuff:
At the next screen, let NetBeans also create an EJB Module for you (this module will become a separate project added to the EAR Project). Check Enable Contexts and Dependency Injection: