This section provides step-by-step procedures for creating an EJB Module project and populating it with TCP/IP JCA Adapter code.
In the NetBeans IDE main menu, click File -> New Project.
The New Project wizard appears.
Select the following category and project type and then click Next:
Category: Enterprise
Project: EJB Module
Provide a project name and location and then click Next.
Retain the default values for Server and Settings and then click Finish.
Right-click the EJB Module project and select New -> JCA Message-Driven Bean:
The New JCA Message-Driven Bean wizard appears.
Provide a package name and then click Next:
For the Choose Inbound JCA step, select TCPIP JCA Adapter and then click Next:
In the final step of the wizard, you can optionally edit the instance properties before clicking Finish.
If you click the ellipsis to the right of the Configuration property (as shown above), you can view or edit configuration settings of the TCP/IP JCA Adapter:
For a complete list and description of configuration properties, see Configuration Settings for the TCP/IP JCA Adapter.
In the NetBeans IDE, open the .java file containing the message-driven bean you just created.
From the palette, under JCA, drag TCPIP onto the code canvas as shown in the far right of the following illustration:
In the JCA Wizard, provide appropriate values for the TCP/IP JCA Adapter declaration and then click Finish
Result:Three blocks of sample code are added, as shown (expanded) below.
Expand each block and edit the code as needed for your implementation.