|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.jms.joram.JoramService
public class JoramService
Class that start/stop a simple collocated JORAM server. It also creates some initial Topics/Queues.
Field Summary | |
---|---|
private static java.lang.String |
CONN_FACT_NAME
Connection factory (for external components). |
private static java.lang.String |
DEFAULT_PERSISTENCE_DIRECTORY
Default name of the persistence directory (won't be used). |
private static int |
DEFAULT_PORT_NUMBER
Default port number. |
private javax.naming.InitialContext |
ictx
Initial Context. |
private static short |
ID
ID of the JORAM server. |
private org.objectweb.joram.client.connector.JoramAdapter |
joramAdapter
Instance of the resource adapter. |
private static int |
MAX_THREADS
Maximum threads. |
private static int |
MIN_THREADS
Minimum threads. |
private static java.lang.String |
QUEUE_CONN_FACT_NAME
Queue connection factory (for external components). |
private java.util.List<java.lang.String> |
queues
List of queues to create. |
private boolean |
started
Server is started ? |
private static int |
THREAD_TIMEOUT
Thread timeout. |
private static java.lang.String |
TOPIC_CONN_FACT_NAME
Topic connection factory (for external components). |
private java.util.List<java.lang.String> |
topics
List of topics to create. |
private static java.lang.String |
TRANSACTION_PROPERTY
Transaction property (Set to remove persistence settings : transient). |
Constructor Summary | |
---|---|
JoramService()
Default constructor. |
Method Summary | |
---|---|
private void |
connectToCollocated()
Connect to the collocated server to performg administration tasks. |
private void |
createConnectionFactories()
Create connection factories. |
private void |
createInitialQueues()
Create the list of the defined queues. |
private void |
createInitialTopics()
Create the list of the defined topics. |
private void |
createQueue(java.lang.String name)
Creates a queue with a given name. |
private void |
createTopic(java.lang.String name)
Creates a topic with a given name. |
private void |
disconnectFromCollocated()
Disconnect from the collocated server. |
javax.resource.spi.ResourceAdapter |
getResourceAdapter()
Gets the resource adapter instance. |
void |
setQueues(java.util.List<java.lang.String> queues)
Sets the initial queues of the Joram server. |
void |
setTopics(java.util.List<java.lang.String> topics)
Sets the initial topics of the Joram server. |
void |
start()
Starts a Joram Server without persistence. |
void |
stop()
Stops the JORAM server (if started). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String QUEUE_CONN_FACT_NAME
private static final java.lang.String TOPIC_CONN_FACT_NAME
private static final java.lang.String CONN_FACT_NAME
private static final int DEFAULT_PORT_NUMBER
private static final short ID
private static final java.lang.String TRANSACTION_PROPERTY
private static final java.lang.String DEFAULT_PERSISTENCE_DIRECTORY
private boolean started
private static final int MIN_THREADS
private static final int MAX_THREADS
private static final int THREAD_TIMEOUT
private org.objectweb.joram.client.connector.JoramAdapter joramAdapter
private java.util.List<java.lang.String> topics
private java.util.List<java.lang.String> queues
private javax.naming.InitialContext ictx
Constructor Detail |
---|
public JoramService()
Method Detail |
---|
public void start() throws JoramException
JoramException
- if start failspublic void stop() throws JoramException
JoramException
- if stop is failingprivate void connectToCollocated() throws JoramException
JoramException
- if the connection to the collocated server failsprivate void disconnectFromCollocated()
org.objectweb.joram.client.jms.admin.AdminException
java.net.ConnectException
private void createConnectionFactories() throws JoramException
JoramException
- if factories are not created.private void createTopic(java.lang.String name) throws JoramException
name
- the topic's name.
JoramException
- if the topic can't be createdprivate void createQueue(java.lang.String name) throws JoramException
name
- the topic's name.
JoramException
- if the queue can't be createdprivate void createInitialTopics() throws JoramException
JoramException
- if topics can't be createdprivate void createInitialQueues() throws JoramException
JoramException
- if queues can't be createdpublic void setQueues(java.util.List<java.lang.String> queues)
queues
- the list of the name of the queues.public void setTopics(java.util.List<java.lang.String> topics)
topics
- the list of the name of the topics.public javax.resource.spi.ResourceAdapter getResourceAdapter()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |