Presentation is loading. Please wait.

Presentation is loading. Please wait.

SOA-2: OpenEdge® 10.1A Adapters for SonicMQ® New Install, New Architecture, and New APIs Cheryl LaBarge Senior Training Program Manager.

Similar presentations


Presentation on theme: "SOA-2: OpenEdge® 10.1A Adapters for SonicMQ® New Install, New Architecture, and New APIs Cheryl LaBarge Senior Training Program Manager."— Presentation transcript:

1 SOA-2: OpenEdge® 10.1A Adapters for SonicMQ® New Install, New Architecture, and New APIs Cheryl LaBarge Senior Training Program Manager

2 © 2006 Progress Software Corporation2 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Agenda  New Install  Now Supporting JMS 1.1  New Architecture  New APIs  Error Handling This presentation includes annotations with additional complementary information. API reference details are supplied in the notes for each slide. OpenEdge 10.1A Adapters for SonicMQ

3 © 2006 Progress Software Corporation3 SOA-2: OpenEdge 10.1A Adapters for SonicMQ MQ Client New Install – A Symbiotic Process  OpenEdge10.1A Connections to Sonic 6.1 SonicMQ 6.1 Client included on OpenEdge Media SonicMQ 6.1 Client “Silent Install” to OpenEdge directory –Offline.bat or Offline.sh to install later A component no longer a product

4 © 2006 Progress Software Corporation4 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Agenda  New Install  Now Supporting JMS 1.1  New Architecture  New APIs  Error Handling OpenEdge 10.1A Adapters for SonicMQ

5 © 2006 Progress Software Corporation5 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Prior to 10.1A  Two different sessions Queue Topic RUN jms/pubsubsession.p. RUN jms/ptpsession.p. JMS 1.0

6 © 2006 Progress Software Corporation6 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - Prior to 10.1A DEFINE VARIABLE ptpsession AS HANDLE NO-UNDO. DEFINE VARIABLE hMsg AS HANDLE NO-UNDO. DEFINE VARIABLE cText AS CHARACTER INITIAL “PTPsession ONLY" NO-UNDO. RUN jms/ptpsession.p PERSISTENT SET ptpsession ("-H OEServer -S 5162"). RUN setBrokerURL IN ptpsession (“tcp://MQBrokerHost:2506”). RUN beginSession IN ptpsession. RUN sendToQueue IN ptpsession ("SampleQ1", hMsg, ?, ?, ?). RUN deleteSession IN ptpsession. Point to Point Session Sends to Queue Prior to 10.1A - Create a ptp session object

7 © 2006 Progress Software Corporation7 SOA-2: OpenEdge 10.1A Adapters for SonicMQ 10.1A - Combination of PTP and Pub/Sub  New in 10.1A Parent containing all APIs  All new code should use jmssession.p!!! RUN jms/jmssession.p. JMS 1.1 Unified Domain Model

8 © 2006 Progress Software Corporation8 SOA-2: OpenEdge 10.1A Adapters for SonicMQ DEFINE VARIABLE hSession AS HANDLE NO-UNDO. DEFINE VARIABLE hMsg AS HANDLE NO-UNDO. DEFINE VARIABLE cText AS CHARACTER INITIAL “Unified JMSsession" NO-UNDO. RUN jms/jmssession.p PERSISTENT SET hSession ("-H myMachine -S 5162"). RUN setBrokerURL IN hSession (“tcp://:2506"). RUN sendToQueue IN hSession ("SampleQ1", hMsg, ?, ?, ?). RUN publish IN hSession ("Topic1", hMsg, ?, ?, ?). RUN deleteMessage IN hMsg. RUN deleteSession IN hSession. Example - Unified Session in 10.1A Using a single session handle One session handle can send to queues AND publish to topics

9 © 2006 Progress Software Corporation9 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Demonstration – Unified Session SampleQ1 Topic1 Using Sonic JMS Test Client to view messages

10 © 2006 Progress Software Corporation10 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Agenda  New Install  Now Supporting JMS 1.1  New Architecture  New APIs  Error Handling OpenEdge 10.1A Adapters for SonicMQ

