Contents

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Expand
titleContents

Table of Contents

8.2.1 Sending a large message

Code Block
//create the large message
TextMessage lmsg = session.createTextMessage();
lmsg.setStringProperty("JMSX_LM_PATH", "D:\\batch\\lms_samples
send.zip");
//register status listener
((ILargeMessage) lmsg).setLMStatusListener(new TrackStatus());
//start the message transfer
msgProducer.send(lmsg);

8.2.2 Receiving a large message

Code Block
//receive the normal JMS message containing a reference to the large message
ILargeMessage lmsg = (ILargeMessage) qReceiver.receive();
//register status listener
lmsg.setLMStatusListener(new TrackStatus());
//start the message transfer
lmsg.saveTo("received.zip");

8.2.3 Resuming a message transfer on the send side

Code Block
Enumeration enum =
((ILMConnection)jmsConnection).getUnfinishedMessagesToSend ();
while(enum.hasMoreElements())
{
//get the reference for the large unfinished message 
ILargeMessage lmsg = (ILargeMessage)enum.nextElement();
//register status listener
lmsg.setLMStatusListener(new TrackStatus());
//resume the transfer
lmsg.resumeSend(); ;
}

8.2.4 Resuming a message transfer on the receive side

Code Block
Enumeration enum =
((ILMConnection)jmsConnection).getUnfinishedMessagesToReceive ();
while(enum.hasMoreElements())
{
//recreate the large message
ILargeMessage lmsg = (ILargeMessage)umEnum.nextElement();
//registering status listener
lmsg.setLMStatusListener(new TrackStatus());
//resume the transfer
lmsg.resumeSaveTo ();
}


The time duration that the receiver waits till resuming the interrupted message transfer can be configured through the wait period in the parameter 'ResumeTimeoutInterval'. By default, this time duration is 15 seconds.

To set the resume timeout interval, perform the following steps:

  1. Launch Fiorano Studio and open the Profile Manager. Right-click the Profiles node and select Open Profile from the pop-up menu. Select the desired profile for editing in the offline mode and click on the Open button.
  2. In the Profile Manager pane navigate to FioranoMQ > Fiorano >etc > FMQConfigLoader. In the properties pane, set the value corresponding to the Resumetimeoutinterval, as shown in the figure below.
  3. After making the above change, right-click the FioranoMQ domain in the Profile Manager and select the Save option from the pop-up menu.

Adaptavist ThemeBuilder EngineAtlassian Confluence