Joram 5.2.4

org.objectweb.joram.client.connector
Class JoramAdapter

java.lang.Object
  extended by org.objectweb.joram.client.connector.JoramAdapter
All Implemented Interfaces:
javax.resource.spi.ResourceAdapter, JoramAdapterMBean

public final class JoramAdapter
extends java.lang.Object
implements javax.resource.spi.ResourceAdapter, JoramAdapterMBean

A JoramAdapter instance manages connectivities to an underlying JORAM server: outbound connectivity (JCA connection management contract) and inbound connectivity (asynchronous message delivery as specified by the JCA message inflow contract).


Field Summary
 boolean asyncSend
          Determines whether the produced messages are asynchronously sent or not (without or with acknowledgement) Default is false (with ack).
 int cnxPendingTimer
          Period in milliseconds between two ping requests sent by the client connection to the server; if the server does not receive any ping request during more than 2 * cnxPendingTimer, the connection is considered as dead and processed as required.
 int connectingTimer
          Duration in seconds during which connecting is attempted (connecting might take time if the server is temporarily not reachable); the 0 value is set for connecting only once and aborting if connecting failed.
 boolean deleteDurableSubscription
          Determine whether durable subscription must be deleted or not at close time of the InboundConsumer.
 com.scalagent.jmx.JMXServer jmxServer
           
static org.objectweb.util.monolog.api.Logger logger
           
 boolean multiThreadSync
          Determines whether client threads which are using the same connection are synchronized in order to group together the requests they send.
 int multiThreadSyncDelay
          The maximum time the threads hang if 'multiThreadSync' is true.
 int queueMessageReadMax
          The maximum number of messages that can be read at once from a queue.
 int topicAckBufferMax
          The maximum number of acknowledgements that can be buffered in Session.DUPS_OK_ACKNOWLEDGE mode when listening to a topic.
 int topicActivationThreshold
          This threshold is the minimum messages number below which the subscription is activated.
 int topicPassivationThreshold
          This threshold is the maximum messages number over which the subscription is passivated.
 int txPendingTimer
          Duration in seconds during which a JMS transacted (non XA) session might be pending; above that duration the session is rolled back and closed; the 0 value means "no timer".
 
Constructor Summary
JoramAdapter()
          Constructs a JoramAdapter instance.
 
