geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > Configuring the JMS server
Date Wed, 26 Jan 2011 07:41:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Configuring+the+JMS+server">Configuring
the JMS server</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~maojia508">maojia</a>
    </h4>
        <br/>
                         <h4>Changes (13)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >{scrollbar} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >{excerpt}To configure the JMS
Server, select *JMS Server* on the *Console Navigation* menu on the left <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">hand</span>
side. You will get a list of JMS brokers available in the server and their status in the _JMS
Server Manager_ portlet. You will <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">be</span>
also <span class="diff-added-words"style="background-color: #dfd;">be</span> presented
with the _JMS Network Listeners_ portlet that displays all JMS network connectors. {excerpt}The
following figures illustrate these two portlets and options. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>!consoleJMSServerManager.png!
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >\\ <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >It contains some customized configurations
by Geronimo. It is strongly recommended that you add your own configurations based on the
template file, instead of copying it from elsewhere. <span class="diff-added-words"style="background-color:
#dfd;">See the following example for configuration steps:</span> <br></td></tr>
            <tr><td class="diff-unchanged" ># Enter the name of your new broker,
in this example, _testborker_. <br></td></tr>
            <tr><td class="diff-changed-lines" ># By default, keep the placeholders
in the configuration file as they are. Geronimo will replace them with real values in the
<span class="diff-changed-words">run<span class="diff-added-chars"style="background-color:
#dfd;"> </span>time.</span>  Here is an example: {noformat}${activemq.brokerName}{noformat}
<br></td></tr>
            <tr><td class="diff-changed-lines" ># In most cases, you only have
to add a new connector for the new borker. Uncomment the element for the <span class="diff-changed-words">connector<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">.</span></span>
and replace the {{*}} with an available port number in your machine. Be sure to keep the placeholder
style; otherwise, some advanced features such as the cluster might not work due to port conflict.
<br></td></tr>
            <tr><td class="diff-unchanged" >{code:xml} <br> &lt;!--
 <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >        &lt;/transportConnectors&gt;
<br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" >After you add the connector, the
section should be something <span class="diff-changed-words">like<span class="diff-added-chars"style="background-color:
#dfd;"> the following example</span>:</span> <br></td></tr>
            <tr><td class="diff-unchanged" >{code:xml} <br>&lt;transportConnector
name=&quot;openwire&quot; uri=&quot;tcp://localhost:${60000 + ${PortOffset}}&quot;/&gt;
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >Some files and folders are created
after the creation of a new broker: <br>* The folder {{var/activemq/data/{_}brokerName{_}}}
will be created to hold the data for the broker. <br></td></tr>
            <tr><td class="diff-changed-lines" >* A file named {{_brokerName_.xml}}
will be created in the folder <span class="diff-changed-words"><span class="diff-added-chars"style="background-color:
#dfd;">{{</span>var/activemq/conf<span class="diff-added-chars"style="background-color:
#dfd;">}}</span></span> to hold your broker configuration file. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" >where _brokerName_  is the name
<span class="diff-added-words"style="background-color: #dfd;">that</span> you
specified for the new broker. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h2. Add a SSL transport
connector for the broker <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">[Openwire|http://activemq.apache.org/openwire.html|ActiveMQ
Openwire] is the default transport for ActiveMQ. In Geronimo, you can also use SSL transport
to clients to connect to the broker using SSL. Follow the steps below to enable a SSL transport.
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">[Openwire|http://activemq.apache.org/openwire.html|ActiveMQ
Openwire] is the default transport for ActiveMQ. In Geronimo, you can connect to the broker
by using SSL transport to clients. Use the following steps to enable a SSL transport: <br></td></tr>
            <tr><td class="diff-changed-lines" ># Enable SSL connector section
