Configuring RTDS for Adaptive Server

This section provides instructions on how to configure Real-Time Data Services.

Before you begin, set your Adaptive Server environment settings by sourcing SYBASE.sh or SYBASE.csh.

Real-Time Data Services, as a messaging services feature, uses these Adaptive Server sp_configure configuration parameters, which you set when you configure Adaptive Server:

This example assumes that current 'max online engines' is 4.

-- Add 2 more to 'max online engines'.
sp_configure 'max online engines', 6
go
sp_configure 'max online Q engines', 2
go
sp_configure 'number of Q engines at startup, 2
go

MQ only – set the path for the MQ client shared libraries to the dynamic linker’s search path using the information in Table 4 for your platform.

Table 4: MQ client shared libraries and their paths

Platform

Path

Solaris 64-bit

/opt/mqm/lib64

Solaris 32-bit

/opt/mqm/lib

Linux 32-bit

/opt/mqm/lib

HPUX 64-bit

/opt/mqm/lib64

AIX 64-bit

/usr/mqm/lib64

Windows

c:\Program files\IBM\WebSphere MQ\bin

NoteOn UNIX platforms, your MQ client shared library path must be correct before you start Adaptive Server. Windows sets the PATH automatically when you install IBM MQ even if you install the client shared libraries in other locations.

StepsConfiguring your installation

  1. Run the installmsgsvss script to install system stored procedures for real-time messaging services:

    isql -Usa -Psa_password -Sserver_name
        -i$SYBASE/$SYBASE_ASE/scripts/installmsgsvss
        -ooutput_file
    
  2. Add your local server:

    sp_addserver, <local server name>
    
  3. Shut down your server.

  4. Set the SYBASE_JRE variable to point to $SYBASE/shared/jre142 (%SYBASE%\Shared\Sun\jre142 on Windows), so that the JVM can start when you enable real-time messaging:

    SYBASE_JRE = $SYBASE/shared/jrel42
    
  5. Restart your server.

  6. Adaptive Server version 15.0.1 ESD #1 only – when you install Real-Time Data Services, the properties file is copied into the your Adaptive Server shared libraries directory.

    1. After you have installed RTDS, verify that the properties file is its default location:

      • On UNIX – in the shared libraries directory in $SYBASE/$SYBASE_ASE/lib/rtms.properties

      • On Windows – in the binary directory in %SYBASE%\%SYBASE_ASE%\lib\rtms.properties

    2. To save the properties file to other locations, specify the new location with the sp_msgadmin 'config', 'jvmpropertyfile', 'new location of rtms.properties' stored procedure. See the reference pages for sp_msgadmin in the Messaging Services User’s Guide for Adaptive Server Enterprise for details.

    3. Before you run RTDS, modify its contents so that the rtms.properties file points to the correct location of the messaging provider’s client JAR file. The contents of rtms.properties should look similar to:

      TIBCOQUEUEMETHOD = 
          createQueueConnection(java.lang.String,java.lang.String)
      TIBCOTOPICMETHOD = 
          createTopicConnection(java.lang.String,java.lang.String)
      TIBCOTFACTORY = com.tibco.tibjms.TibjmsTopicConnectionFactory
      TIBCOQFACTORY = com.tibco.tibjms.TibjmsQueueConnectionFactory
      TIBCOJAR = $SYBASE/$SYBASE_ASE/lib/tibjms.jar
      EASQUEUEMETHOD = com.sybase.jms.InitialContextFactory
      EASTOPICMETHOD = com.sybase.jms.InitialContextFactory
      EASTFACTORY = javax.jms.TopicConnectionFactory
      EASQFACTORY = javax.jms.QueueConnectionFactory
      EASJAR = $SYBASE/$SYBASE_ASE/lib/easclient.jar
      
      
      • For TIBCO – change $SYBASE/$SYBASE_ASE/lib/tibjms.jar to the location where you installed tibjms.jar file (%SYBASE%\%SYBASE_ASE%\lib\tibjms.jar on Windows)

      • For EAServer – change $SYBASE/$SYBASE_ASE/lib/easclient.jar to the location where you installed easclient.jar file (%SYBASE%\%SYBASE_ASE%\lib\easclient.jar on Windows)

    NoteMessaging operations such as msgsend and msgrecv fail if Adaptive Server cannot access the JAR file.

  7. For the new configuration to take effect, restart the Java Real-Time Data Services JVM server by disabling real-time messaging:

    sp_configure 'enable real time messaging',0
    
  8. Re-enable real-time messaging:

    sp_configure 'enable real time messaging',1
    
  9. Assign messaging_role permissions to users. For example:

    grant role messaging_role to <login>
    

StepsSetting up MQ

  1. Create and start a Queue Manager. In this example, the queue manager is called QM1:

    % crtmqm QM1
    
    WebSphere MQ queue manager created.
    Creating or replacing default objects for QM1.
    Default objects statistics : 31 created. 0 replaced. 
    0 failed.
    Completing setup.
    Setup completed.
    
    % strmqm QM1
    
    WebSphere MQ queue manager 'QM1' started.
    
  2. Use the MQSC tool to create a queue. This example creates a queue on the QM1 Queue Manager called Q1:

    % runmqsc QM1
    
    5724-B41 (C) Copyright IBM Corp. 1994, 2002. ALL RIGHTS RESERVED.
    Starting WebSphere MQ script Commands.
    define qlocal(Q1)
           1 : define qlocal(Q1)
    AMQ8006: WebSphere MQ queue created.
    end
           2 : end
    No MQSC commands read.
    No commands have a syntax error.
    All valid MQSC commands were processed.
    
  3. Use the MQSC tool to define a server channel in the Queue Manager. This example defines a channel on QM1 called CH1:

    % runmqsc QM1
    
    5724-B41 (C) Copyright IBM Corp. 1994, 2002. ALL RIGHTS RESERVED.
    Starting WebSphere MQ script Commands.
    define channel(CH1) chltype(SVRCONN)
           1 : define channel(CH1) chltype(SVRCONN)
    AMQ8014: WebSphere MQ channel created.
    end
           2 : end
    No MQSC commands read.
    No commands have a syntax error.
    All valid MQSC commands were processed.
    
  4. Add authorizations for the SYBASE user login and ASE logins. In this example, Adaptive Server runs as user “sybase,” and the Adaptive Server messaging user is “login1” and the queue is “Q1”:

    % setmqaut -m QM1 -t qmgr -p sybase +connect +altusr +inq +setid
    % setmqaut -m QM1 -t q -n Q1 -p login1 +inq +get +browse +put
    
  5. Start an MQ listener. This example starts a listener on port 8765:

    % runmqlsr -t tcp -p 8765 -m QM1 &
    

The following shows the endpoint URL for the objects created in these examples, with “myhost” as the host name:

ibm_mq:CH1/tcp/myhost(8765)?qmgr=QM1,queue=Q1