Method Summary
 void createCF(java.lang.String name)
          Creates a non managed connection factory and binds it to JNDI.
 java.lang.String createQueue(int serverId, java.lang.String name)
          Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.
 java.lang.String createQueue(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop)
          First tries to retrieve a queue destination on the underlying JORAM server first using JNDI then the Joram's internal name service.
 java.lang.String createQueue(java.lang.String name)
          Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.
 void createQueueCF(java.lang.String name)
          Creates a non managed PTP connection factory and binds it to JNDI.
 java.lang.String createTopic(int serverId, java.lang.String name)
          Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.
 java.lang.String createTopic(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop)
          Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.
 java.lang.String createTopic(java.lang.String name)
          Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.
 void createTopicCF(java.lang.String name)
          Creates a non managed PubSub connection factory and binds it to JNDI.
 java.lang.String createUser(java.lang.String name, java.lang.String password)
          Creates or retrieves a user on the underlying JORAM server.
 java.lang.String createUser(java.lang.String name, java.lang.String password, int serverId)
          Creates or retrieves a user on the given JORAM server.
 java.lang.String createUser(java.lang.String name, java.lang.String password, int serverId, java.lang.String identityClass)
          Creates or retrieves a user on the underlying JORAM server.
 java.lang.String createUser(java.lang.String name, java.lang.String password, java.lang.String identityClass)
          Creates or retrieves a user on the underlying JORAM server.
 void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, javax.resource.spi.ActivationSpec spec)
          Notifies the adapter to setup asynchronous message delivery for an application server endoint.
 void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, javax.resource.spi.ActivationSpec spec)
          Notifies the adapter to deactivate message delivery for a given endpoint.
 boolean equals(java.lang.Object o)
          Compares adapters according to their properties.
 boolean executeXMLAdmin(java.lang.String path)
          Executes the XML configuration file.
 void exit()
          Deprecated.  
 void exportRepositoryToFile(java.lang.String exportDir)
          Export the repository content to an XML file with default filename
 void exportRepositoryToFile(java.lang.String exportDir, java.lang.String exportFilename)
          Export the repository content to an XML file - only the destinations objects are retrieved in this version - xml script format of the admin objects (joramAdmin.xml)
 java.lang.String getAdminFileExportXML()
          Returns the path of XML the file containing a description of the exported administered objects (destination) from the platform.
 java.lang.String getAdminFileXML()
          Returns the path of XML the file containing a description of the administered objects to create and bind at starting.
 java.lang.Boolean getAsyncSend()
           
 java.lang.Short getClusterId()
           
 java.lang.Integer getCnxPendingTimer()
          Period in milliseconds between two ping requests sent by the client connection to the server; if the server does not receive any ping request during more than 2 * cnxPendingTimer, the connection is considered as dead and processed as required.
 java.lang.Boolean getCollocatedServer()
          Returns true if the Joram server is collocated.
 java.lang.Integer getConnectingTimer()
          Duration in seconds during which connecting is attempted (connecting might take time if the server is temporarily not reachable); the 0 value is set for connecting only once and aborting if connecting failed.
 java.lang.String getDefaultDMQ()
          Returns the default dead message queue for the local server, null if not set.
 java.lang.String getDefaultDMQ(int serverId)
          Returns the default dead message queue for a given server, null if not set.
 int getDefaultThreshold()
          Returns the default threshold of the Joram server.
 int getDefaultThreshold(int serverId)
          Returns the default threshold of the given Joram server.
 java.lang.Boolean getDeleteDurableSubscription()
          Returns the deleteDurableSubscription attribute.
 java.lang.String[] getDestinations()
          Returns the list of all destinations that exist on the local server.
 java.lang.String[] getDestinations(int serverId)
          Returns the list of all destinations that exist on the given server.
 java.lang.String getHAURL()
           
 java.lang.String getHostName()
          Returns the location of the Joram server.
 java.lang.String getIdentityClass()
           
 java.lang.String getJMSProviderName()
          Get the provider name: Joram.
 java.lang.String getJMSVersion()
          Gets the JMS API version.
 java.lang.Boolean getMultiThreadSync()
           
 java.lang.Integer getMultiThreadSyncDelay()
           
 java.lang.Boolean getPersistentPlatform()
          Returns true if the Joram server is persistent.
 java.lang.String getPlatformConfigDir()
          Path to the directory containing JORAM's configuration files (a3servers.xml, a3debug.cfg and admin file), needed when starting the collocated JORAM server.
 java.lang.String getProviderVersion()
          Gets the Joram's implementation version.
 java.lang.Integer getQueueMessageReadMax()
           
 java.lang.String getRootName()
           
 java.lang.String getRootPasswd()
           
 java.lang.Short getServerId()
          Returns the unique identifier of the Joram server.
 java.lang.String getServerName()
          Returns the name of the Joram server.
 java.lang.Integer getServerPort()
          Returns the listening port of the Joram server.
 java.util.List getServersIds()
          Deprecated. No longer supported next to Joram 5.2
 long getTimeOutToAbortRequest()
          Gets timeout before abort a request.
 java.lang.Integer getTopicAckBufferMax()
           
 java.lang.Integer getTopicActivationThreshold()
           
 java.lang.Integer getTopicPassivationThreshold()
           
 java.lang.Integer getTxPendingTimer()
          Duration in seconds during which a JMS transacted (non XA) session might be pending; above that duration the session is rolled back and closed; the 0 value means "no timer".
 java.lang.String[] getUsers()
          Returns the list of all users that exist on the local server.
 java.lang.String[] getUsers(int serverId)
          Returns the list of all users that exist on a given server.
 javax.transaction.xa.XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] specs)
          Returns XA resources given an array of ActivationSpec instances.
 int hashCode()
          Returns a code depending on the adapter properties.
 void removeDestination(java.lang.String name)
          Remove a destination specified by its JNDI name on the underlying JORAM platform.
 void resetDefaultDMQ()
          Unset the default dead message queue for the local server.
 void resetDefaultDMQ(int serverId)
          Unset the default dead message queue for the given server.
 void setAdminFileExportXML(java.lang.String adminFileExportXML)
          Sets the path of the XML file containing a description of the exported administered objects (destination) from the platform.
 void setAdminFileXML(java.lang.String adminFileXML)
          Sets the path of the XML file containing a description of the administered objects to create and bind at starting.
 void setAsyncSend(java.lang.Boolean asyncSend)
           
 void setClusterId(java.lang.Short clusterId)
           
 void setCnxPendingTimer(java.lang.Integer cnxPendingTimer)
           
 void setCollocatedServer(java.lang.Boolean collocatedServer)
           
 void setConnectingTimer(java.lang.Integer connectingTimer)
           
 void setDefaultThreshold(int threshold)
          Sets the default threshold of the Joram server.
 void setDefaultThreshold(int serverId, int threshold)
          Sets the default threshold of the given Joram server.
 void setDeleteDurableSubscription(java.lang.Boolean flg)
          Set the deleteDurableSubscription attribute.
 void setHAURL(java.lang.String haURL)
           
 void setHostName(java.lang.String hostName)
           
 void setIdentityClass(java.lang.String identityClass)
           
 void setMultiThreadSync(java.lang.Boolean multiThreadSync)
           
 void setMultiThreadSyncDelay(java.lang.Integer multiThreadSyncDelay)
           
 void setPersistentPlatform(java.lang.Boolean persistentPlatform)
           
 void setPlatformConfigDir(java.lang.String platformConfigDir)
           
 void setQueueMessageReadMax(java.lang.Integer queueMessageReadMax)
           
 void setRootName(java.lang.String rn)
           
 void setRootPasswd(java.lang.String rp)
           
 void setServerId(java.lang.Short serverId)
           
 void setServerName(java.lang.String serverName)
           
 void setServerPort(java.lang.Integer serverPort)
           
 void setTimeOutToAbortRequest(long timeOut)
          Sets timeout before abort a request.
 void setTopicAckBufferMax(java.lang.Integer topicAckBufferMax)
           
 void setTopicActivationThreshold(java.lang.Integer topicActivationThreshold)
           
 void setTopicPassivationThreshold(java.lang.Integer topicPassivationThreshold)
           
 void setTxPendingTimer(java.lang.Integer txPendingTimer)
           
 void start(javax.resource.spi.BootstrapContext ctx)
          Initializes the adapter; starts, if needed, a collocated JORAM server, and if needed again, administers it.
 void stop()
          Notifies the adapter to terminate the connections it manages, and if needed, to shutdown the collocated JORAM server.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static org.objectweb.util.monolog.api.Logger logger

