AlanTrewartha Posted July 28, 2014 Posted July 28, 2014 SMLoadJar the main jar you get from http://www.apache.org/dyn/closer.cgi?path=/activemq/5.10.0/apache-activemq-5.10.0-bin.tar.gz And then here's the groovy code… RegisterGroovy( "sendToJMS( qURL ; qSubject ; qMessage )" ; "import javax.jms.*;¶ import org.apache.activemq.*;¶ ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(qURL);¶ Connection connection = connectionFactory.createConnection();¶ connection.start();¶ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);¶ Destination destination = session.createQueue(qSubject);¶ MessageProducer producer = session.createProducer(destination);¶ TextMessage message = session.createTextMessage(qMessage);¶ producer.send(message);¶ connection.close();¶ return true;"; "isGui=false" ) You get back '1'/true for success or 'ERROR' for a failure to post the message. Amazed about how easy that was to get done, and I'm just posting in case this is useful to anyone else. (It's entirely cribbed code from a java primer page I found online)
AlanTrewartha Posted March 8, 2017 Author Posted March 8, 2017 If only XSLT wasn't taken out of web publishing in FMP12 :-(
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now