<document>
  <header>
    <product>resin</product>
    <title>Resin 3.0.13 Release Notes</title>
  </header>

<body>

<summary objsummary='localtoc'/>

<section title="HessianProxyFactory.setReadTimeout(long)">

<p>Added a setReadTimeout to the HessianProxyFactory.  This capability
is only supported by JDK 1.5.</p>

</section>

<section title="active-wait-time">

<p>An active-wait-time parameter is now available for the web-app.  This
specifies the time Resin will wait during a restart for the new web-app.
If the time expires, Resin will return a 503.  The default is 15s.</p>

</section>

<section title="forward target in rewrite">

<example title="web.xml">
&lt;web-app>
  &lt;rewrite-dispatch>
    &lt;forward regexp='^/foo' target='/bar'/>
  &lt;/rewrite-dispatch>
&lt;/web-app>
</example>

</section>

<section title="Manual web-app restart cookbook">

<p>A <a href="jmx|cookbook/restart.xtp">Restart cookbook</a> is available for
creating an admin servlet to stop, start, or update a web-app.</p>

</section>

<section title="round-robin policy">

<p>HmuxLoadBalanceServlet can now use a strict round-robin balance strategy.</p>

<example>
&lt;servlet servlet-class="com.caucho.servlets.HmuxLoadBalanceServlet">
  &lt;init>
    &lt;cluster>a&lt;/cluster>
    &lt;strategy>load-balance&lt;/strategy>
  &lt;/init>
&lt;/servlet>
</example>

</section>

<section title="clustered configuration and deployment">

<p>Resin Pro can now be configured and deployed based on a master
configuration server.  Configuration files and .wars placed on the
master will be propagated to the cluster.</p>

<p>The clustered files use the special "config:" scheme in the configuration
file, e.g. in archive-directory.  The scheme is read-only and backed
up on a client-side database to provide reliability when the master
is taken down.</p>

<example title="master configuration">
&lt;servlet-mapping url-pattern="/config">
  &lt;servlet-class>com.caucho.vfs.remote.RemoteFilesystemServlet&lt;/servlet-class>
  &lt;init>
    &lt;root>${resin.rootDir}&lt;/root>
  &lt;/init>
&lt;/servlet-mapping>
</example>

<p>On a config client, "config:" reads from the master.
On the master or a non-clustered server, "config:" acts as a normal
relative path.</p>

 <example title="webapps configuration">
&lt;web-app-deploy>
  &lt;archive-directory>config:webapps&lt;/archive-directory>
  &lt;expand-directory>webapps&lt;/expand-directory>
&lt;web-app-deploy>
</example>

<p>The config clients are started with the "-config-server"
command-line argument, pointing to the configuration server.</p>

<example>
unix> bin/httpd.sh -config-server http://config:8081/config \
                   -conf config:conf/resin.conf \
                   -server a
</example>

</section>

<section title="resin:type">

<p>resin:type is now allowed in more places in the configuration file,
in particular in the openssl &lt;password> element.</p>

</section>

<section title="Connection configuration">

<p>The &lt;database> configuration can now configure the created
connections with &lt;connection>.  Currently the &lt;transaction-isolation>,
&lt;read-only>, and &lt;catalog> are configurable.</p>

<example>
&lt;database jndi-name="jdbc/example">
  &lt;driver>
    ...
  &lt;/driver>
  &lt;connection>
    &lt;transaction-isolation>read-committed&lt;/transaction-isolation>
  &lt;/connection>
&lt;/database>
</example>

</section>

<section title="Load balancer cluster client control">

<p>Individual load balancer clients can now be disabled through JMX.</p>

<p>Given the following cluster</p>

<example>
&lt;cluster-definition id="a">
  &lt;srun host="localhost" port="6802"/>
&lt;/cluster-definition>
</example>

<p>The name of a cluster client is:
</p>
<example>
resin:Server=Default,
      type=ClusterClient,
      Cluster=a,
      host=localhost,
      port=6802
</example>

<p>The MBean interface is in com.caucho.server.cluster.mbean.ClusterClientMBean.  The appropriate methods are <code>enable()</code>,
<code>disable()</code>, and <code>isActive()</code>.</p>


</section>

<section title="503 failover with HmuxLoadBalanceServlet">

<p>The 503 failover has been improved with HmuxLoadBalanceServlet.</p>

<p>In addition, the web-app busy/inactive reporting has changed.  Now,
you can disable a single backend web-app
and the load balancer will failover the web-app requests
to the following server.</p>

</section>

<section title="driver-type">

<p>The &lt;database> driver now has optional driver-type.</p>

<example>
&lt;database>
  &lt;jndi-name>test&lt;/jndi-name>
  &lt;driver type="test.jdbc.TestDriver"
          driver-type="ConnectionPoolDataSource">
    &lt;url>jdbc:test:foo&lt;/url>
  &lt;/driver>
 &lt;/database>
</example>

</section>

<section title="server.rootDir">

<p>Added server.rootDir to the tree-loader for shared jars.</p>

</section>

<section title="access-log path-format">

<p>The &lt;access-log> can have a path-format attribute which
specifies the path by date.  Unlike the archive-path, the log is
created the formatted name directly.</p>

</section>

<section title="archive-path">

<p>Added archive-path to web-app.</p>

</section>

<section title="host-alias-regexp">

<p>Added regexp support for host aliases.</p>

</section>

<section title="IoC configuration for JMS">

<p>Resin now has two IoC resources for JMS, a listener and a
message sender.</p>

<p>ListenerResource provides the capabilities of EJB message beans, without
the complexity of EJB.</p>

<example>
&lt;resource type="com.caucho.jms.resource.ListenerResource">
  &lt;init>
     &lt;connection-factory>\${jmsFactory}&lt;/connection-factory>

     &lt;destination>\${queue}&lt;/destination>

     &lt;listener type="example.MyListener"/>
 &lt;/init>
&lt;/resource>
</example>

</section>

<section title="var for resource/bean">

<p>Resin's IoC configuration tag, &lt;resource> can now accept
a "var" attribute, storing the resource in EL for later use.</p>

<example>
&lt;resource var="child"
           type="example.MyChild">
&lt;/resource>

&lt;resource jndi-name="bean"
           type="example.MyBean">
  &lt;init>
    &lt;child>\${child}&lt;/child>
  &lt;/init>
&lt;/resource>
</example>

</section>

<section title="resin EL variables">

<p>New configuration EL variables:</p>

<table>
<tr><td>$\{resin.home}<td>Same as $\{resinHome}
<tr><td>$\{resin.rootDir}<td>Same as $\{serverRoot}
<tr><td>$\{resin.resinProfessional}<td>Same as $\{isResinProfessional}
</table>

</section>

<section title="Refactoring">

<p>The deploy and config code has been refactored.  Neither change should
be user-visible.</p>

</section>

<section title="Special Thanks">

<p>Thanks to Mircea Crisan for tracking down the JdbcMessage
init order issue with Postgres.</p>

<p>Thanks to John Didion for finding the missing
Hessian deserializer cache.</p>

<p>Thanks to Andy Nahapetian for finding and fixing
the Hessian reference serialization bug.</p>

</section>

</body>
</document>