connectingTimer

public int connectingTimer
Duration in seconds during which connecting is attempted (connecting might take time if the server is temporarily not reachable); the 0 value is set for connecting only once and aborting if connecting failed.


txPendingTimer

public int txPendingTimer
Duration in seconds during which a JMS transacted (non XA) session might be pending; above that duration the session is rolled back and closed; the 0 value means "no timer".


cnxPendingTimer

public int cnxPendingTimer
Period in milliseconds between two ping requests sent by the client connection to the server; if the server does not receive any ping request during more than 2 * cnxPendingTimer, the connection is considered as dead and processed as required.


queueMessageReadMax

public int queueMessageReadMax
The maximum number of messages that can be read at once from a queue. Default value is 2 in order to compensate the former subscription mechanism.


topicAckBufferMax

public int topicAckBufferMax
The maximum number of acknowledgements that can be buffered in Session.DUPS_OK_ACKNOWLEDGE mode when listening to a topic. Default is 0.


topicPassivationThreshold

public int topicPassivationThreshold
This threshold is the maximum messages number over which the subscription is passivated. Default is Integer.MAX_VALUE.


topicActivationThreshold

public int topicActivationThreshold
This threshold is the minimum messages number below which the subscription is activated. Default is 0.


asyncSend

public boolean asyncSend
Determines whether the produced messages are asynchronously sent or not (without or with acknowledgement) Default is false (with ack).


multiThreadSync

public boolean multiThreadSync
Determines whether client threads which are using the same connection are synchronized in order to group together the requests they send. Default is false.


multiThreadSyncDelay

public int multiThreadSyncDelay
The maximum time the threads hang if 'multiThreadSync' is true. Either they wake up (wait time out) or they are notified (by the first woken up thread).

Default is 1 ms.


deleteDurableSubscription

public boolean deleteDurableSubscription
Determine whether durable subscription must be deleted or not at close time of the InboundConsumer.

Default is false.


jmxServer

public com.scalagent.jmx.JMXServer jmxServer
Constructor Detail

JoramAdapter

public JoramAdapter()
Constructs a JoramAdapter instance.

Method Detail

setCollocatedServer

public void setCollocatedServer(java.lang.Boolean collocatedServer)

getCollocatedServer

public java.lang.Boolean getCollocatedServer()
Description copied from interface: JoramAdapterMBean
Returns true if the Joram server is collocated.

Specified by:
getCollocatedServer in interface JoramAdapterMBean
Returns:
true if the Joram server is collocated.

getHostName

