Setup the JMS Connection Factories

Procedure

  1. Navigate to Resources > JMS > JMS providers;
  2. Note: The appropriate scope where the JMS resources are to be defined should be selected at this point.
  3. Select the Default messaging provider link;
  4. Select the Connection factories link in the Additional Properties section;
  5. Click New and set the following fields:

    Name : CuramQueueConnectionFactory

    JNDI Name : jms/CuramQueueConnectionFactory

    Description : The factory for all connections to application queues.

    Bus Name : CuramBus

    Authentication alias for XA recovery : Same as for the jdbc/curamdb data source (e.g. <SERVERNAME> /dbadmin)

    Mapping-configuration alias : DefaultPrinicipalMapping

    Container-managed authentication alias : Same as for the Authentication alias for XA recovery.

    Leave everything else as the default and click OK to apply the changes;

  6. Click New and set the following fields:

    Name : CuramTopicConnectionFactory

    JNDI Name : jms/CuramTopicConnectionFactory

    Description : The factory for all connections to application queues.

    Bus Name : CuramBus

    Authentication alias for XA recovery : Same as for the jdbc/curamdb data source (e.g. <SERVERNAME> /dbadmin)

    Mapping-configuration alias : DefaultPrinicipalMapping

    Container-managed authentication alias : Same as for the jdbc/curamdb data source (e.g. <SERVERNAME> /dbadmin)

    Leave everything else as the default and click OK to apply the changes;

  7. Save the changes to the master configuration as described in Save the Master Configuration.

Results

Note: With the above manual configuration steps it is not possible to correctly configure security for the queue and topic connection factories. To complete this part of the configuration you must use the wsadmin tool. To do so follow these steps:
  1. Identify the queue and topic connection factory entries in the WebSphere Application Server configuration resources.xml file. This file resides in the %WAS_HOME%\profiles\<profile_name>\config file system hierarchy depending on your naming conventions and the scope where you defined your JMS resources. For instance, using a node-level scope with a profile name of AppSrv01, a cell name of MyNodeCell and a node name of MyNode you would find this file here: C:\WebSphere\profiles\AppSrv01\config\cells\MyNodeCell\nodes\MyNode\resources.xml. In this file you must find the <factories> entities for the CuramQueueConnectionFactory and CuramTopicConnectionFactory and make note of the ID for each that begins J2CConnectionFactory_ followed by a numeric (e.g. 1264085551611).
  2. Invoke the wsadmin WebSphere script. In these examples the language is JACL, so the -lang jacl argument may need to be specified along with login credentials, etc. depending on your local configuration.
  3. In wsadmin invoke the following commands; again, assuming node-scope definitions, a cell name of MyNodeCell, and a node name of MyNode, the resource IDs will be different in your environment.
    1. $AdminConfig getid /Node:MyNode
    2. $AdminTask showSIBJMSConnectionFactory CuramQueueConnectionFactory(cells/MyNodeCell/nodes/MyNode|resources.xml#J2CConnectionFactory_1264085551611)

      Here you should verify that authDataAlias is not set (e.g. authDataAlias=), else you're done, as shown in this sample wsadmin output:

      {password=, logMissingTransactionContext=false,
      readAhead=Default, providerEndpoints=,
      shareDurableSubscriptions=InCluster,
      targetTransportChain=, authDataAlias=, userName=,
      targetSignificance=Preferred,
      shareDataSourceWithCMP=false,
      nonPersistentMapping=ExpressNonPersistent,
      persistentMapping=ReliablePersistent, clientID=,
      jndiName=jms/CuramQueueConnectionFactory,
      manageCachedHandles=false,
      consumerDoesNotModifyPayloadAfterGet=false,
      category=, targetType=BusMember, busName=CuramBus,
      description=None,
      xaRecoveryAuthAlias=crouch/databaseAlias,
      temporaryTopicNamePrefix=, remoteProtocol=,
      producerDoesNotModifyPayloadAfterSet=false,
      connectionProximity=Bus, target=,
      temporaryQueueNamePrefix=,
      name=CuramQueueConnectionFactory}
    3. $AdminTask modifySIBJMSConnectionFactory CuramQueueConnectionFactory(cells/MyNodeCell/nodes/MyNode|resources.xml#J2CConnectionFactory_1264085551611) {-authDataAlias crouch/databaseAlias}
    4. $AdminConfig save
    5. You can re-show the resource to verify the change.
    6. Repeat the steps for the CuramTopicConnectionFactory.
    7. Restart the application server.