|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.j_spaces.jms.utils.GSJMSAdmin
public class GSJMSAdmin
Admin util for the GigaSpaces JMS implementation. it contains static methods for AdministrationObjects jndi lookup, such as Topic/Queue/TopicConnectionFactory/QueueConnectionFactory and its XA variations. It initializes JNDI InitialContext according to the details supplied in the jms-config.xml configuration file. If an instance of the class is already exist we return the same static instance but if there is custom user defined jmsConfigFileName which differ from the default config/jms/jms-config.xml file, we reload the right xml config file. The GigaSpaces Log util is used for jms debugging and output redirections.
Field Summary | |
---|---|
static String |
DUR_SUB_CLIENT_ID
|
static String |
DUR_SUB_CONNECTION_ID
|
static String |
DUR_SUB_SESSION_ID
|
static String |
DUR_SUB_SUBSCRIPTION_NAME
|
static String |
DUR_SUB_TOPIC_NAME
|
static String |
DUR_SUBSCRIBERS_TAG
|
static String |
JMS_TAG
|
Method Summary | |
---|---|
void |
addNewDurableSubscriberDetailsIntoXML(Hashtable<String,String> _subscriberDetailsHash)
Adds new Durable subsriber client id details into a structure and persist it to the config file. |
Destination |
createAndBindDestination(boolean isQueue,
String destinationName)
Creates a Destination (GSTopicImpl or GSQueueImpl) and then binds it to the jndi registry. |
Destination |
createAndBindTempDestination(GSSessionImpl session)
Create a temporary destination and bind it into the jndi reg. |
void |
destroyAndUnBindDestination(String destinationName)
Destroys a Destination (GSTopicImpl or GSQueueImpl) and then unbinds from the jndi registry. |
static void |
exit(int result)
|
String |
getBondedDestPrefixName()
|
String |
getBondedQueueFacName()
|
String |
getBondedTopicFacName()
|
String |
getBondedXAQueueFacName()
|
String |
getBondedXATopicFacName()
|
int |
getCompressionMinSize()
|
Destination |
getDestination(String destinationName)
|
Hashtable |
getDurableSubscriberDetailsFromXML(String topicName,
String subscriptionName)
|
static GSJMSAdmin |
getInstance()
Returns instance of the GSJMSAdmin utility. |
static GSJMSAdmin |
getInstance(String jmsConfigFileName)
Returns instance of the GSJMSAdmin utility. |
String |
getOverwrittenConnFacSpaceURL()
|
GSQueueImpl |
getQueue(String name)
Returns a GSQueueImpl object, which is found, using the jndi lookup service. |
GSQueueConnectionFactoryImpl |
getQueueConnectionFactory()
Returns a GSQueueConnectionFactoryImpl object which is found, using the jndi lookup service. |
GSTopicImpl |
getTopic(String name)
Returns a GSTopicImpl object. |
GSTopicConnectionFactoryImpl |
getTopicConnectionFactory()
Returns a GSTopicConnectionFactoryImpl object, which is found, using the jndi lookup service. |
com.j_spaces.jms.GSXAQueueConnectionFactoryImpl |
getXAQueueConnectionFactory()
Returns a GSXAQueueConnectionFactoryImpl object which is found, using the jndi lookup service. |
com.j_spaces.jms.GSXATopicConnectionFactoryImpl |
getXATopicConnectionFactory()
Returns a GSXATopicConnectionFactoryImpl object, which is found, using the jndi lookup service. |
Object |
jndiLookup(String name)
Creates a JNDI API InitialContext object if none exists yet. |
void |
rebindToJNDI(String name,
Object obj)
Rebinding to a JNDI registry using the jndi Context details provided in the config file. |
void |
unbindFromJNDI(String name)
Unbinding from the JNDI registry using the jndi Context details provided in the config file. |
void |
unsubscribeDurableSubscriberDetailsFromXML(Hashtable _subscriberDetailsHash)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DUR_SUBSCRIBERS_TAG
public static final String DUR_SUB_CLIENT_ID
public static final String DUR_SUB_SESSION_ID
public static final String DUR_SUB_CONNECTION_ID
public static final String DUR_SUB_TOPIC_NAME
public static final String DUR_SUB_SUBSCRIPTION_NAME
public static final String JMS_TAG
Method Detail |
---|
public final String getOverwrittenConnFacSpaceURL()
public static GSJMSAdmin getInstance(String jmsConfigFileName) throws JMSException
jmsConfigFileName
- OTHER custom config file name which the user may define.
JMSException
public static GSJMSAdmin getInstance() throws JMSException
JMSException
public void addNewDurableSubscriberDetailsIntoXML(Hashtable<String,String> _subscriberDetailsHash) throws JMSException
_subscriberDetailsHash
-
JMSException
public void unsubscribeDurableSubscriberDetailsFromXML(Hashtable _subscriberDetailsHash) throws JMSException
_subscriberDetailsHash
-
JMSException
public Hashtable getDurableSubscriberDetailsFromXML(String topicName, String subscriptionName)
topicName
- subscriptionName
-
public GSQueueConnectionFactoryImpl getQueueConnectionFactory() throws JMSException, NamingException
NamingException
- if name cannot be found
JMSException
- thrown if GS space failed to load.public GSTopicConnectionFactoryImpl getTopicConnectionFactory() throws JMSException, NamingException
NamingException
- if name cannot be found
JMSException
- thrown if GS space failed to load.public com.j_spaces.jms.GSXAQueueConnectionFactoryImpl getXAQueueConnectionFactory() throws JMSException, NamingException
NamingException
- if name cannot be found
JMSException
- thrown if GS space failed to load.public com.j_spaces.jms.GSXATopicConnectionFactoryImpl getXATopicConnectionFactory() throws JMSException, NamingException
NamingException
- if name cannot be found
JMSException
- thrown if GS space failed to load.public Destination createAndBindTempDestination(GSSessionImpl session) throws JMSException, NamingException
session
- the session to create the destination with
JMSException
- if the destination cannot be created
NamingException
public Destination createAndBindDestination(boolean isQueue, String destinationName) throws NamingException, JMSException
isQueue
- destinationName
-
NamingException
JMSException
public void destroyAndUnBindDestination(String destinationName) throws JMSException
destinationName
-
NamingException
JMSException
public GSQueueImpl getQueue(String name) throws NamingException, JMSException
name
- String specifying topic name (e.g. MyQueue) when this
destination will be bound to the jndi registry, we add to the
name a prefix such as:
GigaSpaces;pc-gershon;JavaSpaces;jms;queues; NamingException
- (or other exception) if name cannot be found
JMSException
public GSTopicImpl getTopic(String name) throws NamingException, JMSException
name
- String specifying topic name (e.g. MyTopic) when this
destination will be bound to the jndi registry, we add to the
name a prefix such as:
GigaSpaces;pc-gershon;JavaSpaces;jms;topics; NamingException
- (or other exception) if name cannot be found
JMSException
public Destination getDestination(String destinationName) throws NamingException, JMSException
NamingException
JMSException
public Object jndiLookup(String name) throws NamingException, JMSException
name
- the name of the object to be looked up
NamingException
- (or other exception) if name cannot be found
JMSException
public void rebindToJNDI(String name, Object obj) throws NamingException, JMSException
name
- obj
-
NamingException
JMSException
public void unbindFromJNDI(String name) throws NamingException, JMSException
name
-
NamingException
JMSException
public static void exit(int result)
public String getBondedQueueFacName()
public String getBondedTopicFacName()
public String getBondedXAQueueFacName()
public String getBondedXATopicFacName()
public String getBondedDestPrefixName()
public int getCompressionMinSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |