-
1. Re: Authentication error when using JMS service
Greg @ Innisfree ZA May 28, 2010 4:26 AM (in response to Greg @ Innisfree ZA)Haven't solved the problem yet, but here's an update:
I created an "ExecureScript" operation that contains simple Java code to write a message to MQ using the same JMS connection factory and JMS queue. It does work correctly, so clearly my setup it correct enough to send messages from LiveCycle to MQ via JMS.
Here's the code for the ExecuteScript:
//import the classes that the script references
import java.util.List;
import java.lang.String;
import java.util.Map;
import java.util.HashMap;
import javax.jms.*;
import javax.naming.*;//get a list of file names that are stored in the process variable named files
String strMessage = patExecContext.getProcessDataStringValue("/process_data/@strMessage");//get connection factory
String strQcf = patExecContext.getProcessDataStringValue("/process_data/@strQcf");//get queue
String strQ = patExecContext.getProcessDataStringValue("/process_data/@strQ");try
{
// Look up administered objects
System.out.println("Looking up administered objects...");
InitialContext initContext;
initContext = new InitialContext();
QueueConnectionFactory factory = (QueueConnectionFactory) initContext.lookup(strQcf);
Queue queue = (Queue) initContext.lookup(strQ);
initContext.close();
// Create JMS objects
System.out.println("Creating JMS objects...");
QueueConnection connection = factory.createQueueConnection();
QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueSender sender = session.createSender(queue);
//Send messages
TextMessage message = session.createTextMessage(strMessage);
sender.send(message);//Exit
System.out.println("Exiting...");
connection.close();
System.out.println("Goodbye!");
} catch (Exception e)
{
e.printStackTrace();
}Interestingly I don't provide any authentication information and yet LC is able to connect to MQ
Cheers
-
2. Re: Authentication error when using JMS service
Greg @ Innisfree ZA May 31, 2010 2:03 AM (in response to Greg @ Innisfree ZA)After a lot of wrestling forwards and backwards, the answer seems rediculously simple. Of course, in the process I had to improve my knowledge of MQ, WAS and JMS quite a bit. The short answer is as follows:
Ensure your JMS service is configured correctly in LiveCycle. Go to the components view, open the "service coniguration" for the JMS service and check that the "connection user name" and "Connection password" are correct. The correct value will depend on how you've set up MQ. In my case the solution is currently to just leave both values empty. The idea of creating an "Execute script" operation was actually the clincher because once I knew LC does indeed talk to MQ via JMS, I immediately saw where the problem lay (well, almost immediately)
Once I've played around with the various options in MQ it'll probably make sense to write up a blog posting for the next person who gets stuck.
-
3. Re: Authentication error when using JMS service
Diego-Silva Aug 31, 2012 6:27 AM (in response to Greg @ Innisfree ZA)Hi Greg,
Seeking for information around the forum I fell into your post which was very helpful. Please continue with the idea of posting your resolution on a blog and update this thread to help the others.
Thanks!
Diego


