Search in sources :

Example 1 with IFSAQueueConnectionFactory

use of com.ing.ifsa.IFSAQueueConnectionFactory in project iaf by ibissource.

the class IfsaMessagingSourceFactory method createMessagingSource.

protected MessagingSource createMessagingSource(String id, String authAlias, boolean createDestination, boolean useJms102) throws IbisException {
    IFSAContext context = (IFSAContext) getContext();
    IFSAQueueConnectionFactory connectionFactory = (IFSAQueueConnectionFactory) getConnectionFactory(context, id, createDestination, useJms102);
    return new IfsaMessagingSource(id, context, connectionFactory, getMessagingSourceMap(), preJms22Api, xaEnabled);
}
Also used : IFSAQueueConnectionFactory(com.ing.ifsa.IFSAQueueConnectionFactory) IFSAContext(com.ing.ifsa.IFSAContext)

Example 2 with IFSAQueueConnectionFactory

use of com.ing.ifsa.IFSAQueueConnectionFactory in project iaf by ibissource.

the class IfsaMessagingSourceFactory method createConnectionFactory.

protected ConnectionFactory createConnectionFactory(Context context, String applicationId, boolean createDestination, boolean useJms102) throws IbisException, NamingException {
    IFSAQueueConnectionFactory ifsaQueueConnectionFactory = (IFSAQueueConnectionFactory) ((IFSAContext) context).lookupBusConnection(applicationId);
    if (log.isDebugEnabled()) {
        log.debug("IfsaConnection for application [" + applicationId + "] got ifsaQueueConnectionFactory with properties:" + ToStringBuilder.reflectionToString(ifsaQueueConnectionFactory) + "\n" + " isServer: " + ifsaQueueConnectionFactory.IsServer() + "\n" + " isClientNonTransactional:" + ifsaQueueConnectionFactory.IsClientNonTransactional() + "\n" + " isClientTransactional:" + ifsaQueueConnectionFactory.IsClientTransactional() + "\n" + " isClientServerNonTransactional:" + ifsaQueueConnectionFactory.IsClientServerNonTransactional() + "\n" + " isServerTransactional:" + ifsaQueueConnectionFactory.IsClientServerTransactional() + "\n");
    }
    if (!preJms22Api) {
        try {
            IFSAGate gate = IFSAGate.getInstance();
            xaEnabled = gate.isXA();
            log.info("IFSA JMS XA enabled [" + xaEnabled + "]");
            log.info("IFSA JMS hasDynamicReplyQueue: " + ((IFSAContext) context).hasDynamicReplyQueue());
        } catch (Throwable t) {
            log.info("caught exception determining IfsaJms v2.2+ features:", t);
        }
    } else {
        log.info("for IFSA JMS versions prior to 2.2 capability of XA support cannot be determined");
    }
    return ifsaQueueConnectionFactory;
}
Also used : IFSAQueueConnectionFactory(com.ing.ifsa.IFSAQueueConnectionFactory) IFSAGate(com.ing.ifsa.IFSAGate) IFSAContext(com.ing.ifsa.IFSAContext)

Aggregations

IFSAContext (com.ing.ifsa.IFSAContext)2 IFSAQueueConnectionFactory (com.ing.ifsa.IFSAQueueConnectionFactory)2 IFSAGate (com.ing.ifsa.IFSAGate)1