* @see nexj.core.meta.integration.channel.XMLMDBIntegrationMetadataExporter#addConnectionRefs(nexj.core.meta.integration.Channel, int, java.util.List)
*/
protected void addConnectionRefs(Channel channel, int nContainer, List list)
{
MessageQueue mq = (MessageQueue)channel;
J2EEResourceRef ref = getConnectionFactoryResourceRef(mq, nContainer);
ref.setResourceAdapterName(getResourceAdapterName(mq));
ref.setTxMode((channel.isTransactional()) ? J2EEResourceRef.TX_XA : J2EEResourceRef.TX_NONE);
ref.setShareable(false);
ref.setAuthAlias(SysUtil.NAMESPACE + "-channel-" + channel.getName());
ref.setMaxConnections(mq.getMaxSenders());
String sConnFactory = mq.getConnectionFactory();
if (sConnFactory == null)
{
if (nContainer == J2EEUtil.TEEE)
{
sConnFactory = "class:" + SysUtil.PACKAGE + ".core.rpc.jms.ra.engine.activemq.ActiveMQAdapter";
}
else
{
// no need to add anything as other servers' default JMS engine's connection factories
// will be configured and written out by their respective installers.
return;
}
}
else if (JMSUtil.isPlatformAdapter(sConnFactory))
{
return;
}
ref.addProperty(new J2EEProperty("JMSConnectionFactoryName", sConnFactory));
String sConnFactoryProps = getConnectionFactoryProperties(mq, nContainer);
if (sConnFactoryProps != null)
{
ref.addProperty(new J2EEProperty("JMSConnectionFactoryProperties", sConnFactoryProps));
}
ref.addProperty(new J2EEProperty("transacted", mq.isTransactional()));
list.add(ref);
}