In this step you create the EJB 3.0 project, which provides the framework for the development of the message-driven bean (MDB). Then you add the EJB 3.0 project to an Enterprise Application Archive (EAR).
Open the Developer Studio and specify the workspace.
Create a new project. In the Developer Studio from the menu path choose
to start the New Project wizard.Select
and chooseNext.In the New EJB Project screen you:
Specify MyFirstMDB as the name of the project.
Select the Add project to an EAR checkbox and enter MDBEar in the EAR Project Name field. This automatically creates the Enterprise Application Archive and adds the EJB 3.0 project to it.
Choose New... to adjust the Project Facets in the EAR project. A New EAR Application Project screen appears.
Choose Next.
Select the Create SAP JMS resources descriptor checkbox in the Project Facet list to add the jms-resources.xml in the EAR project.
Choose Finish.
Choose Finish.
You have created the EJB 3.0 project MyFirstMDB and the EAR project MDBEar. The structure of your project is currently displayed in the Project Explorer.
In this tutorial, you also create and implement an MDB, which is a consumer of a message sent by a client residing on the server. There is also an example SimpleSenderClient class, which is the client sending a message to an MDB.
The process of developing and deploying an MDB application consists of the following steps:
Create an EJB Project.
Develop the enterprise bean (EJB).
Assemble the enterprise application archive (EAR file).
You can choose the type of the sender to be either an internal Java EE client (another EJB, servlet or JSP) or a remote Java client.