in the broker&#39;s deployment <span class="diff-changed-words">plan<span class="diff-added-chars"style="background-color:
#dfd;">.</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" >{code:xml} <br>  &lt;transportConnector
name=&quot;ssl&quot; uri=&quot;ssl://localhost:${* + ${PortOffset}}&quot;/&gt;
<br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" ># Copy the keystore file, such
as test.ks which you intend to use for ssl verification, into <span class="diff-added-words"style="background-color:
#dfd;">the</span> {{&lt;geronimo-home&gt;/var/activemq/data/$brokerName/}}
<span class="diff-changed-words">directory<span class="diff-added-chars"style="background-color:
#dfd;">.</span></span> <br></td></tr>
            <tr><td class="diff-changed-lines" ># Update sslContext in the <span
class="diff-changed-words">plan<span class="diff-added-chars"style="background-color:
#dfd;">.</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" >{code:xml} <br>&lt;sslContext&gt;
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >Details <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">on</span>
<span class="diff-added-words"style="background-color: #dfd;">about</span> how
to configure connection factories, queues, topics and destinations are covered in the <span
class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">section</span>
[Configuring JMS <span class="diff-changed-words">resources]<span class="diff-added-chars"style="background-color:
#dfd;"> section</span>.</span> <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC30/Configuring+JAX-WS+engine"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC30/Configuring+JAX-WS+engine">Configuring
JAX-WS engine</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC30/Configuring+and+administering+the+Apache+Geronimo+Server"><img
border='0' align='middle' src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC30/Configuring+and+administering+the+Apache+Geronimo+Server">Configuring
and administering the Apache Geronimo Server</a></td><td width='33%' class='ScrollbarNextName'>&nbsp;<a
href="/confluence/display/GMOxDOC30/Configuring+the+Web+Container">Configuring the Web
Container</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC30/Configuring+the+Web+Container"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p>To configure the JMS Server, select <b>JMS Server</b> on the <b>Console
Navigation</b> menu on the left side. You will get a list of JMS brokers available in
the server and their status in the <em>JMS Server Manager</em> portlet. You will
also be presented with the <em>JMS Network Listeners</em> portlet that displays
all JMS network connectors. The following figures illustrate these two portlets and options.</p>

<p><span class="image-wrap" style=""><img src="/confluence/download/attachments/20645312/consoleJMSserverManager.PNG?version=1&amp;modificationDate=1233716464000"
style="border: 0px solid black" /></span></p>


<h1><a name="ConfiguringtheJMSserver-AddinganewJMSbroker"></a>Adding a new
JMS broker</h1>

<p>To add a new JMS broker, click on the link <b>Add JMS Broker</b>. In
the resulting page, you will be provided with a template for the ActiveMQ broker. The following
figure illustrates the template: <br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645312/consoleBrokerSetting.PNG?version=1&amp;modificationDate=1233702183000"
style="border: 0px solid black" /></span>
<br class="atl-forced-newline" /></p>

<p>It contains some customized configurations by Geronimo. It is strongly recommended
that you add your own configurations based on the template file, instead of copying it from
elsewhere. See the following example for configuration steps:</p>
<ol>
	<li>Enter the name of your new broker, in this example, <em>testborker</em>.</li>
	<li>By default, keep the placeholders in the configuration file as they are. Geronimo
will replace them with real values in the run time.  Here is an example: 
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>${activemq.brokerName}</pre>
</div></div></li>
	<li>In most cases, you only have to add a new connector for the new borker. Uncomment
the element for the connector and replace the <tt>*</tt> with an available port
number in your machine. Be sure to keep the placeholder style; otherwise, some advanced features
such as the cluster might not work due to port conflict.
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
 &lt;!-- 
            The transport connectors expose ActiveMQ over a given protocol to
            clients and other brokers. For more information, see: 
            
            http://activemq.apache.org/configuring-transports.html 
        --&gt;
        <span class="code-tag">&lt;transportConnectors&gt;</span>
            &lt;!--
            <span class="code-tag">&lt;transportConnector name=<span class="code-quote">"openwire"</span>
