📄 jmsconnector.java
字号:
catch (JMSException innerEx) { // ignore, we are just trying to get the queue name } logger.info(MessageFormat.format( "Faled to delete a temporary queue '{0}' Reason: {1}", new Object[]{queueName, e.getMessage()})); } } } /** * Closes the TemporaryTopic * * @param tempTopic * @throws JMSException */ public void close(TemporaryTopic tempTopic) throws JMSException { if (tempTopic != null) { tempTopic.delete(); } } /** * Closes the TemporaryTopic without throwing an exception (an error message is * logged instead). * * @param tempTopic */ public void closeQuietly(TemporaryTopic tempTopic) { try { close(tempTopic); } catch (JMSException e) { if (logger.isErrorEnabled()) { String topicName = ""; try { topicName = tempTopic.getTopicName(); } catch (JMSException innerEx) { // ignore, we are just trying to get the topic name } logger.error("Faled to delete a temporary topic " + topicName, e); } } } //////////////////////////////////////////////////////////////////////// // Getters and Setters //////////////////////////////////////////////////////////////////////// /** @return Returns the connection. */ public Connection getConnection() { return connection; } protected void setConnection(Connection connection) { this.connection = connection; } /** @return Returns the acknowledgeMode. */ public int getAcknowledgementMode() { return acknowledgementMode; } /** @param acknowledgementMode The acknowledgementMode to set. */ public void setAcknowledgementMode(int acknowledgementMode) { this.acknowledgementMode = acknowledgementMode; } /** @return Returns the durable. */ public boolean isDurable() { return durable; } /** @param durable The durable to set. */ public void setDurable(boolean durable) { this.durable = durable; } /** @return Returns the noLocal. */ public boolean isNoLocal() { return noLocal; } /** @param noLocal The noLocal to set. */ public void setNoLocal(boolean noLocal) { this.noLocal = noLocal; } /** @return Returns the persistentDelivery. */ public boolean isPersistentDelivery() { return persistentDelivery; } /** @param persistentDelivery The persistentDelivery to set. */ public void setPersistentDelivery(boolean persistentDelivery) { this.persistentDelivery = persistentDelivery; } public JmsSupport getJmsSupport() { return jmsSupport; } public void setJmsSupport(JmsSupport jmsSupport) { this.jmsSupport = jmsSupport; } public String getSpecification() { return specification; } public void setSpecification(String specification) { this.specification = specification; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getClientId() { return clientId; } public void setClientId(String clientId) { this.clientId = clientId; } public int getMaxRedelivery() { return maxRedelivery; } public void setMaxRedelivery(int maxRedelivery) { this.maxRedelivery = maxRedelivery; } public boolean isRemoteSyncEnabled() { return true; } /** * Getter for property 'topicResolver'. * * @return Value for property 'topicResolver'. */ public JmsTopicResolver getTopicResolver() { return topicResolver; } /** * Setter for property 'topicResolver'. * * @param topicResolver Value to set for property 'topicResolver'. */ public void setTopicResolver(final JmsTopicResolver topicResolver) { this.topicResolver = topicResolver; } /** * Getter for property 'eagerConsumer'. Default * is {@code true}. * * @return Value for property 'eagerConsumer'. * @see #eagerConsumer */ public boolean isEagerConsumer() { return eagerConsumer; } /** * A value of {@code true} will create a consumer on * connect, in contrast to lazy instantiation in the poll loop. * This setting very much depends on the JMS vendor. * Affects transactional receivers, typical symptoms are: * <ul> * <li> consumer thread hanging forever, though a message is * available * <li>failure to consume the first message (the rest * are fine) * </ul> * <p/> * * @param eagerConsumer Value to set for property 'eagerConsumer'. * @see #eagerConsumer * @see org.mule.transport.jms.XaTransactedJmsMessageReceiver */ public void setEagerConsumer(final boolean eagerConsumer) { this.eagerConsumer = eagerConsumer; } public boolean isCacheJmsSessions() { return cacheJmsSessions; } public void setCacheJmsSessions(boolean cacheJmsSessions) { this.cacheJmsSessions = cacheJmsSessions; } public ConnectionFactory getConnectionFactory() { return connectionFactory; } public void setConnectionFactory(ConnectionFactory connectionFactory) { this.connectionFactory = connectionFactory; } public RedeliveryHandlerFactory getRedeliveryHandlerFactory() { return redeliveryHandlerFactory; } public void setRedeliveryHandlerFactory(RedeliveryHandlerFactory redeliveryHandlerFactory) { this.redeliveryHandlerFactory = redeliveryHandlerFactory; } /** * Sets the <code>honorQosHeaders</code> property, which determines whether * {@link JmsMessageDispatcher} should honor incoming message's QoS headers * (JMSPriority, JMSDeliveryMode). * * @param honorQosHeaders <code>true</code> if {@link JmsMessageDispatcher} * should honor incoming message's QoS headers; otherwise * <code>false</code> Default is <code>false</code>, meaning that * connector settings will override message headers. */ public void setHonorQosHeaders(boolean honorQosHeaders) { this.honorQosHeaders = honorQosHeaders; } /** * Gets the value of <code>honorQosHeaders</code> property. * * @return <code>true</code> if <code>JmsMessageDispatcher</code> should * honor incoming message's QoS headers; otherwise <code>false</code> * Default is <code>false</code>, meaning that connector settings will * override message headers. */ public boolean isHonorQosHeaders() { return honorQosHeaders; } public Context getJndiContext() { return jndiContext; } public void setJndiContext(Context jndiContext) { this.jndiContext = jndiContext; } public String getJndiInitialFactory() { return jndiInitialFactory; } public void setJndiInitialFactory(String jndiInitialFactory) { this.jndiInitialFactory = jndiInitialFactory; } public String getJndiProviderUrl() { return jndiProviderUrl; } public void setJndiProviderUrl(String jndiProviderUrl) { this.jndiProviderUrl = jndiProviderUrl; } public Map getJndiProviderProperties() { return jndiProviderProperties; } public void setJndiProviderProperties(Map jndiProviderProperties) { this.jndiProviderProperties = jndiProviderProperties; } public String getConnectionFactoryJndiName() { return connectionFactoryJndiName; } public void setConnectionFactoryJndiName(String connectionFactoryJndiName) { this.connectionFactoryJndiName = connectionFactoryJndiName; } public boolean isJndiDestinations() { return jndiDestinations; } public void setJndiDestinations(boolean jndiDestinations) { this.jndiDestinations = jndiDestinations; } public boolean isForceJndiDestinations() { return forceJndiDestinations; } public void setForceJndiDestinations(boolean forceJndiDestinations) { this.forceJndiDestinations = forceJndiDestinations; } public boolean isRecoverJmsConnections() { return recoverJmsConnections; } public void setRecoverJmsConnections(boolean recoverJmsConnections) { this.recoverJmsConnections = recoverJmsConnections; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -