static boolean targetsPooledConnectionFactory ( String server , String resourceAdapter , ServiceRegistry serviceRegistry ) { // if the resourceAdapter is not defined, the default behaviour is to create a pooled-connection-factory. if ( resourceAdapter == null || resourceAdapter . isEmpty ( ) ) { return true ; } ServiceName activeMQServiceName = MessagingServices . getActiveMQServiceName ( server ) ; ServiceName pcfName = JMSServices . getPooledConnectionFactoryBaseServiceName ( activeMQServiceName ) . append ( resourceAdapter ) ; return serviceRegistry . getServiceNames ( ) . contains ( pcfName ) ; }
Return whether the definition targets an existing pooled connection factory or use a JCA - based ConnectionFactory .