public java.lang.String getHostName()
Description copied from interface: JoramAdapterMBean
Returns the location of the Joram server.

Specified by:
getHostName in interface JoramAdapterMBean
Returns:
The location of the Joram server.

setHostName

public void setHostName(java.lang.String hostName)

getServerPort

public java.lang.Integer getServerPort()
Description copied from interface: JoramAdapterMBean
Returns the listening port of the Joram server.

Specified by:
getServerPort in interface JoramAdapterMBean
Returns:
The listening port of the Joram server.

setServerPort

public void setServerPort(java.lang.Integer serverPort)

getHAURL

public java.lang.String getHAURL()

setHAURL

public void setHAURL(java.lang.String haURL)

getRootName

public java.lang.String getRootName()

setRootName

public void setRootName(java.lang.String rn)

getRootPasswd

public java.lang.String getRootPasswd()

setRootPasswd

public void setRootPasswd(java.lang.String rp)

getIdentityClass

public java.lang.String getIdentityClass()

setIdentityClass

public void setIdentityClass(java.lang.String identityClass)

getServerId

public java.lang.Short getServerId()
Description copied from interface: JoramAdapterMBean
Returns the unique identifier of the Joram server.

Specified by:
getServerId in interface JoramAdapterMBean
Returns:
The unique identifier of the Joram server.

setServerId

public void setServerId(java.lang.Short serverId)

getServerName

public java.lang.String getServerName()
Description copied from interface: JoramAdapterMBean
Returns the name of the Joram server.

Specified by:
getServerName in interface JoramAdapterMBean
Returns:
The name of the Joram server.

setServerName

public void setServerName(java.lang.String serverName)

getClusterId

public java.lang.Short getClusterId()

setClusterId

public void setClusterId(java.lang.Short clusterId)

getPlatformConfigDir

public java.lang.String getPlatformConfigDir()
Description copied from interface: JoramAdapterMBean
Path to the directory containing JORAM's configuration files (a3servers.xml, a3debug.cfg and admin file), needed when starting the collocated JORAM server.

Specified by:
getPlatformConfigDir in interface JoramAdapterMBean

setPlatformConfigDir

public void setPlatformConfigDir(java.lang.String platformConfigDir)

getPersistentPlatform

public java.lang.Boolean getPersistentPlatform()
Description copied from interface: JoramAdapterMBean
Returns true if the Joram server is persistent.

Specified by:
getPersistentPlatform in interface JoramAdapterMBean
Returns:
true if the Joram server is persistent.

setPersistentPlatform

public void setPersistentPlatform(java.lang.Boolean persistentPlatform)

getAdminFileXML

public java.lang.String getAdminFileXML()
Returns the path of XML the file containing a description of the administered objects to create and bind at starting.

Specified by:
getAdminFileXML in interface JoramAdapterMBean

setAdminFileXML

public void setAdminFileXML(java.lang.String adminFileXML)
Sets the path of the XML file containing a description of the administered objects to create and bind at starting.


getAdminFileExportXML

public java.lang.String getAdminFileExportXML()
Returns the path of XML the file containing a description of the exported administered objects (destination) from the platform.

Specified by:
getAdminFileExportXML in interface JoramAdapterMBean

setAdminFileExportXML

public void setAdminFileExportXML(java.lang.String adminFileExportXML)
Sets the path of the XML file containing a description of the exported administered objects (destination) from the platform.


getConnectingTimer

public java.lang.Integer getConnectingTimer()
Description copied from interface: JoramAdapterMBean
Duration in seconds during which connecting is attempted (connecting might take time if the server is temporarily not reachable); the 0 value is set for connecting only once and aborting if connecting failed.

Specified by:
getConnectingTimer in interface JoramAdapterMBean

setConnectingTimer

public void setConnectingTimer(java.lang.Integer connectingTimer)

getTxPendingTimer

public java.lang.Integer getTxPendingTimer()
Description copied from interface: JoramAdapterMBean
Duration in seconds during which a JMS transacted (non XA) session might be pending; above that duration the session is rolled back and closed; the 0 value means "no timer".

Specified by:
getTxPendingTimer in interface JoramAdapterMBean

setTxPendingTimer

public void setTxPendingTimer(java.lang.Integer txPendingTimer)

getCnxPendingTimer

public java.lang.Integer getCnxPendingTimer()
Description copied from interface: JoramAdapterMBean
Period in milliseconds between two ping requests sent by the client connection to the server; if the server does not receive any ping request during more than 2 * cnxPendingTimer, the connection is considered as dead and processed as required.

Specified by:
getCnxPendingTimer in interface JoramAdapterMBean

setCnxPendingTimer

public void setCnxPendingTimer(java.lang.Integer cnxPendingTimer)

getQueueMessageReadMax

public java.lang.Integer getQueueMessageReadMax()

setQueueMessageReadMax

public void setQueueMessageReadMax(java.lang.Integer queueMessageReadMax)

getTopicAckBufferMax

public java.lang.Integer getTopicAckBufferMax()

setTopicAckBufferMax

public void setTopicAckBufferMax(java.lang.Integer topicAckBufferMax)

getTopicPassivationThreshold

public java.lang.Integer getTopicPassivationThreshold()

setTopicPassivationThreshold

public void setTopicPassivationThreshold(java.lang.Integer topicPassivationThreshold)

getTopicActivationThreshold

public java.lang.Integer getTopicActivationThreshold()

setTopicActivationThreshold

public void setTopicActivationThreshold(java.lang.Integer topicActivationThreshold)

getAsyncSend

public java.lang.Boolean getAsyncSend()

setAsyncSend

public void setAsyncSend(java.lang.Boolean asyncSend)

getMultiThreadSync

public java.lang.Boolean getMultiThreadSync()

setMultiThreadSync

public void setMultiThreadSync(java.lang.Boolean multiThreadSync)

getMultiThreadSyncDelay

public java.lang.Integer getMultiThreadSyncDelay()

setMultiThreadSyncDelay

public void setMultiThreadSyncDelay(java.lang.Integer multiThreadSyncDelay)

getDeleteDurableSubscription

public java.lang.Boolean getDeleteDurableSubscription()
Returns the deleteDurableSubscription attribute.

Specified by:
getDeleteDurableSubscription in interface JoramAdapterMBean
Returns:
the DeleteDurableSubscription
See Also:
deleteDurableSubscription

setDeleteDurableSubscription

public void setDeleteDurableSubscription(java.lang.Boolean flg)
Set the deleteDurableSubscription attribute.

Parameters:
flg - to set deleteDurableSubscription
See Also:
deleteDurableSubscription

start

public void start(javax.resource.spi.BootstrapContext ctx)
           throws javax.resource.spi.ResourceAdapterInternalException
Initializes the adapter; starts, if needed, a collocated JORAM server, and if needed again, administers it.

Specified by:
start in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.spi.ResourceAdapterInternalException - If the adapter could not be initialized.

stop

public void stop()
Notifies the adapter to terminate the connections it manages, and if needed, to shutdown the collocated JORAM server.

Specified by:
stop in interface javax.resource.spi.ResourceAdapter

endpointActivation

public void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                               javax.resource.spi.ActivationSpec spec)
                        throws javax.resource.ResourceException
Notifies the adapter to setup asynchronous message delivery for an application server endoint.

Specified by:
endpointActivation in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.spi.IllegalStateException - If the adapter is either not started, or stopped.
javax.resource.NotSupportedException - If the provided activation parameters are invalid.
javax.resource.spi.CommException - If the JORAM server is not reachable.
java.lang.SecurityException - If connecting is not allowed.
javax.resource.ResourceException - Generic exception.

endpointDeactivation

public void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                                 javax.resource.spi.ActivationSpec spec)
Notifies the adapter to deactivate message delivery for a given endpoint.

Specified by:
endpointDeactivation in interface javax.resource.spi.ResourceAdapter

getXAResources

public javax.transaction.xa.XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] specs)
                                                 throws javax.resource.ResourceException
Returns XA resources given an array of ActivationSpec instances.

Specified by:
getXAResources in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.spi.IllegalStateException - If the adapter is either not started, or stopped.
javax.resource.NotSupportedException - If provided activation parameters are invalid.
javax.resource.spi.CommException - If the JORAM server is not reachable.
java.lang.SecurityException - If connecting is not allowed.
javax.resource.ResourceException - Generic exception.

exit

public void exit()
Deprecated. 


hashCode

public int hashCode()
Returns a code depending on the adapter properties.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Compares adapters according to their properties.

Overrides:
equals in class java.lang.Object

getJMSVersion

public java.lang.String getJMSVersion()
Gets the JMS API version.

Specified by:
getJMSVersion in interface JoramAdapterMBean
Returns:
The JMS API version.

getJMSProviderName

public java.lang.String getJMSProviderName()
Get the provider name: Joram.

Specified by:
getJMSProviderName in interface JoramAdapterMBean
Returns:
The provider name: Joram.

getProviderVersion

public java.lang.String getProviderVersion()
Gets the Joram's implementation version.

Specified by:
getProviderVersion in interface JoramAdapterMBean
Returns:
The Joram's implementation version.

getTimeOutToAbortRequest

public long getTimeOutToAbortRequest()
                              throws java.net.ConnectException
Gets timeout before abort a request.

Specified by:
getTimeOutToAbortRequest in interface JoramAdapterMBean
Returns:
timeout before abort a request.
Throws:
java.net.ConnectException
See Also:
AdminModule.getTimeOutToAbortRequest()

setTimeOutToAbortRequest

public void setTimeOutToAbortRequest(long timeOut)
                              throws java.net.ConnectException
Sets timeout before abort a request.

Specified by:
setTimeOutToAbortRequest in interface JoramAdapterMBean
Parameters:
timeout - timeout before abort a request.
Throws:
java.net.ConnectException
See Also:
AdminModule.setTimeOutToAbortRequest(long)

getDefaultDMQ

public java.lang.String getDefaultDMQ()
                               throws java.net.ConnectException,
                                      AdminException
Returns the default dead message queue for the local server, null if not set.

Specified by:
getDefaultDMQ in interface JoramAdapterMBean
Returns:
The object name of the dead message queue of the local server or null if none exists.
Throws:
java.net.ConnectException - If the connection fails.
AdminException - Never thrown.
See Also:
getDefaultDMQ(int)

resetDefaultDMQ

public void resetDefaultDMQ()
                     throws java.net.ConnectException,
                            AdminException
Unset the default dead message queue for the local server.

Specified by:
resetDefaultDMQ in interface JoramAdapterMBean
Throws:
java.net.ConnectException
AdminException

getDefaultDMQ

public java.lang.String getDefaultDMQ(int serverId)
                               throws java.net.ConnectException,
                                      AdminException
Returns the default dead message queue for a given server, null if not set.

The request fails if the target server does not belong to the platform.

Specified by:
getDefaultDMQ in interface JoramAdapterMBean
Parameters:
serverId - Unique identifier of the server.
Returns:
The object name of the dead message queue of the given server or null if none exists.
Throws:
java.net.ConnectException - If the connection fails.
AdminException - If the request fails.

resetDefaultDMQ

public void resetDefaultDMQ(int serverId)
                     throws java.net.ConnectException,
                            AdminException
Unset the default dead message queue for the given server.

Specified by:
resetDefaultDMQ in interface JoramAdapterMBean
Parameters:
serverId - Unique identifier of the given server.
Throws:
java.net.ConnectException
AdminException

getDefaultThreshold

public int getDefaultThreshold()
                        throws java.net.ConnectException,
                               AdminException
Returns the default threshold of the Joram server.

Specified by:
getDefaultThreshold in interface JoramAdapterMBean
Returns:
the default threshold of the Joram server.
Throws:
java.net.ConnectException
AdminException
See Also:
AdminModule.getDefaultThreshold()

getDefaultThreshold

public int getDefaultThreshold(int serverId)
                        throws java.net.ConnectException,
                               AdminException
Returns the default threshold of the given Joram server.

Specified by:
getDefaultThreshold in interface JoramAdapterMBean
Parameters:
serverId - Unique identifier of the given Joram server.
Returns:
the default threshold of the given Joram server.
Throws:
java.net.ConnectException
AdminException
See Also:
AdminModule.getDefaultThreshold(int)

setDefaultThreshold

public void setDefaultThreshold(int threshold)
                         throws java.net.ConnectException,
                                AdminException
Sets the default threshold of the Joram server.

Specified by:
setDefaultThreshold in interface JoramAdapterMBean
Parameters:
threshold - the default threshold of the Joram server.
Throws:
java.net.ConnectException
AdminException
See Also:
AdminModule.setDefaultThreshold(int)

setDefaultThreshold

public void setDefaultThreshold(int serverId,
                                int threshold)
                         throws java.net.ConnectException,
                                AdminException
Sets the default threshold of the given Joram server.

Specified by:
setDefaultThreshold in interface JoramAdapterMBean
Parameters:
serverId - Unique identifier of the given Joram server.
threshold - the default threshold of the given Joram server.
Throws:
java.net.ConnectException
AdminException
See Also:
AdminModule.setDefaultThreshold(int, int)

getDestinations

public java.lang.String[] getDestinations()
                                   throws java.net.ConnectException,
                                          AdminException
Returns the list of all destinations that exist on the local server. This method creates and registers MBeans for all the destinations of the selected servers.

Specified by:
getDestinations in interface JoramAdapterMBean
Returns:
An array containing the object name of all destinations defined on the given server or null if none exists.
Throws:
java.net.ConnectException - If the connection is closed or broken.
AdminException - Never thrown.
See Also:
getDestinations(int)

getDestinations

public java.lang.String[] getDestinations(int serverId)
                                   throws java.net.ConnectException,
                                          AdminException
Returns the list of all destinations that exist on the given server. This method creates and registers MBeans for all the destinations of the selected servers.

The request fails if the target server does not belong to the platform.

Specified by:
getDestinations in interface JoramAdapterMBean
Returns:
An array containing the object name of all destinations defined on the given server or null if none exists.
Throws:
java.net.ConnectException - If the connection is closed or broken.
AdminException - Never thrown.
See Also:
JoramAdapterMBean.getDestinations(int)

createQueue

public java.lang.String createQueue(java.lang.String name)
                             throws AdminException,
                                    java.net.ConnectException
Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.

Specified by:
createQueue in interface JoramAdapterMBean
Parameters:
name - The name of the queue.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - if the connection is closed or broken
See Also:
createQueue(int, String, String, Properties)

createQueue

public java.lang.String createQueue(int serverId,
                                    java.lang.String name)
                             throws AdminException,
                                    java.net.ConnectException
Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.

Specified by:
createQueue in interface JoramAdapterMBean
Parameters:
serverId - The identifier of the server where deploying the queue.
name - The name of the queue.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - if the connection is closed or broken
See Also:
createQueue(int, String, String, Properties)

createQueue

public java.lang.String createQueue(int serverId,
                                    java.lang.String name,
                                    java.lang.String className,
                                    java.util.Properties prop)
                             throws AdminException,
                                    java.net.ConnectException
First tries to retrieve a queue destination on the underlying JORAM server first using JNDI then the Joram's internal name service. Finally, if the destination does not exist it is created. Anyway at the end of this method the destination is bound in the JNDI repository.

Specified by:
createQueue in interface JoramAdapterMBean
Parameters:
serverId - The identifier of the server where deploying the queue.
name - The name of the queue.
className - The queue class name.
prop - The queue properties.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - if the connection is closed or broken

createTopic

public java.lang.String createTopic(java.lang.String name)
                             throws AdminException,
                                    java.net.ConnectException
Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.

Specified by:
createTopic in interface JoramAdapterMBean
Parameters:
name - The name of the topic.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - if the connection is closed or broken
See Also:
createTopic(int, String, String, Properties)

createTopic

public java.lang.String createTopic(int serverId,
                                    java.lang.String name)
                             throws AdminException,
                                    java.net.ConnectException
Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.

Specified by:
createTopic in interface JoramAdapterMBean
Parameters:
serverId - The identifier of the server where deploying the topic.
name - The name of the topic.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - if the connection is closed or broken
See Also:
createTopic(int, String, String, Properties)

createTopic

public java.lang.String createTopic(int serverId,
                                    java.lang.String name,
                                    java.lang.String className,
                                    java.util.Properties prop)
                             throws AdminException,
                                    java.net.ConnectException
Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.

Specified by:
createTopic in interface JoramAdapterMBean
Parameters:
serverId - The identifier of the server where deploying the topic.
name - The name of the topic.
className - The topic class name.
prop - The topic properties.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - if the connection is closed or broken

removeDestination

public void removeDestination(java.lang.String name)
                       throws AdminException
Remove a destination specified by its JNDI name on the underlying JORAM platform.

Specified by:
removeDestination in interface JoramAdapterMBean
Parameters:
name - The JNDI name of the destination.
Throws:
AdminException

getUsers

public java.lang.String[] getUsers()
                            throws java.net.ConnectException,
                                   AdminException
Returns the list of all users that exist on the local server. This method creates and registers MBeans for all the users of the selected servers.

Specified by:
getUsers in interface JoramAdapterMBean
Returns:
An array containing the object name of all users defined on the given server or null if none exists.
Throws:
java.net.ConnectException - If the connection fails.
AdminException - Never thrown.
See Also:
getUsers(int)

getUsers

public java.lang.String[] getUsers(int serverId)
                            throws java.net.ConnectException,
                                   AdminException
Returns the list of all users that exist on a given server. This method creates and registers MBeans for all the users of the selected servers.

The request fails if the target server does not belong to the platform.

