Install FAQ

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
(New page: === Where can I put .jar files so that they are available to all of my web applications? === <p>''I have some jar files that are used by all of my web applications. Where can I put them ...)
 
Line 1: Line 1:
 
=== Where can I put .jar files so that they are available to all of my web applications? ===
 
=== Where can I put .jar files so that they are available to all of my web applications? ===
  
<p>''I have some jar files that are used by all of my web applications.  Where
+
<p>''I have some jar files that are used by all of my web applications.  Where can I put them so that I do not have to put them in <code>WEB-INF/lib</code> for every web application that I have?''</p>
can I put them so that I do not have to put them in <code>WEB-INF/lib</code>
+
for every web application that I have?''</p>
+
  
 
<ol>
 
<ol>
Line 23: Line 21:
  
 
<p>Some jars are not classloader-aware (e.g. using static fields improperly).  For those libraries, you will need to put them in <code>$RESIN_HOME/ext-webapp-lib</code> instead.</p>
 
<p>Some jars are not classloader-aware (e.g. using static fields improperly).  For those libraries, you will need to put them in <code>$RESIN_HOME/ext-webapp-lib</code> instead.</p>
 +
 +
=== What happened to bin/resin? ===
 +
 +
<p>''With Resin 2.1 used to run <code>make; make install</code> and then use the binary <code>bin/resin</code> to start Resin, but in Resin 3.0 I can't find the binary.  What happened to it?''</p>
 +
 +
<p>Resin 2.1 used the <code>bin/resin</code> binary to enable two features: JNI
 +
usage (including OpenSSL) and to support <user-name> and <group-name> for switching the effective user id of the process
 +
after attaching to ports under 1024.</p>
 +
 +
<p>
 +
Resin now uses the JNI library from within Java.  You don't need
 +
a compiled binary to get at the JNI code (that was bin/resin in
 +
2.1.x).  So, the java process starts up and then hooks into the
 +
JNI libraries.  Resin uses JNI for:
 +
</p>
 +
 +
<ul>
 +
<li>OpenSSL
 +
</li>
 +
<li>low level system calls, for things like socket connections etc.
 +
  (for performance reasons).</li>
 +
<li>setuid for unix</li>
 +
<li>profiling and heap analysis</li>
 +
</ul>
 +
 +
<p>So Resin can run without the JNI libraries, it just won't be as
 +
fast as Resin.</p>
 +
 +
<p><user-name> and <group-name> support no longer need the resin binary either.</p>

Revision as of 19:27, 3 February 2008

Where can I put .jar files so that they are available to all of my web applications?

I have some jar files that are used by all of my web applications. Where can I put them so that I do not have to put them in WEB-INF/lib for every web application that I have?

  1. Make the directory $RESIN_HOME/ext-lib
  2. Place the jars files that will be available to all of your web applications in $RESIN_HOME/ext-lib, for example $RESIN_HOME/extlib/hogwarts.jar

Any jar file in $RESIN_HOME/ext-lib will be available to all of the web applications.

Resin will also find jars in subdirectories, so you can put your jars in for example $RESIN_HOME/ext-lib/local/hogwarts.jar. If you use the local/ subdirectory, when you upgrade to a new version of Resin you can just copy the local subdirectory over to the new $RESIN_HOME/ext-lib.

Some jars are not classloader-aware (e.g. using static fields improperly). For those libraries, you will need to put them in $RESIN_HOME/ext-webapp-lib instead.

What happened to bin/resin?

With Resin 2.1 used to run make; make install and then use the binary bin/resin to start Resin, but in Resin 3.0 I can't find the binary. What happened to it?

Resin 2.1 used the bin/resin binary to enable two features: JNI usage (including OpenSSL) and to support <user-name> and <group-name> for switching the effective user id of the process after attaching to ports under 1024.

Resin now uses the JNI library from within Java. You don't need a compiled binary to get at the JNI code (that was bin/resin in 2.1.x). So, the java process starts up and then hooks into the JNI libraries. Resin uses JNI for:

  • OpenSSL
  • low level system calls, for things like socket connections etc. (for performance reasons).
  • setuid for unix
  • profiling and heap analysis

So Resin can run without the JNI libraries, it just won't be as fast as Resin.

<user-name> and <group-name> support no longer need the resin binary either.

Personal tools