11 © 2006 Progress Software Corporation11 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Architecture  Prior to 10.1A OpenEdge Adapter for SonicMQ  OpenEdge 10.1A Connection Modes BrokerConnect ClientConnect ServerConnect OpenEdge Adapter for SonicMQ

12 © 2006 Progress Software Corporation12 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - BrokerConnect  Prior to 10.1A Separate processes –OpenEdge Adapter –Client  Still available in 10.1A RUN jms/jmssession.p PERSISTENT SET hSession ("-H OEServer -S 5162“). RUN setBrokerURL IN hSession(“tcp://MQBrokerHost:2506"). RUN beginSession IN hSession.

13 © 2006 Progress Software Corporation13 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - ClientConnect  SonicMQ ClientConnect Single Process - OpenEdge Adapter & Client AdminServer & NameServer no longer needed RUN jms/jmssession.p PERSISTENT SET hSession (“-SMQConnect"). RUN setBrokerURL IN hSession(“tcp://MQBrokerHost:2506"). RUN beginSession IN hSession.

14 © 2006 Progress Software Corporation14 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - ServerConnect  MQ-ServerConnect

15 © 2006 Progress Software Corporation15 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Logging  ClientConnect logging disabled by default JavaTools.properties –brkLogginglevel –srvrLogginglevel  ServerConnect Similar to 10.0A logging New page on AppServer and WebSpeed Agents

16 © 2006 Progress Software Corporation16 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Limitations of BrokerConnect FeatureBrokerConnectClientConnectServerConnect Unified DomainYes Client PersistenceNoYes Fault ToleranceNoYes Message SelectorsYes Serialized Connection ObjectsNoYes TemporaryQueues and TopicsYes BrokerConnect cannot take advantage of certain features

17 © 2006 Progress Software Corporation17 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Agenda  New Install  Now Supporting JMS 1.1  New Architecture  New APIs  Error Handling OpenEdge 10.1A Adapters for SonicMQ

18 © 2006 Progress Software Corporation18 SOA-2: OpenEdge 10.1A Adapters for SonicMQ New and Enhanced APIs  Client Message Persistence  Fault Tolerant Client Connections  Serialized Connection Objects  Enhanced XML support  Temp Table messages  DataSet messages  Temporary Destinations  Server Based Message Selectors

19 © 2006 Progress Software Corporation19 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Client Persistence  Allows applications to continue to send/publish messages when MQBroker connection is lost  Rechecking at set intervals  Messages are sent from local store (directory) when a connection is reestablished Available only with new connection modes

20 © 2006 Progress Software Corporation20 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Steps to Use Client Persistence 1.Create the session object 2.Use new client persistence APIs 3.Begin the session 4.Send/receive messages –If SonicMQ Broker unavailable, messages sent will be persisted

21 © 2006 Progress Software Corporation21 SOA-2: OpenEdge 10.1A Adapters for SonicMQ 1. Create Session Object RUN jms/jmssession.p PERSISTENT SET hSession ("-SMQConnect"). RUN setBrokerURL IN hSession ("localhost:2506"). RUN SETUSER IN hSession ("Administrator"). RUN setPassword IN hSession("Administrator"). /* Client Persistence Requires a Client ID */ RUN setClientID IN hSession ("TestClientPersistence999"). Client Persistence Requires an ID TypeNameParameters\Returns ProceduresetClientIDINPUT clientID AS CHAR Standard Steps…Except …

22 © 2006 Progress Software Corporation22 SOA-2: OpenEdge 10.1A Adapters for SonicMQ  Set/Get Local Store Directory Local Store Size Reconnect Timeout Reconnect Interval Client Persistence 2. Use New Client Persistence APIs New APIs

23 © 2006 Progress Software Corporation23 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Local Store Directory  Directory to persist messages TypeNameParameters\Returns ProceduresetLocalStoreDirectoryINPUT localStoreDir AS CHAR FunctiongetLocalStoreDirectoryRETURNS CHAR Default, current working directory –C:\OpenEdge\WRK Before beginSession

