Hello,
thank You both for advices. i started implementing my own Component and
whole set of classes around it, taking inspiration from JmsComponent and
ActiveMQ connector. Here is what I try to achieve in dumb code (without
proper connection pooling etc.). 


AMIQueueConnectionFactory factory = new
AMIQueueConnectionFactory(config.getHost(), config.getPort(),
config.getInstanceId());
QueueConnection connection =
factory.createQueueConnection(config.getUsername(), config.getPassword());
AMIQueueSession session = (AMIQueueSession)
connection.createQueueSession(true,0);
AMIQueue destination = new AMIQueue(config.getInstanceId() + "/" +
"QUEUENAME.IN");
AMIQueueSender queueSender = (AMIQueueSender)
session.createSender(destination);
AMITextMessage message = (AMITextMessage) session.createTextMessage();
message.setText("BODY CONTENT");
message.setJMSType("JMSTYPE");

try {
        queueSender.send(message, DeliveryMode.PERSISTENT, 0, 0);
        session.commit();
        LOG.info("Message sent to queue");
} catch (JMSException e) {
        LOG.error("Message sending fail: " + e.getMessage());
        e.printStackTrace();
} finally {
        queueSender.close();
        session.close();
        connection.close();
}

I will take a look at XMPP component, so far seems pretty straightforward.
Not sure what will be the difference compared to this implementation.
Basically I want just Queue support, just text messages being send here &
there, nothing complex or parametrized. If You have any other idea just
write them here :) 
I will have other questions related to Tibco and WebsphereMQ but this
Component is a priority for now.
Thank You


--
View this message in context: 
http://camel.465427.n5.nabble.com/connecting-to-new-jms-implementation-tp5017200p5019626.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to