}
super.doConnect();
}
protected ConnectionFactory createConnectionFactory() throws InitialisationException, NamingException {
MQConnectionFactory factory = (MQConnectionFactory)getConnectionFactory();
if(factory==null) {
factory = new MQQueueConnectionFactory();
}
try {
if(queueManager!=null) {
factory.setQueueManager(queueManager);
}
if(hostname!=null) {
factory.setHostName(hostname);
}
if(port > -1) {
factory.setPort(port);
}
if(cCSId != -1) {
factory.setCCSID(cCSId);
}
if(channel!=null) {
factory.setChannel(channel);
}
if(temporaryModel!=null && factory instanceof MQQueueConnectionFactory) {
((MQQueueConnectionFactory)factory).setTemporaryModel(temporaryModel);
}
factory.setTransportType(transportType);
} catch (JMSException e) {
throw new InitialisationException(e, this);
}
if(getClientId()!=null) {
factory.setClientId(getClientId());
}
if(receiveExitHandler!=null) {
factory.setReceiveExit(receiveExitHandler);
}
if(receiveExitHandlerInit!=null) {
factory.setReceiveExitInit(receiveExitHandlerInit);
}
if(sendExitHandler!=null) {
factory.setSendExit(sendExitHandler);
}
if(sendExitHandlerInit!=null) {
factory.setSendExitInit(sendExitHandlerInit);
}
if(securityExitHandler!=null) {
factory.setSecurityExit(securityExitHandler);
}
if(receiveExitHandlerInit!=null) {
factory.setSecurityExitInit(securityExitHandlerInit);
}
setConnectionFactory(factory);
return factory;
}