24 © 2006 Progress Software Corporation24 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Local Store Size  Maximum File Size Default 10,000(KB) Before beginSession TypeNameParameters\Returns ProceduresetLocalStoreSizeINPUT storeSize AS INTEGER FunctiongetLocalStoreSizeRETURNS INTEGER

25 © 2006 Progress Software Corporation25 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Reconnect Timeout  How long will it keep trying to reconnect Default 0 Minutes = No limit Before beginSession TypeNameParameters\Returns ProceduresetReconnectTimeoutINPUT timeout AS INTEGER FunctiongetReconnectTimeoutRETURNS INTEGER

26 © 2006 Progress Software Corporation26 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Reconnect Interval  Time between attempts Default 30 Seconds Before beginSession TypeNameParameters\Returns ProceduresetReconnectIntervalINPUT interval AS INTEGER FunctiongetReconnectIntervalRETURNS INTEGER QUESTION:What happens if you give up? ANSWER: Messages stay in local store. ANSWER: No, you can crack the local message open “just to look”!

27 © 2006 Progress Software Corporation27 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Client Persistence  Enable the client side property Default False Before beginSession TypeNameParameters\Returns ProceduresetClientPersistenceINPUT enabled AS LOGICAL FunctiongetClientPersistenceRETURNS LOGICAL

28 © 2006 Progress Software Corporation28 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Create Rejected Message Consumer  Handles all rejected message After beginSession NameParameters createRejectedMessageConsumerINPUT procHandle AS HANDLE INPUT procName AS CHAR OUTPUT consumerHandle AS HANDLE

29 © 2006 Progress Software Corporation29 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - Using the New APIs /* local store directory relative to cwd */ RUN setLocalStoreDirectory IN hSession ("mqstore"). RUN setLocalStoreSize IN hSession (50000). /* Give up if broker down 10 hours */ RUN setReconnectTimeout IN hSession (600). /* Retry every minute */ RUN setReconnectInterval IN hSession (60). /* set Client Persistence */ RUN setClientPersistence IN hSession (TRUE). /* Note CreateRejectedMessageConsumer must be done */ /* AFTER BeginSession. You will see this later */

30 © 2006 Progress Software Corporation30 SOA-2: OpenEdge 10.1A Adapters for SonicMQ 3. Example - Begin the Session RUN beginSession IN hSession. /*After beginSession, createRejectedMessageConsumer*/ RUN createRejectedMessageConsumer IN hSession (INPUT THIS-PROCEDURE, INPUT "RejectedMsgHandler", OUTPUT HrejectedMsg). Standard Steps…plus calling new API

31 © 2006 Progress Software Corporation31 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Demonstration 4a. Send Messages  Start SendToQueue Window Send “This is the first Message”  Stop Container1  Notice: Client shows no signs of lost connection  Send 4 more messages  Restart Container1 Persistent client will send to Queue by collecting from mqstore

32 © 2006 Progress Software Corporation32 SOA-2: OpenEdge 10.1A Adapters for SonicMQ 4b. Receive Messages  Start JMS Test Client to receive all messages Seeing is believing

33 © 2006 Progress Software Corporation33 SOA-2: OpenEdge 10.1A Adapters for SonicMQ New and Enhanced APIs – By Concepts  Client Message Persistence  Fault Tolerant Client Connections  Serialized Connection Objects  Enhanced XML support  Temp Table messages  DataSet messages  Temporary Destinations  Server Based Message Selectors

34 © 2006 Progress Software Corporation34 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Domain What is Fault Tolerance? Container1 Broker1 Directory Service JNDI Store Agent Manager Domain Manager PrimaryContainer PrimaryBroker* PrimaryBackupContainer PrimaryBackupBroker* Replication Connection(s) *Requires CAA Licensing Defining backup broker to pickup if primary broker fails

35 © 2006 Progress Software Corporation35 SOA-2: OpenEdge 10.1A Adapters for SonicMQ  SonicMQ Broker Must be licensed for Fault Tolerance Primary and Backup Broker must be configured and tested  ABL Client can Set/Get Fault Tolerance Client Transaction Buffer Size Initial Connection Timeout Reconnect Timeout Using Fault Tolerant Client Connections Available only with new connection modes

