You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by jf...@apache.org on 2004/08/28 21:01:53 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/messaging/jms AbstractJMSMessagingService.java
jford 2004/08/28 12:01:53
Modified: src/java/org/apache/jetspeed/services/messaging/jms
AbstractJMSMessagingService.java
Log:
Added doc
Revision Changes Path
1.3 +41 -2 jakarta-jetspeed/src/java/org/apache/jetspeed/services/messaging/jms/AbstractJMSMessagingService.java
Index: AbstractJMSMessagingService.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/messaging/jms/AbstractJMSMessagingService.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractJMSMessagingService.java 27 Jul 2004 03:15:16 -0000 1.2
+++ AbstractJMSMessagingService.java 28 Aug 2004 19:01:53 -0000 1.3
@@ -65,8 +65,11 @@
protected static final String CONFIG_CONNECTION_FACTORY = "connection_factory";
+ //Session properties
protected static final String CONFIG_TRANSACTED = "transacted";
protected static final String CONFIG_ACK_MODE = "ack_mode";
+
+ //message properties
protected static final String CONFIG_TOPIC = "topic_enabled";
protected static final String CONFIG_DURABLE = "durable";
protected static final String CONFIG_NOLOCAL = "nolocal";
@@ -163,6 +166,10 @@
}
}
+ /**
+ * Initialize the JMS Configuration
+ *
+ */
protected void initJMSConfiguration()
{
@@ -239,6 +246,10 @@
logger.info("JMS Initialization complete.");
}
+ /**
+ * Helper method to print the acknowledgement mode
+ * @return
+ */
protected String printAckMode()
{
String ackModeStr = AUTO_ACKNOWLEDGE;
@@ -254,6 +265,10 @@
return ackModeStr;
}
+ /**
+ * Helper method to print the delivery mode
+ * @return
+ */
protected String printDeliveryMode()
{
String deliveryModeStr = PERSISTENT;
@@ -265,6 +280,11 @@
return deliveryModeStr;
}
+ /**
+ * Return the url if it was configured, othewise, generate the url
+ * from the scheme, host, port, and name properties
+ * @return
+ */
protected String getProviderURL()
{
String providerURL = url;
@@ -279,6 +299,12 @@
return providerURL;
}
+ /**
+ * Genereate a JNDI context using the context factory and
+ * the provider url
+ * @return
+ * @throws NamingException
+ */
protected Context getContext() throws NamingException
{
Hashtable properties = new Hashtable();
@@ -293,11 +319,19 @@
return new InitialContext(properties);
}
+ /**
+ * Create the JMS Session
+ * @throws JMSException
+ */
protected void createSession() throws JMSException
{
session = connection.createSession(transacted, ackMode);
}
+ /**
+ * Create the connection the the JMS Server
+ * @throws JMSException
+ */
protected abstract void createConnection() throws JMSException;
@@ -569,6 +603,12 @@
return jmsDestination;
}
+ /**
+ * Return the producer based on the given destination.
+ * This implemenation will cache the producers that are created for use later.
+ * @param destination
+ * @return
+ */
protected MessageProducer getProducer(String destination)
{
Destination producerDestination = getDestination(destination);
@@ -605,5 +645,4 @@
return producer;
}
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org