Specified by:
getUsers in interface JoramAdapterMBean
Parameters:
serverId - Unique identifier of the given server.
Returns:
An array containing the object name of all users defined on the given server or null if none exists.
Throws:
java.net.ConnectException - If the connection fails.
AdminException - If the request fails.

createUser

public java.lang.String createUser(java.lang.String name,
                                   java.lang.String password)
                            throws AdminException,
                                   java.net.ConnectException
Creates or retrieves a user on the underlying JORAM server.

Specified by:
createUser in interface JoramAdapterMBean
Parameters:
name - The login name of the user.
password - The password of the user.
Returns:
The object name of created user.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - If the connection fails.
See Also:
createUser(String, String, int, String)

createUser

public java.lang.String createUser(java.lang.String name,
                                   java.lang.String password,
                                   java.lang.String identityClass)
                            throws AdminException,
                                   java.net.ConnectException
Creates or retrieves a user on the underlying JORAM server.

Specified by:
createUser in interface JoramAdapterMBean
Parameters:
name - The login name of the user.
password - The password of the user.
identityClass - The identity class used for authentication.
Returns:
The object name of created user.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - If the connection fails.
See Also:
createUser(String, String, int, String)

createUser

public java.lang.String createUser(java.lang.String name,
                                   java.lang.String password,
                                   int serverId)
                            throws AdminException,
                                   java.net.ConnectException
Creates or retrieves a user on the given JORAM server.

Specified by:
createUser in interface JoramAdapterMBean
Parameters:
name - The login name of the user.
password - The password of the user.
serverId - The unique identifier of the Joram server.
Returns:
The object name of created user.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - If the connection fails.
See Also:
createUser(String, String, int, String)

createUser

public java.lang.String createUser(java.lang.String name,
                                   java.lang.String password,
                                   int serverId,
                                   java.lang.String identityClass)
                            throws AdminException,
                                   java.net.ConnectException
Creates or retrieves a user on the underlying JORAM server.

Specified by:
createUser in interface JoramAdapterMBean
Parameters:
name - The login name of the user.
password - The password of the user.
serverId - The unique identifier of the Joram server.
identityClass - The identity class used for authentication.
Returns:
The object name of created user.
Throws:
AdminException - If the creation fails.
java.net.ConnectException - If the connection fails.

createCF

public void createCF(java.lang.String name)
Creates a non managed connection factory and binds it to JNDI.

Specified by:
createCF in interface JoramAdapterMBean
Parameters:
name - Name of created connection factory.

createQueueCF

public void createQueueCF(java.lang.String name)
Creates a non managed PTP connection factory and binds it to JNDI.

Specified by:
createQueueCF in interface JoramAdapterMBean
Parameters:
name - Name of created connection factory.

createTopicCF

public void createTopicCF(java.lang.String name)
Creates a non managed PubSub connection factory and binds it to JNDI.

Specified by:
createTopicCF in interface JoramAdapterMBean
Parameters:
name - Name of created connection factory.

executeXMLAdmin

public boolean executeXMLAdmin(java.lang.String path)
                        throws java.lang.Exception
Executes the XML configuration file.

Specified by:
executeXMLAdmin in interface JoramAdapterMBean
Parameters:
the - path for the joramAdmin file
Throws:
AdminException - if an error occurs
java.lang.Exception

exportRepositoryToFile

public void exportRepositoryToFile(java.lang.String exportDir)
                            throws AdminException
Export the repository content to an XML file with default filename. - only the destinations objects are retrieved in this version - xml script format of the admin objects (joramAdmin.xml)

Specified by:
exportRepositoryToFile in interface JoramAdapterMBean
Parameters:
exportDir - target directory where the export file will be put
Throws:
AdminException - if an error occurs

exportRepositoryToFile

public void exportRepositoryToFile(java.lang.String exportDir,
                                   java.lang.String exportFilename)
                            throws AdminException
Export the repository content to an XML file - only the destinations objects are retrieved in this version - xml script format of the admin objects (joramAdmin.xml)

Specified by:
exportRepositoryToFile in interface JoramAdapterMBean
Parameters:
exportDir - target directory where the export file will be put
exportFilename - filename of the export file
Throws:
AdminException - if an error occurs

getServersIds

public java.util.List getServersIds()
                             throws java.net.ConnectException,
                                    AdminException
Deprecated. No longer supported next to Joram 5.2

Returns the list of the platform's servers' identifiers.

Throws:
AdminException - If the request fails.
java.net.ConnectException - If the connection fails.

Joram 5.2.4

Copyright © 2000 - 2009 Scalagent D.T. - All rights reserved