![]() |
Deploying the Asynchronous HTTP Server
The Asynchronous HTTP Server is a separate application running in an application server communicating with the ICEfaces applications on the back-end and the clients on the front-end. A default deployment WAR file, async-http-server.war, for the Asynchronous HTTP Server is available in the /bin directory. This deployment provides the following defaults:
- port used: 51315
- non-blocking mode (using Java's New I/O)
- persistent connection mode (using persistent HTTP connections)
- compression mode (using HTTP compression)
- execute queue size: 30 (the number of threads used to handle incoming requests)
Should you need to change these defaults, the configuration can be overridden by modifying the web.xml file and repackaging the WAR. The relevant attributes are shown below.
<servlet> <servlet-name>Asynchronous Servlet</servlet-name> ... <init-param> <param-name>com.icesoft.faces.async.server.port</param-name> <param-value>51315</param-value><!-- integer --> </init-param> <init-param> <param-name>com.icesoft.faces.async.server.blocking</param-name> <param-value>false</param-value><!-- boolean --> </init-param> <init-param> <param-name>com.icesoft.faces.async.server.persistent</param-name> <param-value>true</param-value><!-- boolean --> </init-param> <init-param> <param-name>com.icesoft.faces.async.server.compression</param-name> <param-value>true</param-value><!-- boolean --> </init-param> <init-param> <param-name> com.icesoft.faces.async.server.executeQueueSize </param-name> <param-value>30</param-value><!-- integer --> </init-param> </servlet>Note: It is critical that the port number matches the port number in the Apache HTTP Server's configuration file, which is discussed in Routing Requests.
Depending on the application server of choice the async-http-server.war needs to be configured to use the proper JMS Provider with the correct JMS settings. By default it uses the jboss.properties file which contains the configuration for a non-clustered JBoss deployment. The Asynchronous HTTP Server comes with a number of pre-configured property files described in the following table:
Table 2-1 ICEfaces EPS Configuration Property FilesTo specify the JMS Configuration properties, modify the following context parameter in the web.xml and repackage the async-http-server.war:
<context-param> <param-name>com.icesoft.util.net.messaging.properties</param-name> <!-- properties file of choice --> <param-value>weblogic.properties</param-value> </context-param>If the supplied properties files do not suffice, a custom properties file can be created and added to the classpath. A JMS Provider Configuration properties file can contain the following properties:
java.naming.factory.initial java.naming.factory.url.pkgs java.naming.provider.url com.icesoft.util.net.messaging.jms.topicConnectionFactoryNam com.icesoft.util.net.messaging.jms.topicNamePrefixRefer to the documentation for your application server for these property values. The following example shows the property values for JBoss:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=localhost:1099 com.icesoft.util.net.messaging.jms.topicConnectionFactoryName=ConnectionFactory com.icesoft.util.net.messaging.jms.topicNamePrefix=topic/
|
Copyright 2005-2007. ICEsoft Technologies, Inc. http://www.icesoft.com |