blob: 9730059d9ecb6ed813bac093e0ebc79d86372270 [file] [log] [blame]
<div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">5.8.&#160;Virtualhost Initial Configuration</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="Java-Broker-Initial-Configuration-Example.html">Prev</a>&#160;</td><th align="center" width="60%">Chapter&#160;5.&#160;Initial Configuration</th><td align="right" width="20%">&#160;<a accesskey="n" href="Java-Broker-Management-Channel.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="Java-Broker-Virtual-Host-Initial-Configuration"></a>5.8.&#160;Virtualhost Initial Configuration</h2></div></div></div><p>
<span class="emphasis"><em>Virtualhost</em></span> initial configuration can be specified in <span class="emphasis"><em>Virtualhost node</em></span>
attribute <span class="emphasis"><em>virtualHostInitialConfiguration</em></span>. On first startup,
the <span class="emphasis"><em>virtualhost</em></span> is created based on provided initial configuration.
You can define there manageable <span class="emphasis"><em>Virtualhost</em></span> attributes and children like exchanges, queues, etc.
</p><p>
The attribute <code class="varname">virtualHostInitialConfiguration</code> can have a value of <span class="emphasis"><em>URL</em></span>
to an external resource where <span class="emphasis"><em>virtualhost</em></span> initial configuration is provided in json format, or,
it can hold a string value with initial configuration in stringified json format. If required, you can
specify initial configuration as context variable which can be resolved as <span class="emphasis"><em>URL</em></span>
to external resource or stringified json.
</p><div class="example"><a id="d0e1743"></a><p class="title"><strong>Example&#160;5.2.&#160;Example of virtual host initial configuration provided as stringified JSON</strong></p><div class="example-contents"><pre class="programlisting">
...
"virtualhostnodes" : [ {
"name" : "default",
"type" : "JSON",
"defaultVirtualHostNode" : "true",
"virtualHostInitialConfiguration" : "{\"type\":\"BDB\",\"nodeAutoCreationPolicies\":[{\"patterns\":\".*\",\"createdOnPublish\":\"true\",\"createdOnConsume\":\"true\",\"nodeType\":\"queue\"}]}"
} ]
...</pre></div></div><br class="example-break" /><p>After creation of <span class="emphasis"><em>virtualhost</em></span> the value of
<code class="varname">virtualHostInitialConfiguration</code> is set to an empty string.</p></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="Java-Broker-Initial-Configuration-Example.html">Prev</a>&#160;</td><td align="center" width="20%"><a accesskey="u" href="Java-Broker-Initial-Configuration.html">Up</a></td><td align="right" width="40%">&#160;<a accesskey="n" href="Java-Broker-Management-Channel.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">5.7.&#160;Example of JSON 'Initial Configuration'&#160;</td><td align="center" width="20%"><a accesskey="h" href="Apache-Qpid-Broker-J-Book.html">Home</a></td><td align="right" valign="top" width="40%">&#160;Chapter&#160;6.&#160;Management Channels</td></tr></table></div></div>