Using the JMS Target Connector
In this example, PeopleSoft Integration Broker will generate a JMS message, which will be consumed outside of the PeopleSoft system.
To use the JMS target connector:
-
On the JMS provider, create a JMS Connection Factory with the JNDI name ExampleConnectionFactory.
-
On the JMS provider, create a JMS Queue with the JNDI name ExampleQueue.
-
In PeopleSoft Application Designer, open the EXAMPLE_WORKREC record and add the following PeopleCode to the FieldChange event for the TEST field:
/* create an XML document */ &xmldata = "<?xml version='1.0'?><ConnectorTest/>"; &xmlDoc = CreateXmlDoc(&xmldata); &rootNode = &xmlDoc.documentelement; /* add text to the document */ &descNode = &rootNode.AddElement("TestNode"); &descNode.NodeValue = "Sending a message to a JMS queue."; /* and send it out in an async request */ &MSG = CreateMessage(Operation.EXAMPLE_SERVICE_ASYNC_OPR); &MSG.SetXmlDoc(&xmlDoc); %IntBroker.Publish(&MSG); MessageBox(0, "", 0, 0, "Message sent."); -
In the PeopleSoft Pure Internet Architecture, open the node definition for TARGETNODE. Set the Connector ID to JMSTARGET. Set the values for the following properties:
Property Value JMSFactory
ExampleConnectionFactory.
JMSProvider
Name of the provider being used.
JMSUrl
Connection URL for the provider.
JMSQueue
ExampleQueue.
JMSUserName
The username on the JMS provider.
JMSPassword
The encrypted password for the user ID.
-
Test the connector:
-
Open the test page, and click on the Test button.
-
Verify that the message was sent to the queue. The exact mechanism for doing depends on the provider or utility that you are using.
-