public static <T> T internalExecuteJmsCommand( Command command, // required ConnectionFactory factory, // required Queue sendQueue, // required Queue responseQueue, // required SerializationProvider serializationProvider) { return internalExecuteJmsCommand(command, null, null, null, null, null, null, null, factory, sendQueue, responseQueue, serializationProvider, null, ClientJaxbSerializationProvider.JMS_SERIALIZATION_TYPE, null); }
public static Object sendCoreJmsCommand( Command command, String userName, String password, String deploymentId, Long processInstanceId, String connectionUserName, String connectionPassword, ConnectionFactory factory, Queue sendQueue, Queue responseQueue, SerializationProvider serializationProvider, Set<Class<?>> extraJaxbClasses, long maxTimeoutInMillisecs) { return InternalJmsCommandHelper.internalExecuteJmsCommand(command, connectionUserName, connectionPassword, userName, password, deploymentId, processInstanceId, null, factory, sendQueue, responseQueue, serializationProvider, extraJaxbClasses, serializationProvider.getSerializationType(), maxTimeoutInMillisecs); } }
/** * Method to communicate with the backend via JMS. * * @param command The {@link Command} object to be executed. * @return The result of the {@link Command} object execution. */ private <T> T executeJmsCommand( Command command ) { Queue sendQueue; boolean isTaskCommand = (command instanceof TaskCommand); if( isTaskCommand ) { sendQueue = config.getTaskQueue(); if( ! config.getUseUssl() && ! config.getDisableTaskSecurity() ) { throw new RemoteCommunicationException("Task operation requests can only be sent via JMS if SSL is used."); } } else { sendQueue = config.getKsessionQueue(); } return internalExecuteJmsCommand(command, config.getConnectionUserName(), config.getConnectionPassword(), config.getUserName(), config.getPassword(), config.getDeploymentId(), config.getProcessInstanceId(), config.getCorrelationProperties(), config.getConnectionFactory(), sendQueue, config.getResponseQueue(), (SerializationProvider) config.getJaxbSerializationProvider(), config.getExtraJaxbClasses(), config.getSerializationType(), config.getTimeout()); }