
In the Petals Webconsole you can find several interesting points like:
* Server configuration.
* Remote component configuration.
* General Webconsole properties.
{column}
\\
{column:width=350px}
{panel}{toc}\\ {panel}\\
{column}\\
{section}
h1. Server configuration clarification
Petals Webconsole contain an automatic mechanism that it allows to try to connect to a server declared into the webconsole.xml file,
this file is located into /WEB-INF/classes/webconsole.xml and its associated XML schema (webconsole.xsd).
h3. Server connection configuration through Webconsole interface
By clicking on the following button:
!Manage-connection-menu.png|thumbnail!
You can access in the Petals Webconsole the management view of servers declared into webconsole.xml, management
functionalities available are:
* Create new server.
* Delete old server.
* Modify declared server.
* Switch the current server connection.
You can add a new server by clicking on _Add server_ in the server management view:
!add-servers.png|thumbnail!
This action displays to you the server creation form:
!8.png|thumbnail!
For the moment just stay focused on the _general server properties_ because the _RMI component_
_properties_ part will be addressed in the +Remote component configuration+ part of this documentation.
In the general server properties part the following server parameters must be defined:
* The hostname or ip address of the new Petals server.
* The JMX connection port of the server.
* The JMX login connection of the server.
* The JMX password connection of the server.
When you submit the form a new server should be created in _server list_ and this server should be also _added into the_
_webconsole.xml_, if it isn't +already defined+.
You can also modify server properties by editing the desired server (by clicking on details icon: !loupe.png|thumbnail! in the server list):
!details-servers.png|thumbnail!
After clicking on the link you return to the creation server form but this time in order to change +current server+
+properties+ and not to create a new server.
Another good feature is to allow to remove an old server if it isn't necessary for the moment in the server list,
this removal can be performed by clicking on the following icon: !Delete-server.jpg|thumbnail!
(!) *Warning:* If you have stacktrace due to failed connections, please verify if at least one declared server
in the webconsole.xml can be acceded. Other careful point, we recommend to you that don't keep this
configuration file empty (keep at least one server in order to allow the webconsole to try a connection, even
if the Petals ESB node is down).
You can also switch or connect to one server of the list, by only clicking on the connection icon:
!connect-servers.png|thumbnail!
It's useful in order to change of current Petals Domain.
When you try a new server connection and if the connection is available, the Petals Webconsole
allows you to save the complete recovered topology.
!persist-topology.png|thumbnail!
h3. Server connection configuration through webconsole.xml
You can also perform the previous features (create, delete, modify ... server) directly in the webconsole.xml under
*/WEB-INF/classes/webconsole.xml*. Just modify XML attributes to perform server properties modification, or
add/remove _Server_ XML element in order to add/remove a server in configuration file.
{code:title=webconsole.xml}<ns:Servers xmlns:ns="org.ow2.petals.tools.webconsole.xmlbeans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="org.ow2.petals.tools.webconsole.xmlbeans webconsole.xsd ">
<ns:Server port="7700" login="petals" password="petals" host="localhost">
<installedrmicomponent>true</installedrmicomponent>
<rmiport>1099</rmiport>
<rmicontext>RMIComponentContext</rmicontext>
</ns:Server>
</ns:Servers>{code}
(i) *Information*: To aims of keeping the webconsole.xml configuration file +valide+, you can use the associated XML schema
webconsole.xsd located in the same location.
h1. Remote component configuration
h3. RMI configuration through Webconsole interface
In the same form where you create or modify one server configuration, you can set
a configuration for RMI component that allow to establish a remote communication
between Petals Webconsole and Petals ESB.
RMI component must be declared into the webconsole.xml configuration file and
started in you Petals ESB node, where it is declared.
!modify-server-properties.png|thumbnail!
In this form part dedicated of the RMI component properties declaration two fields can be filled:
* The RMI context, it must be the *same* as that the petals-se-rmi component
deployed on the Petals node.
* The RMI port, it must be *consistent with* that declared in the petal-se-rmi.
If you have declared one RMI component in the configuration file but if isn't available on the
Petals node, you can thank to the form's checkbox (petals-se-rmi component enabled)
disabled it in the Webconsole while keeping it declared:
!Disabled-checkbox-form.png|thumbnail!
h3. RMI configuration through webconsole.xml
You can also perform the previous features for the RMI component directly in the webconsole.xml under,
as the same way that server declaration. Just modify the XML according to the webconsole.xsd scheme.
{code:lang=xml|title=Webconsole.xml RMI declaration}<Server ... >
<installedrmicomponent>false</installedrmicomponent>
<rmiport>1099</rmiport>
<rmicontext>RMIComponentContext</rmicontext>
</Server>{code}
{code:lang=xml|title=Webconsole.xsd RMI template} <xs:complexType name="_Server">
<xs:sequence>
<xs:element name="installedrmicomponent" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
<xs:element name="rmiport" type="xs:int" maxOccurs="1" minOccurs="0"/>
<xs:element name="rmicontext" type="xs:string" maxOccurs="1" minOccurs="0"/>
</xs:sequence>
...
</xs:complexType name="_Server">{code}
(i) *Information*: To aims of keeping the webconsole.xml configuration file +valide+, you can use the associated XML schema
webconsole.xsd located in the same location.
(!) *Caution*: the following message may means that a RMI component isn't _declared_ in the webconsole.xml, or _disabled_
in this configuration file:
!automatic-remote-component-installation1.png|thumbnail!
(!) *Caution*: the last following message may means that a RMI component isn't _deployed_, isn't started on the Petals ESB node where
it is declared or simply the associated port _don't match_:
!automatic-remote-component-installation2.png|thumbnail!
{info:title=Automatic remote componet installation}_ _ _ _
If you click on "*Install remote component*", the Petals Webconsole automatically install a remote component packaged with the current version.
The current version is packaged with the petals-se-rmi for remoting communication to Petals ESB. _ _
_The Webconsole_ transfers you to the installation interface and automatically select *URL* installation and provide the url which match
the packaged petals-se-rmi that will be installed, when you confirm the installation on the current Petals ESB node.
{info}
!automatic-remote-component-installation3.png|thumbnail!
The previous screen displays the automatic remote component installation (you have just to submit the installation form).
h1. General properties file presentation
Petals Webconsole contain a file where several general properties can be configured, some of these
are really useful and need a correct configuration and not hang lightly.
h3. The general.properties
Several properties affect the Webconsole configuration instead other affect displayed error messages.
h4. Repository setting
{code:title=Repository property}# --- Cache control of the RestResourcesServlet ---#
cache-control=private, max-age=60{code}
This property allows to define cache parameters like control, age ... *for uploaded files* by the Petals webconsole
Parameter examples:
* 'private' meaning for cache-control header value:
\* Can be cached only by single-user caches, such
\* as in a browser; must not be cached by multiuser
\* caches in proxy servers.
* 'max-age=60' meaning for cache control header value:
\* Serve from the cache only until the
\* specified number of seconds since the original
\* request has elapsed.
You can found more informations at [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html]