Designing with Application Adapters

Additional JMS Configurations

Configuring Inbound JMS Connections

To configure inbound JMS connections, you must edit the IntegrationGateway.properties file as described in the procedure.

ProcedureTo Configure Inbound JMS Connections

  1. Open the IntegrationGateWay.properties file from the following directory:


    bea\wlserver6.1\config\peoplesoft\applications\PSIGW\WEB-INF

    where, bea is the WebLogic installation directory.

  2. Edit the file for the JMS queue listener properties.

    You can configure multiple queues by using the convention ig.jms.queue1, ig.jms.queue2, ig.jms.queue3, and so on. Configuring Inbound JMS Connections shows how the JMS listener is configured for the GenericOutQueue.

    ig.jms.Queues=1 

    “1” indicates only one queue. 

    ig.jms.Queue1=GenericOutQueue 

    The first queue name “GenericOutQueue”, must be the same in the .bindings file. The Java code used to generate the entry in the .bindings is: 


    queue = new STCQueue("GenericOutQueue");
    q = null;
      try {
              q = (Queue)
             jndifContext.lookup("GenericOutQueue");             
    System.out.println(q.getClass().getName());
                } catch (Exception e) {
                     System.out.println("fcontext 
    GenericOutQueue lookup exception");
                    e.printStackTrace();
                }
                if (q == null) {
                    System.out.println("q is null...bind 
    GenericOutQueue as GenericOutQueue");
                    jndifContext.bind("GenericOutQueue", 
    queue);            }

    ig.jms.Queue1.Provider=SunSeeBeyond 

    The “SunSeeBeyond” entry must match the configuration entry in the integrationgateway.properties file: 

    ig.jms.JMSProvider.JNDIFactory.SeeBeyond=com.sun.jndi.fscontext.RefFSContextFactory 

    ig.jms.Queue1.JMSFactory=QueueConnectionFactory 

    “QueueConnectionFactory” is the JNDI name in the .bindings file. Use the following Java code to generate the entry: 


    QueueConnectionFactory tgtqcf  = null;
                try {
                    /*you can change the jndi name here, 
    the jndi name use here must 
    be exactly same
                     *as in the websphere’s Generic JMS 
    Provider’s configuration 
    External JNDI Name
                     */
                    tgtqcf = (QueueConnectionFactory) 
    jndifContext.lookup("Queue
    ConnectionFactory");
                } catch (Throwable e) {
                    System.out.println("fcontext Queue
    ConnectionFactory lookup exception");
                    e.printStackTrace();
                }
                if (tgtqcf == null) {
                    System.out.println("fcontext Queue
    ConnectionFactory lookup is null...");
                                        
                    jndifContext.bind("QueueConnection
    Factory", srcqcf);
                } else {
                    System.out.println("fcontext Queue
    ConnectionFactory is NOT 
    null...unbind then re-bind QueueConnectionFactory");
                                        
                    jndifContext.unbind("Queue
    ConnectionFactory");
                    jndifContext.rebind("Queue
    ConnectionFactory", srcqcf);
                }

    ig.jms.Queue1.MessageSelector= 

    See the Java CAPS JMS Reference Java CAPS JMS Reference .

    ig.jms.Queue1.Url=file:c:/jndibindings/ 

    The URL of the .bindings file. Because PeopleSoft only supports fcontext, this is a directory name. 

    ig.jms.Queue1.User=Administrator 

    User name to Enterprise Service Bus JMS server. 

    ig.jms.Queue1.Password=SwBAuVVABok= 

    Encrypted value of the password to Enterprise Service Bus JMS server. Use the PeopleSoft utility pscipher to get the encrypted value. 

  3. Edit the file for the JMS queue listener properties.

    You can configure multiple queues by using the convention ig.topic1, ig.topic2, ig.topic3, and so on. The table shows how to configure the JMS topic to use the GenericOutTopic.

    ig.jms.Topics=1 

    “1” indicates only one topic. 

    ig.jms.Topic1=GenericOutTopic 

    The first topic name “GenericOutTopic”, must be the same in the .bindings file. The Java code to generate this entry in the .bindings is: 


    topic = new STCTopic("GenericOutTopic");
                t = null;
                try {
                    /*you can change the jndi name here, 
    the jndi name use here 
    must be exactly same
                     *as in the websphere’s Generic JMS 
    Provider’s configuration 
    External JNDI Name
                     */
                    t = (Topic) jndifContext.lookup
    ("GenericOutTopic");
                    System.out.println(t.getClass().
    getName());
                } catch (Exception e) {
                     System.out.println("fcontext 
    GenericOutTopic lookup exception");
                    e.printStackTrace();
                }
                if (t == null) {
                    System.out.println("t is null...bind 
    GenericOutTopic as 
    GenericOutTopic");
                    jndifContext.bind("GenericOutTopic", 
    topic);            }

    ig.jms.Topic1.Provider=SunSeeBeyond 

    The “SunSeeBeyond” entry must match the configuration entry in the integrationgateway.properties file: 

    ig.jms.JMSProvider.JNDIFactory.SeeBeyond=com.sun.jndi.fscontext.RefFSContextFactory 

    ig.jms.Topic1.JMSFactory=TopicConnectionFactory 

    “TopicConnectionFactory” is the JNDI name in the .bindings file. Use the following Java code to generate the entry: 

    TopicConnectionFactory tgttcf = null; 


                try {
                    /*you can change the JNDI name here, 
    the JNDI name use here must be exactly same
                     *as in WebSphere’s Generic JMS 
    Provider’s configuration External JNDI Name
                     */
                    tgttcf = (TopicConnectionFactory) 
    jndifContext.lookup("TopicConnectionFactory");
                } catch (Throwable e) {
                    System.out.println("fcontext 
    TopicConnectionFactory lookup exception");
                    e.printStackTrace();
                }
                if (tgttcf == null) {
                    System.out.println("fcontext 
    TopicConnectionFactory lookup is null...");
                    jndifContext.bind(
    "TopicConnectionFactory", srctcf);
                } else {
                    System.out.println("fcontext 
    TopicConnectionFactory is NOT null...unbind 
    then re-bind TopicConnectionFactory");
                    jndifContext.unbind(
    "TopicConnectionFactory");
                    jndifContext.rebind(
    "TopicConnectionFactory", srctcf);
                }

    ig.jms.Topic1.MessageSelector= 

    Refer to the queue table. 

    ig.jms.Topic1.Url=file:c:/jndibindings/ 

    Refer to the queue table. 

    ig.jms.Topic1.User=Administrator 

    Refer to the queue table. 

    ig.jms.Topic1.Password=SwBAuVVABok= 

    Refer to the queue table. 

Creating the JNDI Bindings File for JMS Posting

To enable the PeopleSoft Adapter to post to PeopleSoft using JMS, you must have a JNDI bindings file in place. You can generate the bindings file with any standard JNDI generation application. Sun provides a sample generation application called PSFTBindJMS.java. This program and two associate applications, compile.bat and run.bat, are included in the sample Project file.

You must edit and recompile the PSFTBindJMS.java file before generating the bindings file.

ProcedureTo Create the JNDI Bindings File

  1. Create the directory, C:\testprogram. Copy the PSFTBindJMS.java, compile.bat, and run.bat files to this directory.


    Note –

    The latest version of the Enterprise Service Bus API Kit JAR files must be added to the WebLogic PeopleSoft-PIS server classpath. To confirm this, check the JAR files in the server’s setENV.cmd file located in the following location (or equivalent): C:\bea\wlserver6.1\config\peoplesoft\setEnv.cmd If you have installed the PeopleSoft-PIA service as a Windows Service, you must uninstall and reinstall the service by executing unInstallNTServicePIA.cmd first, then executing installNTServicePIA.cmd. This is a runtime classpath requirement to confirm the new classpath.


  2. Open the PSFTBindJMS.java file in a text editor and follow the directions presented in the text of the file. Edit the JNDI bindings generation application with the Enterprise Service Bus host name and location. Verify that the Enterprise Service Bus JMS server port number is correct. This port number must match the Server port property for the JMS IQ Manager in the Enterprise Designer. For information, refer to the Java CAPS JMS Reference .

  3. Modify the following line to point to your own directory:


    fcontextprops.put(Context.PROVIDER_URL, "file:C:\\eGateExports\\PeopleSoft\\JMS");

    Note –

    If you are installing the Sun Java Composite Application Platform Suite and the PeopleSoft Adapter on a computer that previously included ICAN 5.0.5, be sure to delete all of the previously installed API JAR files, and follow the directions in the Sun Enterprise Service Bus API Kit Developer’s Guide to modify your classpath to include the new API JAR files.


  4. Double-click compile.bat to compile the program. A class file is generated.

  5. Double-click run.bat to run the program. This creates a .bindings file.

  6. Copy the .bindings file to the location of the JMSUrl property described in the section above (see Creating Target Nodes to Post to Enterprise Service Bus Using JMS.

    When you run the bindings generation application for the first time, the following message is displayed:


    fcontext TopicConnectionFactory lookup exception, you never had this jndi entry
    fcontext TopicConnectionFactory lookup is null... will bind to the jndi name
    fcontext GenericInTopic lookup exception, it doesn’t exist
    GenericInTopic is null...bind GenericInTopic as GenericInTopic
    fcontext GenericOutTopic lookup exception, it doesn’t exist
    GenericOutTopic is null...bind GenericOutTopic as GenericOutTopic
    fcontext ErrorTopic lookup exception, it doesn’t exist
    t is null...bind ErrorTopic as ErrorTopic
    fcontext QueueConnectionFactory lookup exception it doesn’t exist
    fcontext QueueConnectionFactory lookup is null...bind with new value
    fcontext GenericInQueue lookup exception, it doesn’t exist
    GenericInQueue is null...bind GenericInQueue as GenericInQueue
    fcontext GenericOutQueue lookup exception
    GenericOutQueue is null...bind GenericOutQueue as GenericOutQueue

    In the subsequent runs, the following message is displayed:


    fcontext TopicConnectionFactory is NOT null...unbind then re-bind 
    TopicConnectionFactory will overwrite old value
    com.stc.jms.client.STCTopic
    fcontext GenericInTopic is NOT null...unbind then re-bind GenericInTopic 
    will overwrite old valuecom.stc.jms.client.STCTopic
    fcontext GenericOutTopic is NOT null...unbind then re-bind GenericOutTopic 
    will overwrite old valuecom.stc.jms.client.STCTopic
    fcontext ErrorTopic is NOT null...unbind then re-bind ErrorTopic 
    will overwrite old value
    fcontext QueueConnectionFactory is NOT null...unbind then re-bind 
    QueueConnectionFactorycom.stc.jms.client.STCQueue
    fcontext GenericInQueue is NOT null...unbind then re-bind GenericInQueue 
    will overwrite old valuecom.stc.jms.client.STCQueue
    fcontext GenericOutQueue is NOT null...unbind then re-bind GenericOutQueue 
    will overwrite old value
  7. Once you have completed all of these steps, restart the PeopleSoft-PIA services. You can restart the PIA services from the Windows Services console, or you can restart the service from a Command Line using the following command:


    startIA.cmd

    After you execute this command, monitor the PIA_weblogic.log file until you see the following output:


    #### <> <000329>

    This indicates that the PIA Service is started. If you use this method of starting the PIA service, be aware that the Windows Services console will not accurately reflect that the service has been started.

  8. Stop and restart the JMSListeningConnector using the URL (see Starting and Stopping the JMS Listening Connector). After you start the JMS Listening Connector, monitor the PIA_weblogic.log. The following message indicates that the JMS Listening Connector has started correctly:


    #### <> <> <101047> <[WebAppServletContext(2244929,PSIGW,
    /PSIGW)] JMSListeningConnectorAdministrator: init>
    #### <> <> <101047> <[WebAppServletContext(2244929,PSIGW,
    /PSIGW)] PeopleSoftListeningConnector: init>

    If you perform step Creating the JNDI Bindings File for JMS Posting before the PIA service is ready, the JMS Listening Connector will not be active, so it will not receive messages from Enterprise Service Bus.

Starting and Stopping the JMS Listening Connector

To Start the JMS Listening Connector, use the following command:


http://hostname:port/PSIGW/JMSListeningConnectorAdministrator?Activity=START

To Stop the JMS Listening Connector, use the following command:


http://hostname:port/PSIGW/JMSListeningConnectorAdministrator?Activity=STOP

Verifying the JMS Connection

To verify if your JMS connection works, you can use the StartSendMaster.bat provided by PeopleSoft in the following location:


c:\bea\wlserver6.1\config\peoplesoft\applications\PSIGW