You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/08/23 07:14:36 UTC
svn commit: r239347 [2/2] - in
/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs: ./
controls/ pageflow/ samples/ system-controls/ejb/ system-controls/jdbc/
system-controls/jms/
Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/system-controls/jms/jmsControlTutorial.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/system-controls/jms/jmsControlTutorial.xml?rev=239347&r1=239346&r2=239347&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/system-controls/jms/jmsControlTutorial.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/system-controls/jms/jmsControlTutorial.xml Mon Aug 22 22:14:31 2005
@@ -5,7 +5,7 @@
<title>JMS Control Tutorial</title>
</header>
<body>
- <p>The JmsControl is an extensible control. Before a JmsControl can be used in an application,
+ <p>The Jmscontrol is an extensible control. Before a JmsControl can be used in an application,
a sub-interface of the <code>org.apache.beehive.controls.system.jms.JmsControl</code> interface must be created and
annotated with <code>@ControlExtension</code>.</p>
@@ -19,65 +19,57 @@
<p>In order for the control to work, it needs to know the destination of the messages. This is
accomplished using a JNDI context. Unless otherwise specified the default initial
- context is used. This may be overridden by settng the jndiContextFactory and
- jndiProviderUrl properties, either programically (setJndiContextFactory() and
- setJndiProviderUrl()) or via the corresponding @Destination attributes.</p>
+ context is used. This may be overridden by settng the <code>jndiContextFactory</code> and
+ <code>jndiProviderUrl</code> properties, either programically using the <code>setJndiContextFactory()</code> and
+ <code>setJndiProviderUrl()</code> setters or via the corresponding <code>@Destination</code> attributes.</p>
- <p>The queue/topic destination is then obtained using the value of the sendJndiName property
- and a queue/topic connection is obtained using by the jndiConnectionFactory property.
+ <p>The queue/topic destination is then obtained using the value of the <code>sendJndiName</code> property
+ and a queue/topic connection is obtained using by the <code>jndiConnectionFactory</code> property.
In most cases the same connection factory is used for both queues and topics. The
- @Destination sendType attribute may be used to constrain the use of the control to
+ <code>@Destination</code> sendType attribute may be used to constrain the use of the control to
either a topic or a queue. By default it's value is Auto which allowes for run-time
- determination of whether the sendJndiName names a queue or a topic. By setting it to
+ determination of whether the <code>sendJndiName</code> names a queue or a topic. By setting it to
Queue or Topic a run-time check is made to see if the connection factory and destination
is of the correct type.</p>
<p>If the JNDI context to be used (i.e. the control is running in an ejb-container (or
servlet-container with a JNDI context) is known (or is the default context) and the
- connection-factory (e.g. weblogic.jms.ConnectionFactory) and queue JNDI name
- (e.g. jms.SampleQueue) is also known at development time then the extension class can
- be annotated with the @Destination annotation as shown in the example:</p>
+ connection-factory (e.g. <code>weblogic.jms.ConnectionFactory</code>) and queue JNDI name
+ (e.g. <code>jms.SampleQueue</code>) is also known at development time then the extension class can
+ be annotated with the <code>@Destination</code> annotation as shown in the example:</p>
<source>
@ControlExtension
@JMSControl.Destination(sendType=JMSControl.DestinationType.Queue,sendJndiName="jms.SampleQueue",jndiConnectionFactory="weblogic.jms.ConnectionFactory")
-public interface SampleQueue extends JMSControl
-{
+public interface SampleQueue
+ extends JMSControl {
...
}
</source>
-
- <p>Likewise, for a topic (e.g. jms.SampleTopic) the following file might be appropriate:</p>
-
+ <p>Likewise, for a topic (e.g. <code>jms.SampleTopic</code>) the following file might be appropriate:</p>
<source>
@ControlExtension
@JMSControl.Destination(sendType=JMSControl.DestinationType.Topic,sendJndiName="jms.SampleTopic",jndiConnectionFactory="weblogic.jms.ConnectionFactory")
-public interface SampleTopic extends JMSControl
-{
+public interface SampleTopic
+ extends JMSControl {
...
}
</source>
-
-
- <p>The sendType attribute could be left out of these examples and the control extensions would still work.</p>
-
+ <p>The <code>sendType</code> attribute could be left out of these examples and the control extensions would still work.</p>
<p>See Extension Class Annotation for other annotations defined at the class or type level.</p>
-
<p>The extension interface can include one or more methods that send messages. These methods must have
at least one unannotated parameter that corresponds to the body of the message. Other annotated
parameters can defined to provide property values and other information at run-time to the
message (see Extension Class Annotation for allowed annotation). The method itself can be
annotated (see Extension Class Annotation for allowed annotation).</p>
-
<p>Some examples appropriate to topics and queues include:</p>
-
<source>
/**
* Submit an xml object (org.apache.xmlbeans) as a text message.
* @param document the document.
* @param type the message JMS type.
*/
-public void submitXml(XmlObject document,@Type String type);
+public void submitXml(XmlObject document, @Type String type);
/**
* Submit an xml object (org.apache.xmlbeans) with JMS type "xmlObject".
@@ -99,7 +91,6 @@
* @param hello the value of the hello property.
*/
public void submitMessage(byte[] body, @Property(name=hello) hello);
-
/**
* Submit a MapMessage with the given map and property hello set to world.