public class JMSServerManagerImpl extends Object implements JMSServerManager, org.hornetq.core.server.ActivateCallback
JMS Connection Factories and Destinations can be configured either using configuration files or using a JMSConfiguration object.
If configuration files are used, JMS resources are redeployed if the files content is changed. If a JMSConfiguration object is used, the JMS resources can not be redeployed.
| Constructor and Description |
|---|
JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server) |
JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server,
BindingRegistry registry)
This constructor is used by the Application Server's integration
|
JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server,
JMSConfiguration configuration) |
JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server,
String configFileName) |
JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server,
String configFilename,
JMSStorageManager storageManager)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activated() |
void |
addAddressSettings(String address,
org.hornetq.core.settings.impl.AddressSettings addressSettings) |
boolean |
addConnectionFactoryToJNDI(String name,
String jndiBinding) |
boolean |
addQueueToJndi(String queueName,
String jndiBinding) |
void |
addSecurity(String addressMatch,
Set<org.hornetq.core.security.Role> roles) |
boolean |
addTopicToJndi(String topicName,
String jndiBinding) |
boolean |
closeConnectionsForAddress(String ipAddress) |
void |
createConnectionFactory(boolean storeConfig,
ConnectionFactoryConfiguration cfConfig,
String... jndi) |
void |
createConnectionFactory(String name,
boolean ha,
JMSFactoryType cfType,
List<String> connectorNames,
String... jndiBindings) |
void |
createConnectionFactory(String name,
boolean ha,
JMSFactoryType cfType,
List<String> connectorNames,
String clientID,
long clientFailureCheckPeriod,
long connectionTTL,
long callTimeout,
long callFailoverTimeout,
boolean cacheLargeMessagesClient,
int minLargeMessageSize,
boolean compressLargeMessage,
int consumerWindowSize,
int consumerMaxRate,
int confirmationWindowSize,
int producerWindowSize,
int producerMaxRate,
boolean blockOnAcknowledge,
boolean blockOnDurableSend,
boolean blockOnNonDurableSend,
boolean autoGroup,
boolean preAcknowledge,
String loadBalancingPolicyClassName,
int transactionBatchSize,
int dupsOKBatchSize,
boolean useGlobalPools,
int scheduledThreadPoolMaxSize,
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnInitialConnection,
String groupId,
String... jndiBindings) |
void |
createConnectionFactory(String name,
boolean ha,
JMSFactoryType cfType,
String discoveryGroupName,
String... jndiBindings) |
void |
createConnectionFactory(String name,
boolean ha,
JMSFactoryType cfType,
String discoveryGroupName,
String clientID,
long clientFailureCheckPeriod,
long connectionTTL,
long callTimeout,
long callFailoverTimeout,
boolean cacheLargeMessagesClient,
int minLargeMessageSize,
boolean compressLargeMessages,
int consumerWindowSize,
int consumerMaxRate,
int confirmationWindowSize,
int producerWindowSize,
int producerMaxRate,
boolean blockOnAcknowledge,
boolean blockOnDurableSend,
boolean blockOnNonDurableSend,
boolean autoGroup,
boolean preAcknowledge,
String loadBalancingPolicyClassName,
int transactionBatchSize,
int dupsOKBatchSize,
boolean useGlobalPools,
int scheduledThreadPoolMaxSize,
int threadPoolMaxSize,
long retryInterval,
double retryIntervalMultiplier,
long maxRetryInterval,
int reconnectAttempts,
boolean failoverOnInitialConnection,
String groupId,
String... jndiBindings) |
boolean |
createQueue(boolean storeConfig,
String queueName,
String selectorString,
boolean durable,
String... jndi)
Creates a JMS Queue.
|
boolean |
createTopic(boolean storeConfig,
String topicName,
String... jndi)
Creates a JMS Topic
|
void |
deActivate() |
boolean |
destroyConnectionFactory(String name)
destroys a connection factory.
|
boolean |
destroyQueue(String name)
destroys a queue and removes it from JNDI or BindingRegistry
|
boolean |
destroyQueue(String name,
boolean removeConsumers)
destroys a queue and removes it from JNDI or BindingRegistry.
|
boolean |
destroyTopic(String name)
destroys a topic and removes it from JNDI or BindingRegistry
|
boolean |
destroyTopic(String name,
boolean removeConsumers)
destroys a topic and removes it from JNDI or BindingRegistry
|
org.hornetq.core.settings.impl.AddressSettings |
getAddressSettings(String address) |
org.hornetq.core.server.HornetQServer |
getHornetQServer() |
JMSStorageManager |
getJMSStorageManager() |
String[] |
getJNDIOnConnectionFactory(String factoryName) |
String[] |
getJNDIOnQueue(String queue) |
String[] |
getJNDIOnTopic(String topic) |
BindingRegistry |
getRegistry() |
Set<org.hornetq.core.security.Role> |
getSecurity(String addressMatch) |
String |
getVersion() |
protected HornetQConnectionFactory |
internalCreateCFPOJO(ConnectionFactoryConfiguration cfConfig) |
boolean |
isStarted()
Has the Server been started.
|
String[] |
listConnectionIDs() |
String |
listPreparedTransactionDetailsAsHTML() |
String |
listPreparedTransactionDetailsAsJSON() |
String[] |
listRemoteAddresses() |
String[] |
listRemoteAddresses(String ipAddress) |
String[] |
listSessions(String connectionID) |
void |
preActivate() |
void |
recoverJndiBindings(String name,
PersistedType type) |
HornetQConnectionFactory |
recreateCF(String name,
ConnectionFactoryConfiguration cf)
Call this method to have a CF rebound to JNDI and stored on the Journal
|
boolean |
removeConnectionFactoryFromJNDI(String name) |
boolean |
removeConnectionFactoryFromJNDI(String name,
String jndi) |
boolean |
removeQueueFromJNDI(String name)
Remove the queue from JNDI or BindingRegistry.
|
boolean |
removeQueueFromJNDI(String name,
String jndi)
Remove the queue from JNDI or BindingRegistry.
|
boolean |
removeTopicFromJNDI(String name)
Remove the topic from JNDI or BindingRegistry.
|
boolean |
removeTopicFromJNDI(String name,
String jndi)
Remove the topic from JNDI or BindingRegistry.
|
void |
replaceStorageManager(JMSStorageManager newStorage) |
void |
setContext(Context context) |
void |
setRegistry(BindingRegistry registry)
Set this property if you want something other than JNDI for your registry
|
protected boolean |
shutdownConnectionFactory(String name) |
void |
start()
Notice that this component has a
startCalled boolean to control its internal
life-cycle, but its isStarted() returns the value of server.isStarted() and
not the value of startCalled. |
void |
stop() |
public JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server)
throws Exception
Exceptionpublic JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server,
BindingRegistry registry)
throws Exception
server - registry - Exceptionpublic JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server,
String configFileName)
throws Exception
Exceptionpublic JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server,
JMSConfiguration configuration)
throws Exception
Exception@Deprecated public JMSServerManagerImpl(org.hornetq.core.server.HornetQServer server, String configFilename, JMSStorageManager storageManager)
public void preActivate()
preActivate in interface org.hornetq.core.server.ActivateCallbackpublic void activated()
activated in interface org.hornetq.core.server.ActivateCallbackpublic void deActivate()
deActivate in interface org.hornetq.core.server.ActivateCallbackpublic void recoverJndiBindings(String name, PersistedType type) throws NamingException
NamingExceptionpublic void start()
throws Exception
startCalled boolean to control its internal
life-cycle, but its isStarted() returns the value of server.isStarted() and
not the value of startCalled.
This method and server.start() are interdependent in the following way:
start() is called, it sets start_called=true, and
calls HornetQServerImpl.start()
HornetQServerImpl.start() will call activated()
activated() checks the value of startCalled, which
must already be true.
start in interface org.hornetq.core.server.HornetQComponentExceptionpublic void stop()
throws Exception
stop in interface org.hornetq.core.server.HornetQComponentExceptionpublic boolean isStarted()
JMSServerManagerisStarted in interface org.hornetq.core.server.HornetQComponentisStarted in interface JMSServerManagerpublic BindingRegistry getRegistry()
getRegistry in interface JMSServerManagerpublic void setRegistry(BindingRegistry registry)
JMSServerManagersetRegistry in interface JMSServerManagerpublic org.hornetq.core.server.HornetQServer getHornetQServer()
getHornetQServer in interface JMSServerManagerpublic void addAddressSettings(String address, org.hornetq.core.settings.impl.AddressSettings addressSettings)
addAddressSettings in interface JMSServerManagerpublic org.hornetq.core.settings.impl.AddressSettings getAddressSettings(String address)
getAddressSettings in interface JMSServerManagerpublic void addSecurity(String addressMatch, Set<org.hornetq.core.security.Role> roles)
addSecurity in interface JMSServerManagerpublic Set<org.hornetq.core.security.Role> getSecurity(String addressMatch)
getSecurity in interface JMSServerManagerpublic void setContext(Context context)
setContext in interface JMSServerManagerpublic String getVersion()
getVersion in interface JMSServerManagerpublic boolean createQueue(boolean storeConfig,
String queueName,
String selectorString,
boolean durable,
String... jndi)
throws Exception
JMSServerManagercreateQueue in interface JMSServerManagerqueueName - The name of the queue to createException - if problems were encountered creating the queue.public boolean createTopic(boolean storeConfig,
String topicName,
String... jndi)
throws Exception
JMSServerManagercreateTopic in interface JMSServerManagertopicName - the name of the topicjndi - the names of the binding for JNDI or BindingRegistryException - if a problem occurred creating the topicpublic boolean addTopicToJndi(String topicName, String jndiBinding) throws Exception
addTopicToJndi in interface JMSServerManagerExceptionpublic String[] getJNDIOnQueue(String queue)
getJNDIOnQueue in interface JMSServerManagerpublic String[] getJNDIOnTopic(String topic)
getJNDIOnTopic in interface JMSServerManagerpublic String[] getJNDIOnConnectionFactory(String factoryName)
getJNDIOnConnectionFactory in interface JMSServerManagerpublic boolean addQueueToJndi(String queueName, String jndiBinding) throws Exception
addQueueToJndi in interface JMSServerManagerExceptionpublic boolean addConnectionFactoryToJNDI(String name, String jndiBinding) throws Exception
addConnectionFactoryToJNDI in interface JMSServerManagerExceptionpublic boolean removeQueueFromJNDI(String name, String jndi) throws Exception
JMSServerManagerremoveQueueFromJNDI in interface JMSServerManagername - the name of the destination to remove from JNDI or BindingRegistryException - if a problem occurred removing the destinationpublic boolean removeQueueFromJNDI(String name) throws Exception
JMSServerManagerremoveQueueFromJNDI in interface JMSServerManagername - the name of the destination to remove from JNDI or BindingRegistryException - if a problem occurred removing the destinationpublic boolean removeTopicFromJNDI(String name, String jndi) throws Exception
JMSServerManagerremoveTopicFromJNDI in interface JMSServerManagername - the name of the destination to remove from JNDI or BindingRegistryException - if a problem occurred removing the destinationpublic boolean removeTopicFromJNDI(String name) throws Exception
JMSServerManagerremoveTopicFromJNDI in interface JMSServerManagername - the name of the destination to remove from JNDI or BindingRegistryException - if a problem occurred removing the destinationpublic boolean removeConnectionFactoryFromJNDI(String name, String jndi) throws Exception
removeConnectionFactoryFromJNDI in interface JMSServerManagerExceptionpublic boolean removeConnectionFactoryFromJNDI(String name) throws Exception
removeConnectionFactoryFromJNDI in interface JMSServerManagerExceptionpublic boolean destroyQueue(String name) throws Exception
JMSServerManagerdestroyQueue in interface JMSServerManagername - the name of the queue to destroyException - if a problem occurred destroying the queuepublic boolean destroyQueue(String name, boolean removeConsumers) throws Exception
JMSServerManagerdestroyQueue in interface JMSServerManagername - the name of the queue to destroyException - if a problem occurred destroying the queuepublic boolean destroyTopic(String name) throws Exception
JMSServerManagerdestroyTopic in interface JMSServerManagername - the name of the topic to destroyException - if a problem occurred destroying the topicpublic boolean destroyTopic(String name, boolean removeConsumers) throws Exception
JMSServerManagerdestroyTopic in interface JMSServerManagername - the name of the topic to destroyException - if a problem occurred destroying the topicpublic void createConnectionFactory(String name, boolean ha, JMSFactoryType cfType, List<String> connectorNames, String... jndiBindings) throws Exception
createConnectionFactory in interface JMSServerManagerExceptionpublic void createConnectionFactory(String name, boolean ha, JMSFactoryType cfType, List<String> connectorNames, String clientID, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, long callFailoverTimeout, boolean cacheLargeMessagesClient, int minLargeMessageSize, boolean compressLargeMessage, int consumerWindowSize, int consumerMaxRate, int confirmationWindowSize, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnDurableSend, boolean blockOnNonDurableSend, boolean autoGroup, boolean preAcknowledge, String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int reconnectAttempts, boolean failoverOnInitialConnection, String groupId, String... jndiBindings) throws Exception
createConnectionFactory in interface JMSServerManagerExceptionpublic void createConnectionFactory(String name, boolean ha, JMSFactoryType cfType, String discoveryGroupName, String clientID, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, long callFailoverTimeout, boolean cacheLargeMessagesClient, int minLargeMessageSize, boolean compressLargeMessages, int consumerWindowSize, int consumerMaxRate, int confirmationWindowSize, int producerWindowSize, int producerMaxRate, boolean blockOnAcknowledge, boolean blockOnDurableSend, boolean blockOnNonDurableSend, boolean autoGroup, boolean preAcknowledge, String loadBalancingPolicyClassName, int transactionBatchSize, int dupsOKBatchSize, boolean useGlobalPools, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int reconnectAttempts, boolean failoverOnInitialConnection, String groupId, String... jndiBindings) throws Exception
createConnectionFactory in interface JMSServerManagerExceptionpublic void createConnectionFactory(String name, boolean ha, JMSFactoryType cfType, String discoveryGroupName, String... jndiBindings) throws Exception
createConnectionFactory in interface JMSServerManagerExceptionpublic HornetQConnectionFactory recreateCF(String name, ConnectionFactoryConfiguration cf) throws Exception
JMSServerManagerrecreateCF in interface JMSServerManagerExceptionpublic void createConnectionFactory(boolean storeConfig,
ConnectionFactoryConfiguration cfConfig,
String... jndi)
throws Exception
createConnectionFactory in interface JMSServerManagerExceptionpublic JMSStorageManager getJMSStorageManager()
public void replaceStorageManager(JMSStorageManager newStorage)
protected HornetQConnectionFactory internalCreateCFPOJO(ConnectionFactoryConfiguration cfConfig) throws HornetQException
cfConfig - HornetQExceptionpublic boolean destroyConnectionFactory(String name) throws Exception
JMSServerManagerdestroyConnectionFactory in interface JMSServerManagername - the name of the connection factory to destroyException - if a problem occurred destroying the connection factoryprotected boolean shutdownConnectionFactory(String name) throws Exception
name - Exceptionpublic String[] listRemoteAddresses() throws Exception
listRemoteAddresses in interface JMSServerManagerExceptionpublic String[] listRemoteAddresses(String ipAddress) throws Exception
listRemoteAddresses in interface JMSServerManagerExceptionpublic boolean closeConnectionsForAddress(String ipAddress) throws Exception
closeConnectionsForAddress in interface JMSServerManagerExceptionpublic String[] listConnectionIDs() throws Exception
listConnectionIDs in interface JMSServerManagerExceptionpublic String[] listSessions(String connectionID) throws Exception
listSessions in interface JMSServerManagerExceptionpublic String listPreparedTransactionDetailsAsJSON() throws Exception
listPreparedTransactionDetailsAsJSON in interface JMSServerManagerExceptionpublic String listPreparedTransactionDetailsAsHTML() throws Exception
listPreparedTransactionDetailsAsHTML in interface JMSServerManagerExceptionCopyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.