36 © 2006 Progress Software Corporation36 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Fault Tolerant Client Connections  Enable/Disable Fault Tolerance Before beginSession Default is FALSE TypeNameParameters\Returns ProceduresetFaultTolerantINPUT enable AS LOGICAL FunctiongetFaultTolerantRETURNS LOGICAL

37 © 2006 Progress Software Corporation37 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Client Transaction Buffer Size  Client Transaction Buffer Size Before beginSession Maximum buffer size for transactions Default 0 Bytes. If 0, it will use SonicMQ Broker defined value instead TypeNameParameters\Returns ProceduresetClientTransactionBufferSizeINPUT CTBuffer AS INTEGER FunctiongetClientTransactionBufferSizeRETURNS INTEGER

38 © 2006 Progress Software Corporation38 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Fault Tolerant Client Connections  Initial Connection Timeout Before beginSession Time to wait for initial connection to broker Seconds, default 30 TypeNameParameters\Returns ProceduresetInitialConnectionTimeoutINPUT FTInitTimeout AS INTEGER FunctiongetInitialConnectionTimeoutRETURNS INTEGER

39 © 2006 Progress Software Corporation39 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Fault Tolerant Client Connections  Reconnect Timeout Before beginSession Time to attempt to reconnect to broker Seconds, default 60 TypeNameParameters\Returns ProceduresetFaultTolerantReconnectTimeoutINPUT PARAMETER FTReconnect AS INTEGER FunctiongetFaultTolerantReconnectTimeoutRETURNS INTEGER

40 © 2006 Progress Software Corporation40 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Fault Tolerant Example DEFINE VARIABLE hSession AS HANDLE. RUN jms/jmssession.p PERSISTENT SET hSession ("-SMQConnect"). RUN setConnectionURLs IN hSession ("Primary:2508,BackupServer:9876”). RUN setFaultTolerant IN hSession(TRUE). /*************************************************** Default values ClientTransactionBufferSize,0 bytes defaults to Sonic InitialConnectionTimeout, 30 seconds FaultTolerantReconnectTimeout, 60 seconds ****************************************************/ RUN beginSession IN hSession. RUN createChangeStateConsumer IN hSession (THIS-PROCEDURE, "msgHandler", OUTPUT msgH). Available only with new connection modes

41 © 2006 Progress Software Corporation41 SOA-2: OpenEdge 10.1A Adapters for SonicMQ  Verify Broker is licensed for Fault Tolerance After beginSession Default Disabled (FALSE)  Notify Application of lost Broker connection After beginSession Optional, default is not to notify Fault Tolerant Client Connections TypeNameParameters\Returns FunctionisFaultTolerantRETURNS LOGICAL TypeNameParameters\Returns ProcedurecreateChangeStateConsumerINPUT procHandle AS HANDLE INPUT procName AS CHAR OUTPUT consumerHandle AS HANDLE

42 © 2006 Progress Software Corporation42 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Change State Consumer PROCEDURE msgHandler: DEFINE INPUT PARAMETER hMessage AS HANDLE. DEFINE INPUT PARAMETER hMsgConsumer AS HANDLE. DEFINE OUTPUT PARAMETER hReply AS HANDLE. DEFINE VAR val AS CHAR NO-UNDO. val = DYNAMIC-FUNCTION ("getCharProperty" IN hMessage, "state"). /* val is "active", "reconnecting", "failed", or "closed" */ DISPLAY val. RUN deleteMessage IN hMessage. END.

43 © 2006 Progress Software Corporation43 SOA-2: OpenEdge 10.1A Adapters for SonicMQ New and Enhanced APIs – By Concepts  Client Message Persistence  Fault Tolerant Client Connections  Serialized Connection Objects  Enhanced XML support  Temp Table messages  DataSet messages  Temporary Destinations  Server Based Message Selectors

44 © 2006 Progress Software Corporation44 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - Serialized Connection Objects  Define file that contains connection data  You can replace  With RUN setConnectionFile IN hSession (“connectionfilename”). RUN setBrokerURL IN hSession ("localhost:2506"). RUN SETUSER IN hSession ("Administrator"). RUN setPassword IN hSession("Administrator"). TypeNameParameters ProceduresetConnectionFileINPUT filename AS CHARACTER Available only with new connection modes

45 © 2006 Progress Software Corporation45 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Stores All Default Connection Information Created by Sonic Administrator Sonic Administrator completes: Lookup Name Connection URL Default User Name Default Password Confirm Password WARNING: Always use machine names or IP addresses. Localhost used here for generic demo

46 © 2006 Progress Software Corporation46 SOA-2: OpenEdge 10.1A Adapters for SonicMQ New and Enhanced APIs – By Concepts  Client Message Persistence  Fault Tolerant Client Connections  Serialized Connection Objects  Enhanced XML support  Temp Table messages  DataSet messages  Temporary Destinations  Server Based Message Selectors

47 © 2006 Progress Software Corporation47 SOA-2: OpenEdge 10.1A Adapters for SonicMQ XML Support  Provides easier integration between SonicMQ and OpenEdge Create an XML message –Use the X-DOCUMENT handle or –Use the SAX-Writer Receive an XML Message –Use the X-DOCUMENT handle or –Use the SAX-Reader Additional APIs added to the XMLMessage Object

48 © 2006 Progress Software Corporation48 SOA-2: OpenEdge 10.1A Adapters for SonicMQ  X-Document Copy XML document into XML message Copy XML message into XML document XML Support - DOM TypeNameParameters FunctiongetX-DocumentRETURNS HANDLE TypeNameParameters ProceduresetX-DocumentINPUT HXMLFile AS HANDLE Additional APIs added to the XMLMessage Object

49 © 2006 Progress Software Corporation49 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - XML Support - DOM RUN createXMLMessage IN hSession (OUTPUT hMsg). CREATE x-document hXDOC. hXDOC:LOAD("file", “myCustom.xml", false). RUN setX-Document IN hMsg (hXDOC). RUN sendToQueue IN hSession ("SampleQ1", hMsg, ?, ?, ?). RUN deleteMessage IN hMsg. Additional APIs added to the XMLMessage Object

50 © 2006 Progress Software Corporation50 SOA-2: OpenEdge 10.1A Adapters for SonicMQ XML Support – Sending with a SAX-Writer  SAX-Writer Create SAX-Writer handle Output destination internal longchar –Example hSAXWriter = DYNAMIC-FUNCTION ('getSaxWriter':U IN hMsg, ?) TypeNameParameters\Returns FunctiongetSaxWriterINPUT Name CHAR RETURNS HANDLE Additional APIs added to the XMLMessage Object

51 © 2006 Progress Software Corporation51 SOA-2: OpenEdge 10.1A Adapters for SonicMQ XML Support – Sending with a SAX-Writer  SAX-Writer Delete SAX-Writer handle –Example RUN deleteSaxWriter IN hMsg (hSAXWriter). TypeNameParameters\Returns ProceduredeleteSaxWriterINPUT swhandle AS HANDLE Additional APIs added to the XMLMessage Object

52 © 2006 Progress Software Corporation52 SOA-2: OpenEdge 10.1A Adapters for SonicMQ  Returns SonicMQ message type Checking Message Type TypeNameParameters\Returns FunctiongetMessageTypeRETURNS CHAR Now Includes: DataSetMessage TempTableMessage Message Type

53 © 2006 Progress Software Corporation53 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - XML Support: Receiving with SAX-Reader  Sax-Reader Input destination internal longchar –Example CREATE SAX-READER hSAXReader. RUN setSaxReader IN hMsg (hSAXReader). hSAXReader:SAX-PARSE(). DELETE OBJECT hSAXReader. TypeNameParameters\Returns ProceduresetSaxReaderINPUT hSaxReader AS HANDLE Additional APIs added to the XMLMessage Object

54 © 2006 Progress Software Corporation54 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - Deleting Message RUN deleteMessage IN hMsg. /* Stop receiving messages */ RUN stopReceiveMessages IN hSession.

55 © 2006 Progress Software Corporation55 SOA-2: OpenEdge 10.1A Adapters for SonicMQ New and Enhanced APIs – By Concepts  Client Message Persistence  Fault Tolerant Client Connections  Serialized Connection Objects  Enhanced XML support  Temp Table messages  DataSet messages  Temporary Destinations  Server Based Message Selectors

56 © 2006 Progress Software Corporation56 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Temp Table Messages  Allow applications to send and receive Temp-Tables as XML messages to SonicMQ  SonicMQ Adapter Converts Temp-Tables to/from XML  SonicMQ Handles as an XML message New APIs

57 © 2006 Progress Software Corporation57 SOA-2: OpenEdge 10.1A Adapters for SonicMQ  Create Temp-Table Message  Send Temp-Table to XML Message Create and Send a Temp-Table as an XML Message TypeNameParameters\Returns ProcedurecreateTempTableMessageOUTPUT HMessage AS HANDLE TypeNameParameters\Returns ProceduresetTempTableINPUT hTable AS HANDLE INPUT SchemaLocation AS CHAR INPUT writeSchema AS LOGICAL

58 © 2006 Progress Software Corporation58 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - Create and Send a Temp-Table as an XML Message DEFINE VARIABLE HSession as HANDLE NO-UNDO. DEFINE VARIABLE HMsg as HANDLE NO-UNDO. DEFINE VARIABLE TempTable tcust LIKE customers NO-UNDO. /* create temp table records.. */ RUN createTempTableMessage in HSession (OUTPUT HMsg). RUN setTempTable IN HMsg (tcust, ?, TRUE). RUN sendToQueue IN Hsession ("SampleQ1", HMsg, ?, ?, ?)..

59 © 2006 Progress Software Corporation59 SOA-2: OpenEdge 10.1A Adapters for SonicMQ  Read XML Message into Temp-Table Receiving Temp Table Messages TypeNameParameters\Returns FunctiongetTempTableINPUT TTname AS CHAR INPUT SchemaLocation AS CHAR INPUT FieldTypeMap AS CHAR RETURNS HANDLE

60 © 2006 Progress Software Corporation60 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example – Receiving Temp Tables DEFINE VARIABLE mtype AS CHAR NO-UNDO. mtype = DYNAMIC-FUNCTION ('getMessageType':u IN hMsg). MESSAGE "MTYPE is " mType VIEW-AS ALERT-BOX. IF mtype = "TempTableMessage" THEN DO: MESSAGE “A table message" VIEW-AS ALERT-BOX. hTempttItem = DYNAMIC-FUNCTION ('getTempTable':u IN hMsg, ?, ?, ?). httItem:COPY-TEMP-TABLE( hTempttItem ). /* TempTable actions as needed */ {&OPEN-BROWSERS-IN-QUERY-{&FRAME-NAME}} DELETE OBJECT hTempttItem. END.

61 © 2006 Progress Software Corporation61 SOA-2: OpenEdge 10.1A Adapters for SonicMQ New and Enhanced APIs – By Concepts  Client Message Persistence  Fault Tolerant Client Connections  Serialized Connection Objects  Enhanced XML support  Temp Table messages  DataSet messages  Temporary Destinations  Server Based Message Selectors

62 © 2006 Progress Software Corporation62 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Send a ProDataSet as an XML Message to SonicMQ DataSet Messages  Allow applications to send and receive ProDataSets as XML messages to SonicMQ  SonicMQ Adapter Converts ProDataSet to/from XML  SonicMQ Handles as an XML message

63 © 2006 Progress Software Corporation63 SOA-2: OpenEdge 10.1A Adapters for SonicMQ DataSet Messages  Create DataSet Message  Send ProDataSet to XML Message TypeNameParameters\Returns ProcedurecreateDataSetMessageOUTPUT HMessage HANDLE TypeNameParameters\Returns ProceduresetDataSetINPUT HDataSet AS HANDLE INPUT schemaLocation AS CHAR INPUT writeSchema AS LOGICAL

64 © 2006 Progress Software Corporation64 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - DataSet Messages DEFINE VARIABLE HSession as HANDLE NO-UNDO. DEFINE VARIABLE HMsg as HANDLE NO-UNDO. DEFINE VARIABLE HDataSet AS HANDLE NO-UNDO. /* define DataSet etc etc.. */ RUN createDataSetMessage in HSession (OUTPUT HMsg). RUN setDataSet IN HMsg (HDataSet, ?, TRUE). RUN sendToQueue IN Hsession ("SampleQ1", HMsg, ?, ?, ?).

65 © 2006 Progress Software Corporation65 SOA-2: OpenEdge 10.1A Adapters for SonicMQ DataSet Messages  Read XML message into ProDataSet TypeNameParameters\Returns FunctiongetDataSetINPUT HDataSet INPUT schemaLocation INPUT fieldTypeMap RETURNS HANDLE Receive an XML Message into a ProDataSet from SonicMQ

66 © 2006 Progress Software Corporation66 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - Receiving a ProDataSet IF mtype ="DatasetMessage" THEN DO: RUN PurgeDataset. /* returns dynamic dataset */ hTempdsOrder = DYNAMIC-FUNCTION ('getDataSet':u IN hMsg, ?, ?, ?). /* dumps the dynamic one into static dsOrder */ hdsOrder:COPY-DATASET( hTempdsOrder ). RUN DisplayDataSetDetails. DELETE OBJECT hTempDSOrder. END.

67 © 2006 Progress Software Corporation67 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Enhanced APIs  Temp-Table and DataSet messages Reset message to read-only Change Mode to write-only Delete Temp-Table or DataSet Message too TypeNameParameters\Returns ProcedureresetN\A TypeNameParameters\Returns ProcedureclearBodyN\A TypeNameParameters\Returns ProceduredeleteMessageN\A Existing APIs now support

68 © 2006 Progress Software Corporation68 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Demonstration  Serialized Connection Object  Enhanced XML support  Temp Table messages  DataSet messages

69 © 2006 Progress Software Corporation69 SOA-2: OpenEdge 10.1A Adapters for SonicMQ New and Enhanced APIs – By Concepts  Client Message Persistence  Fault Tolerant Client Connections  Serialized Connection Objects  Enhanced XML support  Temp Table messages  DataSet messages  Temporary Destinations  Server Based Message Selectors

70 © 2006 Progress Software Corporation70 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Temporary Destinations  Allow applications to create temporary queues and topics  Queue  Topic TypeNameParameters\Returns ProcedurecreateTemporaryQueueOUTPUT OPtempQname AS CHAR TypeNameParameters\Returns ProcedurecreateTemporaryTopicOUTPUT OPtempTname AS CHAR createTemporaryQueue & createTemporaryTopic

71 © 2006 Progress Software Corporation71 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Temporary Destinations  Delete when no longer needed  Release resources Delete message consumer object Then delete temporary queue or topic  Queue  Topic TypeNameParameters\Returns ProceduredeleteTemporaryQueueINPUT IPtempQname AS CHAR TypeNameParameters\Returns ProceduredeleteTemporaryTopicINPUT IPtempTname AS CHAR deleteTemporaryQueue & deleteTemporaryTopic

72 © 2006 Progress Software Corporation72 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Example - Temporary Queues and Topics RUN createTemporaryQueue IN hSession (OUTPUT cTempQueue). RUN createTemporaryTopic IN hSession (OUTPUT cTempTopic). MESSAGE "The temporary Queue is called " SKIP cTempQueue SKIP "The temporary Topic is called " SKIP cTempTopic VIEW-AS ALERT-BOX. RUN sendToQueue IN hSession (cTempQueue, hMsg, ?, ?, ?). RUN publish IN hSession (cTempTopic, hMsg, ?, ?, ?). RUN deleteTemporaryQueue IN hSession (OUTPUT cTempQueue). RUN deleteTemporaryTopic IN hSession (OUTPUT cTempTopic).

73 © 2006 Progress Software Corporation73 SOA-2: OpenEdge 10.1A Adapters for SonicMQ New and Enhanced APIs – By Concepts  Client Message Persistence  Fault Tolerant Client Connections  Serialized Connection Objects  Enhanced XML support  Temp Table messages  DataSet messages  Temporary Destinations  Server Based Message Selectors

74 © 2006 Progress Software Corporation74 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Server Based Message Selectors  Messages filtered on defined criteria  Prior to 10.1A Point-to-Point –Message filter on SonicMQ Broker Publish/Subscribe –Message filter on SonicMQ Client  New in 10.1A Ability to move message filter to SonicMQ Broker New APIs - Available with all connection modes

75 © 2006 Progress Software Corporation75 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Server Based Message Selectors  Return current message filter setting Default False  Using server based message selection RUN setSelectorAtBroker IN HSession (TRUE). TypeNameParameters\Returns ProceduresetSelectorAtBrokerINPUT enable AS LOGICAL FunctiongetSelectorAtBrokerRETURNS LOGICAL New APIs - Available with all connection modes

76 © 2006 Progress Software Corporation76 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Agenda  New Install  Now Supporting JMS 1.1  New Architecture  New APIs  Error Handling OpenEdge 10.1A Adapters for SonicMQ

77 © 2006 Progress Software Corporation77 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Error Handling  Types of Errors Deployment/Administration errors Runtime errors –Client errors– before request is made –Client errors – making request –Server errors – while processing request  Available Debugging Tools SOAP Message Viewers (SOAP Faults) Log Files / Logging Levels

78 © 2006 Progress Software Corporation78 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Where to Look for Errors  SOAP Fault response message Client can catch the exception and look at it programmatically Use SOAP Message Viewer  Log Files JSE log file WSA log file: *.wsa.log AdminServer log file: admserv.log AppServer log file: *.server.log, *.ns.log SonicMQ ClientConnect log file: cc.broker*.log, cc.server*.log SonicMQ ServerConnect log file: sc.broker*.log, sc.server*.log

79 © 2006 Progress Software Corporation79 SOA-2: OpenEdge 10.1A Adapters for SonicMQ In Summary  Adapters for SonicMQ are a component in every OpenEdge install that you can use today  All connections support JMS 1.1  New connections support new APIs CONSUMER subscribe, receive JMS 1.1 Messages Destination PRODUCER publish, send Broker MQ Client APIsClientConnectServerConnect

80 © 2006 Progress Software Corporation80 SOA-2: OpenEdge 10.1A Adapters for SonicMQ For More Information, go to…  Codes samples available at http://psdn.progress.com Keyword –Exchange PSDN

81 © 2006 Progress Software Corporation81 SOA-2: OpenEdge 10.1A Adapters for SonicMQ For More Information, go to…  Introductory SOA3: Getting the message, so you need to integrate, but what do you need to know and do?  Architecture ARCH-7: Integrate this! SonicMQ and the OpenEdge Reference Architecture  New in Sonic 7.0 SOA4: Introducing Sonic SOA Suite v7.0 Relevant SonicMQ Sessions

82 © 2006 Progress Software Corporation82 SOA-2: OpenEdge 10.1A Adapters for SonicMQ For More Information, go to…  XML DEV-11: Leveraging ProDataSets in an Open Environment DEV 15: XML in OpenEdge − Past, Present and Future INNOV-10: An Introduction to XQuery by Example Relevant XML Exchange Sessions

83 © 2006 Progress Software Corporation83 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Updated OpenEdge Documentation  Getting Started Application & Integration Services Installation & Configuration Guides Core Services  Development Programming for the OpenEdge Adapter for SonicMQ with the 4GL-JMS API  Application Server Administration

84 © 2006 Progress Software Corporation84 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Hands On Training http://www.progress.com/services/education/index.ssp

85 © 2006 Progress Software Corporation85 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Questions?

86 © 2006 Progress Software Corporation86 SOA-2: OpenEdge 10.1A Adapters for SonicMQ Thank you for your time

87 © 2006 Progress Software Corporation87 SOA-2: OpenEdge 10.1A Adapters for SonicMQ


Download ppt "SOA-2: OpenEdge® 10.1A Adapters for SonicMQ® New Install, New Architecture, and New APIs Cheryl LaBarge Senior Training Program Manager."

Similar presentations


Ads by Google