Using the Sun TCP/IP JCA Adapter

Setting Up the Runtime Environment for the TCP/IP JCA Adapter

This section provides step-by-step instructions for installing the RAR file for the TCP/IP JCA Adapter and setting up the GlassFish runtime environment using the Admin Console.

ProcedureTo Install the Global RAR for the TCP/IP JCA Adapter

  1. Start the GlassFish application server.

  2. Access Admin Console by pointing your browser at http://localhost:4848

    If your application server is running on a remote machine, and/or uses a port other than 4848 for administration, make the appropriate changes to the URL.

  3. Log in to Admin Console.

  4. In the Common Tasks pane on the left side, expand Applications -> Connector Modules.

    If “sun-tcpip-adapter” appears in the list, the RAR has already been installed.

  5. In the “Deploy Enterprise Applications/Modules” pane, do the following and then click OK.

    1. For Type, retain “Connector Module (.rar)”

    2. For Location, retain “Packaged file to be uploaded to server”.

    3. Click Browse and navigate to the location of the sun-tcpip-adapter.rar file.

      This is by default located in .../AdapterPack/Runtime/adapters/.

      Deploying sun-tcpip-adapter.rar, the connector
module for the TCP/IP JCA Adapter
  6. In the “Edit Resource Adapter Properties” pane, you can optionally supply or edit properties. Then click Finish.

    Result: Once you have deployed the global RAR onto the application server, you will be able to see it in the NetBeans IDE under Servers -> GlassFish V2 -> Applications -> Connector Module:

    Seeing sun-tcpip-adapter in the NetBeans IDE
under Servers -> GlassFish V2 -> Applications -> Connector
Module

ProcedureTo Add a Connector Connection Pool for the TCP/IP JCA Adapter

You will use Admin Console Resources -> Connectors -> Connector Connection Pools to add a new pool for sun-tcpip-adapter.

  1. If you have not already done so, start GlassFish and log in to Admin Console.

  2. In the Common Tasks pane on the left, expand Resources -> Connectors -> Connector Connection Pools.

  3. In the Connector Connection Pools pane on the right, click the “New” button.

  4. In step 1 of the wizard, supply the following information and then click Next.

    • Name: Supply a name for the TCPIP pool.

    • Resource Adapter: Choose sun-tcpip-adapter

    • Connection Definition: Retain the default provided when you choose the adapter.

    Step 1 of the New Connector Connection Pool wizard
for the TCP/IP JCA Adapter
  5. In step 2 of the wizard, retain or change the settings provided and then click Finish.

    Result: The new pool appears in the tree. You will be able to see it in the NetBeans IDE under Servers -> GlassFish V2 -> Resources -> Connectors -> Connector Connection Pools:

    NetBeans IDE tree showing new connector connection
pool for the TCP/IP JCA Adapter

ProcedureTo Add a Connector Resource for the TCP/IP JCA Adapter

  1. If you have not already done so, start GlassFish and log in to Admin Console.

  2. In the Common Tasks pane on the left, expand Resources -> Connectors -> Connector Resources.

  3. In the Connector Resources pane on the right, click the “New” button.

  4. Supply the following information and then click OK.

    • JNDI Name: Supply a name, such as caps/poolTCPIP by which applications will reference the TCPIP pool.

    • Pool Name: Choose a connector connection pool for TCPIP, such as the one created in the previous procedure.

    • Description: Optionally, supply a meaningful description of this particular JNDI resource.

    Admin Console creating a new connector resource
for the TCP/IP JCA Adapter

    Result: The new resource appears in the tree. You will be able to see it in the NetBeans IDE under Servers -> GlassFish V2 -> Resources -> Connectors -> Connector Resources:

    NetBeans IDE tree showing new connector resource
for the TCP/IP JCA Adapter