Using the Sun TCP/IP JCA Adapter

ProcedureTo Use TCP/IP-Specific Sample Code

  1. In the NetBeans IDE, open the .java file containing the message-driven bean you just created.

  2. From the palette, under JCA, drag TCPIP onto the code canvas as shown in the far right of the following illustration:

    Dragging TCPIP from the JCA code palette.
  3. In the JCA Wizard, provide appropriate values for the TCP/IP JCA Adapter declaration and then click Finish

    Browsing to the correct Resource JNDI Name for
the adapter declaration

    Result:Three blocks of sample code are added, as shown (expanded) below.

    Sample code added by dragging TCPIP from the
JCA code palette
  4. Expand each block and edit the code as needed for your implementation.