<?xml version="1.0" encoding="UTF-8"?>
<chapter id="running">
   <title>Running</title>

   <section id="startingthecontainer">
      <title>Starting the container</title>

      <para>The IronJacamar container is started by entering the bin/ directory</para>

     <programlisting>
cd ironjacamar-1.2.0.Final/bin
     </programlisting>

     <para>and executing</para>

     <programlisting>
./run.sh
     </programlisting>

     <para>on a Un*x based system or</para>

     <programlisting>
run.bat
     </programlisting>

     <para>on Windows.</para>

     <para>The command takes an optional -b argument to define the binding address of the naming server</para>

     <programlisting>
./run.sh -b 192.168.0.199
     </programlisting>

     <para>Once the container has started you should see a log entry like</para>

     <programlisting>
13:33:10,999 INFO  [Main] Server started in 941ms
     </programlisting>

     <para>in the console where the command was executed.</para>

     <para>After the container has started you can browse to</para>

     <programlisting>
http://localhost:8080
     </programlisting>

     <para>to view the project documentation and use the administration console.</para>

   </section>

   <section id="stoppingthecontainer">
      <title>Stopping the container</title>

      <para>The IronJacamar container is stopped by pressing the <code>Ctrl-C</code> keys.</para>

      <para>Once the container has stopped you should see a log entry like</para>
      
      <programlisting>
13:35:06,752 INFO  [Main] Server stopped in 29ms
      </programlisting>
      
      <para>in the console where the container was running.</para>

      <para>Alternative the container can be stopped through the command line interface.</para>

   </section>


   <section id="cli">
      <title>Command line interface</title>

      <para>The IronJacamar container can be controlled by a command line interface.</para>

      <para>If you are accessing a remote container you can use the <code>-h</code> option to
        specify the host name.</para>

      <section id="cli_deploy">
        <title>Deploy</title>

        <para>You can deploy a resource adapter archive (.rar) using</para>

        <programlisting>
java -jar fungal-cli.jar deploy &lt;file&gt;
        </programlisting>

        <para>where <code>file</code> specifies the resource adapter archive.</para>

      </section>

      <section id="cli_undeploy">
        <title>Undeploy</title>

        <para>You can undeploy a resource adapter archive (.rar) using</para>

        <programlisting>
java -jar fungal-cli.jar undeploy &lt;file&gt;
        </programlisting>

        <para>where <code>file</code> specifies the resource adapter archive.</para>

      </section>

      <section id="cli_shutdown">
        <title>Shutdown</title>

        <para>You can shutdown the IronJacamar environment by</para>

        <programlisting>
java -jar fungal-cli.jar shutdown
        </programlisting>

      </section>
   </section>

   <section id="running_ant">
      <title>Apache Ant</title>

      <para>The IronJacamar container can be controlled by Apache Ant tasks.</para>

      <section id="running_ant_start">
        <title>Start</title>

        <para>
          The IronJacamar container can be started by the Apache Ant task <code>org.jboss.jca.sjc.ant.Start</code> which takes a 
          <code>home</code> attribute to specify the home directory of the installation.
        </para>
      </section>

      <section id="running_ant_stop">
        <title>Stop</title>

        <para>
          The IronJacamar container can be stopped by the Apache Ant task <code>org.jboss.jca.sjc.ant.Stop</code> which takes a 
          <code>home</code> attribute to specify the home directory of the installation.
        </para>
      </section>

      <section id="running_ant_deploy">
        <title>Deploy</title>

        <para>
          Deployments to the IronJacamar container can be done by the Apache Ant task <code>org.jboss.jca.sjc.ant.Deploy</code> which takes a 
          <code>file</code> attribute to specify the file that should be deployed. The task takes optional <code>host</code> and <code>port</code>
          attributes in order to specify the host and port where the IronJacamar container is located.
        </para>
      </section>

      <section id="running_ant_undeploy">
        <title>Undeploy</title>

        <para>
          Undeploying from the IronJacamar container can be done by the Apache Ant task <code>org.jboss.jca.sjc.ant.Undeploy</code> which takes a 
          <code>file</code> attribute to specify the file that should be undeployed. The task takes optional <code>host</code> and <code>port</code>
          attributes in order to specify the host and port where the IronJacamar container is located.
        </para>
      </section>

      <section id="running_ant_ping">
        <title>Ping</title>

        <para>
          The IronJacamar container can be pinged for availability using the Apache Ant task <code>org.jboss.jca.sjc.ant.Ping</code>.
          The task takes optional <code>host</code> and <code>port</code> attributes in order to specify the host and port where the
          IronJacamar container is located.
        </para>
      </section>

   </section>

   <section id="running_maven">
      <title>Apache Maven</title>

      <para>The IronJacamar container can be controlled by Apache Maven mojos.</para>

      <section id="running_maven_start">
        <title>Start</title>

        <para>
          The IronJacamar container can be started by the Apache Maven mojo <code>org.jboss.jca.sjc.maven.Start</code> which takes a 
          <code>home</code> element to specify the home directory of the installation.
        </para>
      </section>

      <section id="running_maven_stop">
        <title>Stop</title>

        <para>
          The IronJacamar container can be stopped by the Apache Maven mojo <code>org.jboss.jca.sjc.maven.Stop</code> which takes a 
          <code>home</code> element to specify the home directory of the installation.
        </para>
      </section>

      <section id="running_maven_deploy">
        <title>Deploy</title>

        <para>
          Deployments to the IronJacamar container can be done by the Apache Maven mojo <code>org.jboss.jca.sjc.maven.Deploy</code> which takes a 
          <code>file</code> element to specify the file that should be deployed. The mojo takes optional <code>host</code> and <code>port</code>
          elements in order to specify the host and port where the IronJacamar container is located.
        </para>
      </section>

      <section id="running_maven_undeploy">
        <title>Undeploy</title>

        <para>
          Undeploying from the IronJacamar container can be done by the Apache Maven mojo <code>org.jboss.jca.sjc.maven.Undeploy</code> which takes a 
          <code>file</code> element to specify the file that should be undeployed. The mojo takes optional <code>host</code> and <code>port</code>
          elements in order to specify the host and port where the IronJacamar container is located.
        </para>
      </section>

      <section id="running_maven_ping">
        <title>Ping</title>

        <para>
          The IronJacamar container can be pinged for availability using the Apache Maven mojo <code>org.jboss.jca.sjc.maven.Ping</code>.
          The mojo takes optional <code>host</code> and <code>port</code> elements in order to specify the host and port where the
          IronJacamar container is located.
        </para>
      </section>

   </section>



</chapter>
