Thanks, Bruce.

I'm interested in making a programmatic call from within my EJB which is NOT
running within a JBI container.

I looked at the sample code from the link that you provided me.  Here is a
snippet of it:

    public void sendMessages(ComponentContext context, int count) throws
MessagingException {
        DeliveryChannel deliveryChannel = context.getDeliveryChannel();
        MessageExchangeFactory factory =
deliveryChannel.createExchangeFactory();

        for (int i = 0; i < count; i++) {
            InOnly exchange = factory.createInOnlyExchange();
            NormalizedMessage message = exchange.createMessage();
            exchange.setInMessage(message);

            message.setProperty("id", new Integer(i));
            message.setContent(new StringSource("<example id='" + i +
"'/>"));

            deliveryChannel.send(exchange);
        }
    }

This method implies that you have a reference to an variable named "context"
which is defined as type ComponentContext.

How do I instantiate an instance of it from the client code (which is the
EJB in my case)?

Thanks,

Claudio
-- 
View this message in context: 
http://www.nabble.com/XA-Transactions-tf1894755.html#a5223618
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to