实现有价值的IT服务
全部博文(709)
分类: Java
2006-08-10 10:52:12
6)Session Configuration
Session Configuration Session configuration occurs in three contexts: The session-config
The attributes belong in the <server> block
|
Deployment
1)
Web-app-deploy The Essentially, it's an automatic directory for For example, in the default resin.conf, if you drop a foo.war in /webapps, it will expand to webapps/foo and be browseable at . It's also possible to create a Web Application without a .war files by creating a directory in the webapps without ... ...
|
2)
Host-deploy The Essentially, it's an automatic directory for For example, in the default resin.conf, if you drop a foo.jar in /hosts, it will expand to hosts/foo and be browseable at . It's also possible to create a without a .jar file by creating a directory in the hosts. ... ...
|
3)
Startup-mode The The default |
4)
Redeploy-mode |
5)
Dependency-check-interval The During development, a |
6)
Dependency
The |
7)
Archive-path
The If the web-app is deployed using <web-app-deploy>, the .war file will be assigned automatically. |
8)Dependency Checking
Dependency checking (Redirected from ) Resin restarts web-apps and when it detects a change in the <web-app> or <host>. The restart behavior is controlled by the <redeploy-mode> tag which defaults to "automatic". Checked Resources Resin checks the following resources to see if the web-app or host should be restarted: Any classes in WEB-INF/classes Any jars in WEB-INF/lib Any additional classes or jars specified in a <> tag Any WEB-INF/resin-web.xml Any WEB-INF/web.xml resin.conf Any other configuration file read by a <resin:import> A source .war file configured by <archive-path> or a <web-app-deploy> or <host-deploy>. Any file added in a <dependency> tag The During development, a Retrieved from "" |
Security Configuration
1)
Authenticator
The directives
XmlAuthenticator
The XmlAuthenticator is a simple authentication scheme where an XML file or a configuration file specifies the users directly. XmlAuthenticator is useful when you have a small number of known users.
|
directive |
description | |
logout-on-session-timeout |
If true, principals should be logged out when a session times out |
true |
password-digest |
Password digest type of form: MD5-base64 |
MD5-base64 |
password-digest-algorithm |
Sets the password digest algorithm |
MD5 |
password-digest-realm |
Sets the realm to use for the digest |
resin |
path |
to an XML file containing the configuration |
|
principal-cache-size |
Size of the principal cache |
4096 |
user |
Inline user configuration in the form "name:password:roles" |
|
com.caucho.server.security.XmlAuthenticator
none
Harry Potter:quidditch:user
...
The JdbcAuthenticator uses a database to store user authentication.
directive |
description | |
cookie-auth-query |
Sets a query for cookie-based authentication | |
cookie-auth-update |
Sets the update SQL for cookie-based authentication | |
cookie-domain |
Sets the domain value for cookie-based authentication | |
cookie-logout |
If true remove cookie on logout | |
cookie-max-age |
Sets the max-age value for cookie-based authentication | |
cookie-version |
Sets the cookie version for cookie-based authentication | |
data-source |
Specifies the configured <database> |
required |
logout-on-session-timeout |
If true, principals should be logged out when a session times out |
true |
password-digest |
Password digest type of form: MD5-base64 |
MD5-base64 |
password-digest-algorithm |
Sets the password digest algorithm |
MD5 |
password-digest-realm |
Sets the realm to use for the digest |
resin |
password-query |
Sets a custom password query |
|
principal-cache-size |
Size of the principal cache |
4096 |
role-query |
Specifies the query to test for a role |
|
use-cookie |
If true, use the resinauth cookie |
|
jdbc:postgresql://localhost/test
harry
com.caucho.server.security.JdbcAuthenticator
java:comp/env/jdbc/test
...
Here is how this needs to be configured for FORM authentication:
jdbc/MyDataSource
...
resin
md5
base64
Main article:
com.sun.security.auth.module.Krb5LoginModule
true
2)
Openssl [] directives
cipher-suite The Windows Specific Information The most recent releases of Resin 3.0.x on Windows (.19+ for sure) are compiled against the more recent branch of OpenSSL, 0.9.8. Older releases, through .14 at least, are compiled against the specific version, 0.9.7c from gnuwin32, that's mentioned in the docs. To set up OpenSSL in the latest releases, get the current 0.9.8 binary distribution from . Unfortunately, you can't just extract the DLL's, so you'll have to install it. The DLL's will go into your Windows system32 directory. There should be three DLL's: · ssleay32.dll · libeay32.dll · libssl32.dll You can grab those once they're extracted by the installer and put them in your resin directory, or anywhere on the path (including leaving them where the installer put them). After that, your newer release of Resin should be able to start with OpenSSL. |
3)
Jsse-ssl directives
|
Clustering and Load Balancing
1)
Cluster
Cluster configuration documentation is at .
|
directive |
description |
default |
id |
unique identifier of the cluster |
"" |
cluster-ref |
use the values from a directive |
|
client-live-time |
how long the load-balancer should keep an idle socket open |
30s |
client-dead-time |
how long the load-balancer should treat a backend as dead |
30s |
client-read-timeout |
timeout of load-balancer reads |
30s |
client-write-timeout |
timeout of load-balancer writes |
|
<srun> |
configures an srun port |
|
directive |
description |
default |
id |
unique identifier of the cluster definition |
"" |
client-live-time |
how long the load-balancer should keep an idle socket open |
30s |
client-dead-time |
how long the load-balancer should treat a backend as dead |
30s |
client-read-timeout |
timeout of load-balancer reads |
30s |
client-write-timeout |
timeout of load-balancer writes |
|
<srun> |
configures an srun port |
|
Clustering and load balancing is configured in a
A cluster with two machines might look like:
...
30s
...
Load balancing has two sets of time outs, one set from the client (front-end) perspective, and one set from the server (back-end) perspective.
The client timeouts are configured directly in the
client-read-timeout |
How long the frontend should wait on a read before timing out |
60s |
client-write-timeout |
How long the frontend should wait on a write before timing out |
60s |
client-live-time |
How long the frontend should keep a socket alive before discarding it |
60s |
client-dead-time |
How long the frontend should treat a backend as dead before retrying |
15s |
60s
The server timeouts specify how long the backend will wait for new data from a frontend before giving up. This timeout should be longer than the client-live-time.
read-timeout |
How long the backend should wait on a read before timing out |
30s |
write-timeout |
How long the backend should wait on a write before timing out |
30s |
...
...
2) Load Balancing Configuration
Load balancing
(Redirected from ) Resin documentation is at Load balancing spreads the load among multiple backend Resin servers in a Cluster. A frontend Resin server proxies requests to the backend servers and sends the results to the clients. We'll use 192.168.0.10 as the frontend machine and 192.168.0.20 through 192.168.0.28 as the backend machines. The frontend server and the backend cluster have different configurations since they perform different roles. The Frontend Server
dispatches requests to the backend servers, generally using sticky sessions acts as a for the backend cluster pools the proxy sockets for efficiency == The Backend Cluster does the actual work: the database querying and form processing manages persistent sessions Frontend Configuration
The frontend needs to configure: The external HTTP and HTTPS ports its listening to The cluster-definition of the backend cluster A LoadBalanceServlet to dispatch requests to the backend frontend.conf
xmlns:resin=""> servlet-class="com.caucho.servlets.LoadBalanceServlet">
Sharing Cluster configuration: cluster.xml and <resin:import>
Many sites will create a separate cluster.xml using resin's resin:import directive to share information between the frontend and backend: cluster.xml
In the frontend.conf, you'll replace the <> content with a <resin:import> frontend.xml
... ...
|
Cache Configuration
Cache configuration
(Redirected from ) See for Resin's proxy caching. Documentation is at The
The sizes use the syntax for the sizes. resin.conf
... ...
A is a page with an or an header. Resin's FileServlet, for example, sets both headers but does not set an tag. In other words, a JSP page or servlet that does not set any headers will not be affected by resin-web.xml
...
|