loader.getMetadata().addComponent(component);
loader.addSingletonFixup(component);
mq.setSender(component);
component.addPrimitivePropertyInitializer("channel", channel);
final ComponentPropertyInitializer initializer = component.addComponentPropertyInitializer("transactionManager", null);
loader.addComponentFixup(new XMLMetadataHelper.ContextFixup(loader.getHelper())
{
public void fixup()
{
initializer.setInstanceComponent(loader.getMetadata().getComponent("System.TransactionManager"));
}
});
}
if (mq.isReceivable())
{
Component component = new Component("JMSReceiver." + channel.getName(), channel.getType().getReceiver(), Component.SINGLETON);
loader.addSingletonFixup(component);
mq.setReceiver(component);
component.setMetadata(loader.getMetadata());
component.addPrimitivePropertyInitializer("channel", channel);
final PrimitivePropertyInitializer initializer = component.addPrimitivePropertyInitializer("contextComponent", null);
loader.addComponentFixup(new XMLMetadataHelper.ContextFixup(loader.getHelper())
{
public void fixup()
{
initializer.setValue(loader.getMetadata().getComponent("System.InvocationContext"));
}
});
}
}