Configuration and build
From JPPF 6.0 Documentation
|
Main Page > J2EE Connector > Configuration and build |
1 Requirement
For building, configuring and customizing the JPPF Resource Adapter, your will need the latest version of the JPPF source code distribution. It can be found on the JPPF download page. The name of the file is JPPF-x.y-j2ee-connector.zip
2 Build structure
The J2EE connector has the following folder structure:
Folder | Description |
root folder | The root folder, contains the build.xml Ant build script |
appserver | contains common and application server-specific configurations for the JPPF resource adapter and the demo application |
build | this folder contains all jars, .ear and .rar files resulting from the build |
classes | contains the compiled code of the JPPF resource adapter |
config | contains application server-specific resources for the deployment of the resource adapter |
docroot | contains resources for the build of the demo application on some application servers |
src | contains the source code for the resource adapter and demo application. |
3 Building the JPPF resource adapter
To build the resource adapter:
- Open a command prompt
- Go to the JPPF-x.y-j2ee-connector folder
- Enter “ant build”
- The resulting .rar and .ear files are generated in the “build” subfolder.
4 Configuring the resource adapter and demo application
The configuration files and deployment descriptors are all contained in the appserver folder. The detailed content of this folder is as follows:
Folder | Description |
appserver | root folder, contains:
<!-- JPPF Client Configuration --> <config-property> <description> Defines how the JPPF configuration is to be located. This property is defined in the format "type|path", where "type" can be one of: - "classpath": "path" is a path to a properties file in one of the jars of the .rar file example: "classpath|resources/config/jppf.properties" - "url": "path" is a url that points to a properties file example: "url|file:///home/me/jppf/jppf.properties" (it could be a http:// or ftp:// url as well) - "file": "path" is considered a path on the file system example: "file|/home/me/jppf/config/jppf.properties" When no value or an invalid value is specified, "classpath|jppf.properties" is used </description> <config-property-name>ConfigurationSource </config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>classpath|jppf.properties </config-property-value> </config-property>
|
appserver/common | contains files common to all application servers, for the demo enterprise application |
appserver/<server_name> | root of <server_name>-specific configuration and deployment files. Contains a commons-logging.properties file where you can configure which logging framework will be used (i.e. Log4j, JDK logger, etc...) |
appserver/<server_name>/application | contains <server_name>-specific deployment descriptor for the demo application, for example: weblogic-application.xml. |
appserver/<server_name>/docroot | contains a <server_name>-specific JSP for the demo application. The specificity is the JNDI name used to look up the JPPF connection factory. It relates to the corresponding resource-ref defined in the web.xml descriptor. |
appserver/<server_name>/ra | contains a <server_name>-specific deployment descriptor for the resource adapter. It generally contains the definition of the corresponding JCA connection factory. Not all application servers require one. Example: weblogic-ra.xml. |
appserver/<server_name>/WEB-INF | contains the <server_name>-specific deployment descriptors for the demo web application. The specificity is mostly in the resource-ref definition of the JNDI name for the JPPF connection factory. For example: web.xml and jboss-web.xml. |
Main Page > J2EE Connector > Configuration and build |