uri=<span class="code-quote">"tcp://localhost:${* + ${PortOffset}}"</span> /&gt;</span>
           
            <span class="code-tag">&lt;transportConnector name=<span class="code-quote">"openwire2"</span>
uri=<span class="code-quote">"tcp://localhost:${* + ${PortOffset}}"</span> discoveryUri=<span
class="code-quote">"multicast://default"</span>/&gt;</span>
            <span class="code-tag">&lt;transportConnector name=<span class="code-quote">"ssl"</span>
uri=<span class="code-quote">"ssl://localhost:${* + ${PortOffset}}"</span>/&gt;</span>
            <span class="code-tag">&lt;transportConnector name=<span class="code-quote">"stomp"</span>
uri=<span class="code-quote">"stomp://localhost:${* + ${PortOffset}}"</span>/&gt;</span>
           
            --&gt;
        <span class="code-tag">&lt;/transportConnectors&gt;</span>
</pre>
</div></div>
<p>After you add the connector, the section should be something like the following example:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;transportConnector name=<span class="code-quote">"openwire"</span>
uri=<span class="code-quote">"tcp://localhost:${60000 + ${PortOffset}}"</span>/&gt;</span>
</pre>
</div></div></li>
	<li>Click <b>Save</b>, and you will return to the <em>JMS Server
Manager</em> porlet. If no errors occurred, you will be prompted that a new broker is
created successfully. The <em>JMS Network Listeners</em> portlet will show the
connectors in the new JMS broker.<br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/20645312/consoleBrokerSuccess.PNG?version=1&amp;modificationDate=1233716270000"
style="border: 0px solid black" /></span></li>
</ol>


<p>Some files and folders are created after the creation of a new broker:</p>
<ul>
	<li>The folder <tt>var/activemq/data/<em>brokerName</em></tt>
will be created to hold the data for the broker.</li>
	<li>A file named <tt><em>brokerName</em>.xml</tt> will be created
in the folder <tt>var/activemq/conf</tt> to hold your broker configuration file.</li>
</ul>


<p>where <em>brokerName</em>  is the name that you specified for the new
broker.</p>

<h2><a name="ConfiguringtheJMSserver-AddaSSLtransportconnectorforthebroker"></a>Add
a SSL transport connector for the broker</h2>

<p><a href="http://activemq.apache.org/openwire.html" title="ActiveMQ Openwire" class="external-link"
rel="nofollow">Openwire</a> is the default transport for ActiveMQ. In Geronimo, you
can connect to the broker by using SSL transport to clients. Use the following steps to enable
a SSL transport:</p>
<ol>
	<li>Enable SSL connector section in the broker's deployment plan.
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
  <span class="code-tag">&lt;transportConnector name=<span class="code-quote">"ssl"</span>
uri=<span class="code-quote">"ssl://localhost:${* + ${PortOffset}}"</span>/&gt;</span>
</pre>
</div></div></li>
	<li>Copy the keystore file, such as test.ks which you intend to use for ssl verification,
into the <tt>&lt;geronimo-home&gt;/var/activemq/data/$brokerName/</tt>
directory.</li>
	<li>Update sslContext in the plan.
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;sslContext&gt;</span>
&lt;sslContext keyStore=<span class="code-quote">"file:${activemq.data}/test.ks"</span>
keyStorePassword=<span class="code-quote">"secret"</span>
trustStore=<span class="code-quote">"file:${activemq.data}/test.ks"</span>
trustStorePassword=<span class="code-quote">"secret"</span>/&gt;
<span class="code-tag">&lt;/sslContext&gt;</span>
</pre>
</div></div></li>
</ol>


<p>Details about how to configure connection factories, queues, topics and destinations
are covered in the <a href="/confluence/display/GMOxDOC30/Configuring+JMS+resources" title="Configuring
JMS resources">Configuring JMS resources</a> section.</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Configuring+the+JMS+server">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=20645312&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Configuring+the+JMS+server?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message