for use with JBoss Enterprise Web Platform 5
Edition 5.1.1
Legal Notice
Abstract
- Preface
- 1. Introduction
- 2. Migrating to Enterprise Application Platform 5
- 2.1. What's New in Enterprise Application Platform 5
- 2.1.1. JBoss Application Server 5.1.0.GA
- 2.1.2. Enterprise Java Beans (EJB) 3.0
- 2.1.3. Java Enterprise Edition 5 Compliance
- 2.1.4. Seam 2.2.0.GA
- 2.1.5. RESTEasy 1.1.GA
- 2.1.6. Enhanced Enterprise GUI Installer
- 2.1.7. Enterprise Application Platform Admin Console
- 2.1.8. JBoss Transactions includes Java Transaction Service
- 2.1.9. Distribution with Red Hat Signed JARs
- 2.2. What's Different in Enterprise Application Server 5
- 2.3. Admin Console
- 2.4. Applications
- 3. New Installation
- 4. Installation Options
- 5. ZIP Installation from the Red Hat Customer Portal
- 6. RPM Installation via Red Hat Network
- 7. Installation using the Graphical Installer
- 8. Install Native Components
- 9. Post Installation Configuration
- 10. Test your Installation
- 11. Uninstall JBoss Enterprise Web Platform
- A. Disabling Authentication
- B. The Red Hat Customer Portal
- C. Installing a Java Development Kit on Red Hat Enterprise Linux
- D. Installing the Sun JDK on Microsoft Windows
- E. Installing Apache Ant
- F. Revision History
1. Document Conventions
1.1. Typographic Conventions
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F2 to switch to a virtual terminal.
mono-spaced bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose → → from the main menu bar to launch Mouse Preferences. In the Buttons tab, select the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose → → from the main menu bar. Next, choose → from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose → from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typessh username@domain.nameat a shell prompt. If the remote machine isexample.comand your username on that machine is john, typessh john@example.com.Themount -o remount file-systemcommand remounts the named file system. For example, to remount the/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -q packagecommand. It will return a result as follows:package-version-release.
Publican is a DocBook publishing system.
1.2. Pull-quote Conventions
mono-spaced roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
mono-spaced roman but add syntax highlighting as follows:
static int kvm_vm_ioctl_deassign_device(struct kvm *kvm,
struct kvm_assigned_pci_dev *assigned_dev)
{
int r = 0;
struct kvm_assigned_dev_kernel *match;
mutex_lock(&kvm->lock);
match = kvm_find_assigned_dev(&kvm->arch.assigned_dev_head,
assigned_dev->assigned_dev_id);
if (!match) {
printk(KERN_INFO "%s: device hasn't been assigned before, "
"so cannot be deassigned\n", __func__);
r = -EINVAL;
goto out;
}
kvm_deassign_device(kvm, match);
kvm_free_assigned_device(kvm, match);
out:
mutex_unlock(&kvm->lock);
return r;
}1.3. Notes and Warnings
Note
Important
Warning
2. Getting Help and Giving Feedback
2.1. Do You Need Help?
- search or browse through a knowledgebase of technical support articles about Red Hat products.
- submit a support case to Red Hat Global Support Services (GSS).
- access other product documentation.
2.2. We Need Feedback!
Chapter 1. Introduction
1.1. Feedback
1.2. Other Manuals
Chapter 2. Migrating to Enterprise Application Platform 5
- 2.1. What's New in Enterprise Application Platform 5
- 2.1.1. JBoss Application Server 5.1.0.GA
- 2.1.2. Enterprise Java Beans (EJB) 3.0
- 2.1.3. Java Enterprise Edition 5 Compliance
- 2.1.4. Seam 2.2.0.GA
- 2.1.5. RESTEasy 1.1.GA
- 2.1.6. Enhanced Enterprise GUI Installer
- 2.1.7. Enterprise Application Platform Admin Console
- 2.1.8. JBoss Transactions includes Java Transaction Service
- 2.1.9. Distribution with Red Hat Signed JARs
- 2.2. What's Different in Enterprise Application Server 5
- 2.3. Admin Console
- 2.4. Applications
2.1. What's New in Enterprise Application Platform 5
2.1.1. JBoss Application Server 5.1.0.GA
2.1.1.1. ProfileService-based Deployment Configuration
deploy directory by the deployment scanner service. Enterprise Application Platform 5 uses more active profiles, which may depend on other sub-profiles.
${jboss.server.name}. This profile has three sub-profiles:
- bootstrap — representing
conf/jboss-service.xml - deployers — the
deployers/directory - applications — a hot-deployment profile for the
deploy/and additional user directories
application profile, provide hot-deployment checks and allow remote distribution of deployed applications via the DeploymentManager. Other profiles can provide a farming service to distribute deployments over a cluster. The ProfileService also provides the ManagementView for ManagedDeployments/ManagedObjects used by the Enterprise Application Admin Console (admin-console).
2.1.2. Enterprise Java Beans (EJB) 3.0
2.1.3. Java Enterprise Edition 5 Compliance
2.1.4. Seam 2.2.0.GA
2.1.5. RESTEasy 1.1.GA
2.1.6. Enhanced Enterprise GUI Installer
2.1.7. Enterprise Application Platform Admin Console
2.1.8. JBoss Transactions includes Java Transaction Service
2.1.9. Distribution with Red Hat Signed JARs
2.2. What's Different in Enterprise Application Server 5
2.2.1. Differences in the Distribution Layout
jboss-as directory is summarized below.
/bin— contains start scripts andrun.jar/client— contains client JARs.Note
Previously, JBoss client libraries were bundled injbossall-client.jar. Rather than including them,jbossall-client.jarnow references them through a Classpath manifest entry. This enables granular updating of libraries without requiring replacement of all libraries. It requires that you have thejbossall-client.jar, which now acts as a map or index, as well as the actualclient/*.jarlibraries./common/lib— contains shared libraries common to various configurations have been moved to this new shared location. This eliminates the need for multiple copies of the same library in the distribution.The location of the common library directory is controlled with the following properties:jboss.common.base.url— the default value is${jboss.home.url}/commonjboss.common.lib.url— the default value is${jboss.common.base.url}/lib
You can set these properties inrun.confunderJAVA_OPTSwith the-Dflag:JAVA_OPTS="[...] -Djboss.common.base.url=$URL1 -Djboss.common.lib.url=$URL2"
The common library directory is shared by all configuration types except for theminimalconfiguration. The common library is referenced at the beginning of every configuration'sconf/jboss-service.xml<classpath codebase="${jboss.server.lib.url}" archives="*"/>Thelibrarydirectory of the individual directory remains in place, although in some cases (as in$JBOSS_HOME/server/default/lib/) it is an empty directory./docs— contains schemas, document type declarations, examples and licenses. Most deployment descriptors now use XML Schema Definitions (XSDs). One exception isjboss-app, which usesjboss-app_5_0.dtd. JBoss Web usesjboss-web_5_1.xsd. For Enterprise JavaBeans 3.0 deployments,jboss_5_1.xsdis the recommended schema. Enterprise JavaBeans 2.0 deployments must usejboss_x_x.dtd./lib— contains the core bootstrap JARs. These have been changed slightly to accommodate the Microcontainer and the division ofjboss-common./server— contains directories for configuring the server:$PROFILE— contains the configuration details of a particular server profile/confbootstrap.xml— a new kernel bootstrap configuration that refers to other configuration files containing the beans to set up each individual subsystem.bindingservice.beans/META-INFbindings-jboss-beans.xml— contains required port bindings.
jboss-bindingservice.jar
/bootstrapvfs.xml— initializes the virtual file systemclassloader.xmlaop.xmljmx.xml— legacy JMX support.deployers.xmlprofile-repository.xml— the ProfileService enabled deployment repository.
jax-ws-catalog.xml— an Oasis Catalog-driven Schema/DTD namespace configuration file.jbossts-properties.xml— contains new JBossTS properties.jboss-service.xml— contains legacy static managed beans to retain compatibility.jndi.properties— contains JNDI configuration properties.log4j.xml— contains log4j configuration information.login-config.xml— contains JAAS login configuration information./props— contains default JAAS login properties files.standardjbosscmp-jdbc.xml— contains CMP2 configuration information.standardjboss.xml— contains Enterprise JavaBean 2.0 configuration information./xmdesc— contains legacy XML managed bean descriptors.
/deployjca-jboss-beans.xmlhdscanner-jboss-beans.xml— contains the hot-deployment scanner.legacy-invokers-service.xmlprofileservice-jboss-beans.xmlremoting-jboss-beans.xmltransaction-jboss-beans.xmlvfs-jboss-beans.xml
/deployers— contains new VDF deployers./bsh-deployer— contains the beanshell deployer.ejb3.deployer— contains Enterprise JavaBean 3.0 deployers.jboss-aop-jboss5.deployer— contains the aspect deployer.jboss-jca.deployer— contains the JCA deployers.jbossweb.deployer— contains the WAR deployers.jbossws.deployer— contains the web service deployers.seam.deployer— contains the Seam deployer.clustering-deployers-jboss-beans.xmldependency-deployers-jboss-beans.xmldirectory-deployer-jboss-beans.xmlear-deployer-jboss-beans.xmlejb-deployer-jboss-beans.xmlhibernate-deployer-jboss-beans.xmllogbridge-boss-beans.xmljsr77-deployers-jboss-beans.xml— contains JSR-77 (J2EE Management) support.metadata-deployer-jboss-beans.xml— contains the metadata handlers.messaging-definitions-jboss-beans.xml— contains data required to map JMS destinations to managed objects.security-deployer-jboss-beans.xml— contains the security deployers.xnio.deployerjboss-threads.deployer
/lib— contains static library JARs. Some JARs that were previously located in this directory have been moved into the top-levelcommon/libdirectory.
2.2.2. Standard and Web Configuration
standard and web.
standard configuration is certified for Java EE 5 compliance. This configuration enables both call-by-value and deployment isolation by default. Support for RMI-IIOP (Remote Method Invocation over the Internet Inter-Orb Protocol) and Java UDDI (Universal Description, Discovery and Integration), as in the all configuration type, is also enabled.
web configuration is lightweight. It was created around JBoss Web and provides the services required for web application deployment and only a subset of Java EE technologies. This profile does not include JBoss Transaction JTS or XTS, Enterprise Java Bean 1.x or 2.x capabilities, JBoss Messaging, JCA, or JBoss IIOP.
2.2.3. Differences in Application Server Configuration Files
2.2.3.1. General
- A reminder that the RPM and ZIP distributions of the Enterprise Application Platform are shipped with authentication enabled for the JMX Console, Web Console, JMX Invoker, Admin Console, HTTP Invoker and Profile Service. No user accounts are active by default to assist in preventing default user and password-based attacks.
shutdown.shnow accepts a JNDI URL, as follows:shutdown.sh -s http://localhost:8080/invoker/JNDIFactory -S
Where-sdefines the server name to perform an operation on;-Sspecifies the shutdown operation.- If a user omits the
-coption when starting an instance of JBoss Application Server in Enterprise Application Platform 4.x, theproductionconfiguration was started by default. In JBoss Enterprise Web Platform 5,defaultconfiguration is used when a user omits the-coption. bin/run.confnow uses a Java heap size of 1303 MB. This is consistent across all configurations.- Document Type and Schema Declarations have been updated.
- The
productionserver profile provided with Enterprise Application Platform 5 restricts the classes served on port 8083. If Remote Method Invocation (RMI) is being used, you may need to make this port available to clients. This option can be set inproduction/conf/jboss-service.xml:<!-- Should non-EJB .class files be downloadable --> <attribute name="DownloadServerClasses">false</attribute>
- The cluster-safe UUID generator can now be used from
server/production/deploy/uuid-key-generator.sar/META-INF/jboss-service.xml. - The delay period for
server/production/deploy/hdscanner-jboss-beans.xmlto rescan for deployment changes has been increased to 60 seconds from the previous 5 second delay period.<!-- Frequency in milliseconds to rescan the URLs for changes--> <property name="scanPeriod">60000</property>
2.2.3.2. J2EE Connector Architecture
jboss-ra.xmlcan now be used to override the properties specified in*-ra.xml.Thejboss-ra.xmlfile should be in theMETA-INFdirectory of the resource adapter whose properties you wish to override, alongside the*-ra.xmlfile.Specify a corresponding<ra-config-property>in thejboss-ra.xmlfile for each property you wish to override. An example follows:Example 2.1. Representative excerpt from resource adapter *-ra.xml file
<config-property> <config-property-name>StringRAR</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>StringFromRARProperties</config-property-value> </config-property>
Example 2.2. Representative excerpt from a corresponding jboss-ra.xml file
<ra-config-property> <ra-config-property-name>StringRAR</ra-config-property-name> <ra-config-property-type>java.lang.String</ra-config-property-type> <ra-config-property-value>XMLOVERRIDE</ra-config-property-value> </ra-config-property>
The complete source for a working example can be viewed in the test case for this feature at https://anonsvn.jboss.org/repos/jbossas/trunk/testsuite/src/resources/jcaprops/xmloverride/META-INF/.- Support has been added for defining dependencies in J2EE Connector Architecture (JCA) adapters.
server/production/deploy/jca-jboss-beans.xmldisables debug monitoring of JCA and database connections:<!-- Whether to track unclosed connections and close them --> <property name="debug">false</property>
This disables the application server's debug support. Disabling this means that the origin of obtained database connections and connection leaks cannot be tracked. Unclosed managed database connections are still returned to the connection pool, regardless of this attribute's value.
2.2.3.3. Web
- For JavaServer Pages-based pages, the default setting for
DeleteWorkDirOnContextDestroyisfalse. Set this totrueto enable a faster, simpler page recompilation check, or if you are using JSP settings that require recompilation. emptySessionPath="true"no longer sets the cookie path/by default. Instead, the cookie path is set via the<SessionCookie path="/" />in theContextelement. Session cookies are now scoped to the context by default.emptySessionPathno longer affects whether Session IDs are recycled. This is now handled by theorg.apache.catalina.connector.Request.SESSION_ID_CHECKsystem property. If set totrue, the Servlet container verifies that a Session ID does not yet exist in a particular context before creating a session with that ID. You can set this property in thejboss-as/bin/run.conffile using the-Dswitch.
2.2.3.4. Clustering
- Clustering configurations have been moved to a new
/deploy/clusterdirectory.cluster |-- deploy-hasingleton-jboss-beans.xml |-- farm-deployment-jboss-beans.xml |-- ha-legacy-jboss-beans.xml |-- hajndi-jboss-beans.xml |-- hapartition-jboss-beans.xml |-- jboss-cache-manager.sar | `-- META-INF | |-- jboss-cache-configs.xml | `-- jboss-cache-manager-jboss-beans.xml |-- jbossweb-cluster.aop |-- jgroups-channelfactory.sar | `-- META-INF | |-- jgroups-channelfactory-jboss-beans.xml | `-- jgroups-channelfactory-stacks.xml `-- timestamps-jboss-beans.xml
- A separate cache is now used for Clustered Single Sign-On (SSO).
- UseJK, snapshot mode and snapshot interval can now be configured on a per-application basis. The default value for UseJK depends upon whether the
jvmRouteis set. - The default setting for session replication is now
totalreplication instead ofbuddyreplication. loopbackis now set totruefor all JGroups User Datagram Protocol stacks.- The
jboss.jgroups.udp.mcast_portproperty is now used to configure the multicast port. The-moption to therun.shorrun.batscript now setsjboss.jgroups.udp.mcast_portinstead ofjgroups.udp.mcast_port.jgroups.udp.mcast_portis checked internally by JGroups, and is used to override any XML-based configuration. If this parameter is set, two channels with non-shared transports cannot use different ports. Thejboss.jgroups.udp.mcast_portproperty substitutes system properties in the default UDP channel configurations.
2.2.3.5. Transactions
conf/jboss-service.xml to deploy/transaction-service.xml.
2.2.3.6. Logging
- The default
conf/jboss-log4j.xmlconfiguration now includes the thread name forlog/server.logentries. - The new
jboss.server.log.thresholdsystem property can be used to control thelog/server.logthreshold. The default value isINFO. server.logis appended, rather than truncated, after a server is restarted.- The following changes apply only to
server/production/conf/jboss-log4j.xml:- the console logger has been commented out by default.
- the async logger is enabled by default.
- a
cluster.logfile has been added to store cluster output.
2.2.3.7. Security
deploy/security directory:
security/ |-- security-jboss-beans.xml `-- security-policies-jboss-beans.xml
2.2.3.8. Enterprise JavaBeans
- Enterprise JavaBean configuration information is now located in
deployers/ejb3.deployer/META-INF/ejb3-deployers-jboss-beans.xml. - Java Persistence API configuration information is now located in
deployers/ejb3.deployer/META-INF/jpa-deployers-jboss-beans.xml.
2.3. Admin Console
admin-console) provides the following administrative features:
- configuration information about the system on which the Enterprise Application Platform is running.
- configuration information about the Service Binding Manager.
- deploy, undeploy and update Enterprise Applications, including:
- Java EE Enterprise Applications (EARs)
- Web Applications (WARs)
- Resource Adapters (RARs)
- Enterprise JavaBean 2 and 3 (JARs)
- persistent configuration changes for the following resources:
- data sources
- connection factories
- JMS queues and topics (based on JBoss Messaging)
- Control Operations:
- execute scripts to perform tasks against a running instance of the application server
- stop, start, and restart applications
- view resource statistics
- view resource metric information
admin-console provided with JBoss Enterprise Web Platform retains the JMX and web consoles. admin-console supports the production, all, web and default configurations out of the box. It has also been tested with standard server profile, but is not included in standard by default. To use admin-console in a standard profile, copy the admin-console.war from one of the supported server profiles.
Note
minimal configuration provided with the distribution. Custom configurations based on this configuration should not be used with the Admin Console, either.
admin-console to perform administrative tasks for your application server. To use the admin-console, navigate to http://${hostname}:8080/admin-console.
2.4. Applications
application.xml file in Enterprise Archives (EARs). Additionally, a default library directory (lib) in the root directory of an EAR makes the JARs available to all components packaged within the EAR. If an application.xml file is included, the library-directory element can be used to specify the location of the lib directory.
.beans or .deployer suffix. MCBeans archives package a POJO deployment in a JAR file with a META-INF/jboss-beans.xml descriptor. This format is common in Enterprise Application Platform deployers.
deployers/ear-deployer-jboss-beans.xml file, specifically:
<!-- uncomment to disable xml validation <property name="useValidation">false</property --> <!-- in case xml validation is disabled, it's also better to turn off schema validation <property name="useSchemaValidation">false</property -->
deploy/ejb-deployer.xml to deployers/ejb-deployer-jboss-beans.xml.
</ignore-dependency> element to the ejb-ref or ejb-local-ref definitions in the jboss-client.xml deployment descriptor. This informs the deployer to deploy the archive without resolving the referenced dependencies.
2.4.1. Classloading
ClassLoader is fully backwards compatible, with one exception that does not affect common use ( http://www.jboss.org/community/docs/DOC-12840 ). All classloading configurations from JBoss AS 4.x will still work with the new implementation, and most default settings retain the behavior of the previous version.
ClassLoader shares many design and implementation details with the original UnifiedClassLoader, but makes the following improvements:
- the classloader no longer depends upon JMX, so it can be used in any environment as a standalone.
- it is much easier to implement your own classloader policy.
- increased control over which classloaders your classloader delegates to.
- increased control over which classes are visible to other classloaders.
- hierarchical repositories have been replaced by domains, and can now extend beyond a single level.
Note
useJBossWebClassLoader="true" is not used in JBoss Enterprise Web Platform 5. All WAR classloaders in Enterprise Application Platform 5 are JBoss ClassLoader s, so the WarDeployer no longer handles the configuration details for web applications.
- Remove the
WarClassLoaderDeployer - The
WarClassLoaderDeployerautomatically implements the defined classloading rules for WARs. Each WAR is assigned a scoped classloading domain. Its classes are not visible to other applications or to any parent EAR, and where possible the WAR's classes are called first. To remove this behavior and make WAR classloading behave like other deployers, comment out theWarClassLoaderDeployerindeployers/jbossweb.deploy/META-INF/war-deployers-jboss-beans.xml. - Define classloading rules explicitly for the WAR
- Add a
WEB-INF/jboss-classloading.xmlwith the following content to your WAR.<?xml version="1.0" encoding="UTF-8"?> <classloading xmlns="urn:jboss:classloading:1.0" name="mywar.war" domain="DefaultDomain" export-all="NON_EMPTY" import-all="true"> </classloading>
This lets you define how the WAR's classloader is constructed. In this case, the WAR's classloader has been placed in theDefaultDomain, which is shared with all other applications that do not define their own domain.import-allis enabled, which means the classloader will look at all other classes exported by other applications.export-allis set to expose all classes in our application to other classes.
2.4.2. EAR Scoping
isolated property in deployers/ear-deployer-jboss-beans.xml, as follows:
<!-- A flag indicating if ear deployments should have their own scoped class loader to isolate theirclasses from other deployments. --> <property name="isolated">false</property>
Chapter 3. New Installation
3.1. Pre-Requisites
3.1.1. Hardware, Operating System, and JVM Requirements
Table 3.1. Minimum Hardware Requirements
| Component | Requirement |
|---|---|
| CPU | Intel Pentium 1 GHz or faster for simple applications |
| Hard disk space | 1.5 GB |
| System RAM | 1.5 GB |
3.1.2. Configuring Your Java Environment
Chapter 4. Installation Options
4.1. Web Services Stack
- JBoss Web Services Native
- JBoss Web Services Native is the Java EE 5-compliant JBoss implementation of web services standards. It is the only web services stack for versions of JBoss Enterprise Web Platform prior to 5.1.0, and is the default web services stack in JBoss Enterprise Web Platform 5.1.0.
- JBoss Web Services CXF
- JBoss Web Services CXF provides most of the features available in Apache CXF (including WS-Security, WS-Policy, WS-Addressing, WS-ReliableMessaging, basic WS-Trust, MTOM), plus common JBoss Web Services stack features like endpoint metrics, record management and endpoint address rewrite. JBoss Enterprise Web Platform 5.1.0 introduces JBoss Web Services CXF stack as an optional Web Services stack.
4.2. PicketLink Federation
4.3. Installation Methods
- ZIP download
- The ZIP installation method is the easiest and quickest if you are familiar with JBoss technologies, or if you are looking for a light-weight method for testing or development. This method requires some post-installation configuration. For ZIP installation instructions refer to Chapter 5, ZIP Installation from the Red Hat Customer Portal.
- RPM installation
- RPM installation is suitable for production deployment on Red Hat Enterprise Linux systems. RPM installation leverages the benefits of RPM for updating, system management, and integration with administration tools. This method requires some post-installation configuration. For RPM installation instructions refer to Chapter 6, RPM Installation via Red Hat Network.
- Graphical installer
- The graphical installer simplifies the installation and configuration process. In addition to installing the base files, the installer offers automation of optional component installation, and basic out-of-the-box security configuration. For graphical installer instructions refer to Chapter 7, Installation using the Graphical Installer.
Chapter 5. ZIP Installation from the Red Hat Customer Portal
Procedure 5.1. Installation via ZIP file
Download software
Refer to Appendix B, The Red Hat Customer Portal for file download instructions.Choose theApplication Platform <release> Binarydownload. If you want to use WS CXF as the Web Services Stack for the Platform, download thejboss-ep-ws-cxf-5.1.0-installer.zip. file.- Unzip
jboss-ewp-<release>.zipto extract the archive contents into the location of your choice.Result:This creates thejboss-ewp-<release>directory, with an installation of JBoss Enterprise Web Platform using JBoss WS Native as the Web Services Stack. Optional: Use JBoss WS CXF as the Web Service stack
You need Apache Ant installed and configured on your machine to perform this task.- Extract
jboss-ep-ws-cxf-5.1.0.GA-installer.zipand move thejbossws-cxf-installerinto thejboss-as-webdirectory of the Enterprise Platform. - At the command line go to the directory
jboss-as-web/jbossws-cxf-installerand run the commandant.Result:An installer script replaces WS Native with WS CXF.
Optional: Install Native Components
Refer to Chapter 8, Install Native Components for Native Component installation instructions.Perform post-installation configuration
Refer to Chapter 9, Post Installation Configuration for post-installation configuration instructions.
5.1. HornetQ
Procedure 5.2. Install HornetQ
- Download the HornetQ ZIP (
jboss-eap-hornetq-5.1.0.GA-installer.zip) from the Customer Support Portal. - Extract the files from
jboss-eap-hornetq-5.1.0.GA-installer.zipinto your Enterprise Application Platform installation. - From the command line, run the HornetQ switching script (
sh jboss-as/extras/hornetq/switch.sh)./switch.sh
Chapter 6. RPM Installation via Red Hat Network
6.1. Red Hat Network
6.2. Install on Red Hat Enterprise Linux 4
Procedure 6.1. Install on Red Hat Enterprise Linux 4
Subscribe the system to the correct channel in the Red Hat Network.
For instructions to subscribe a system to a channel refer to: "How do I subscribe a system to a sub-channel or a child channel using Red Hat Network (RHN)?" in the Red Hat Knowledgebase.Red Hat Enterprise Linux 4 channel names
- 32-bit ES
- jb-ewp-5-i386-es-4-rpm
- 32-bit AS
- jb-ewp-5-i386-as-4-rpm
- 64-bit ES
- jb-ewp-5-x86_64-es-4-rpm
- 64-bit AS
- jb-ewp-5-x86_64-as-4-rpm
Install JBoss Enterprise Web Platform
Run the following commands, replacing WS_CHOICE with one ofjbossas-web-ws-nativeorjbossas-ws-cxf-ewp:up2date WS_CHOICE jbossas-web up2date jboss-seam2 resteasy rh-ewp-docs jboss-eap5-native jbossas-web-tp-licenses
Optional: Install Native Components
Refer to Chapter 8, Install Native Components for Native Component installation instructions.Perform post-installation configuration
Refer to Chapter 9, Post Installation Configuration for post-installation configuration instructions.
6.3. Install on Red Hat Enterprise Linux 5
Procedure 6.2. Install on Red Hat Enterprise Linux 5
Subscribe the system to the correct channel in the Red Hat Network.
For instructions to subscribe a system to a channel refer to: "How do I subscribe a system to a sub-channel or a child channel using Red Hat Network (RHN)?" in the Red Hat Knowledgebase.Red Hat Enterprise Linux 5 channel names
- 32-bit
- jb-ewp-5-i386-server-5-rpm
- 64-bit
- jb-ewp-5-x86_64-server-5-rpm
Install JBoss Enterprise Web Platform
Available options are:Run these commands with the chosen values for CURRENT_REPO, and WS_CHOICE.- CURRENT_REPO: for
32-bit, userhel-i386-server-6; for64-bt, userhel-x86_64-server-6 - WS_CHOICE:
jbossas-web-ws-nativeorjbossas-web-ws-cxf
yum remove classpathx-jaf yum upgrade --disablerepo=CURRENT_REPO yum install WS_CHOICE jbossas-web yum install jboss-seam2 resteasy rh-ewp-docs jboss-eap5-native jbossas-web-tp-licenses
Optional: Install Native Components
Refer to Chapter 8, Install Native Components for Native Component installation instructions.Perform post-installation configuration
Refer to Chapter 9, Post Installation Configuration for post-installation configuration instructions.
6.4. Install on Red Hat Enterprise Linux 6
Procedure 6.3. Install on Red Hat Enterprise Linux 6
Subscribe the system to the correct channel in the Red Hat Network.
For instructions to subscribe a system to a channel refer to: "How do I subscribe a system to a sub-channel or a child channel using Red Hat Network (RHN)?" in the Red Hat Knowledgebase.Red Hat Enterprise Linux 6 channel names
- 32-bit
- jb-ewp-5-i386-server-6-rpm
- 64-bit
- jb-ewp-5-x86_64-server-6-rpm
Install JBoss Enterprise Web Platform
Available options are:Run these commands with the chosen values for CURRENT_REPO, and WS_CHOICE.- CURRENT_REPO: for
32-bit, userhel-i386-server-6; for64-bt, userhel-x86_64-server-6 - WS_CHOICE:
jbossas-web-ws-nativeorjbossas-web-ws-cxf
yum remove classpathx-jaf yum upgrade --disablerepo=CURRENT_REPO yum install WS_CHOICE jbossas-web yum install jboss-seam2 resteasy rh-ewp-docs jboss-eap5-native jbossas-web-tp-licenses
Optional: Install Native Components
Refer to Chapter 8, Install Native Components for Native Component installation instructions.Perform post-installation configuration
Refer to Chapter 9, Post Installation Configuration for post-installation configuration instructions.
Chapter 7. Installation using the Graphical Installer
Procedure 7.1. Installation via the Graphical Installer
Download software
Refer to Appendix B, The Red Hat Customer Portal for file download instructions.To install JBoss Enterprise Web Platform via the Graphical Installer, choose theEnterprise Web Platform <release> Installerdownload.Run the installer
Execute the following command in the directory that contains the downloaded installer JAR:java -jar jboss-ewp-installer-<release>.jar
On a Linux system, this must be executed asroot. Under Windows, execute it from a command prompt with elevated privileges.Language
Choose the language for the installation instructions.License Agreement
Read the License Agreement carefully. You must accept the terms of the agreement to proceed with the installation. If you agree to the terms of the agreement, select the "I accept the terms of this license agreement" option.Installation Path
Select the destination directory for JBoss Enterprise Web Platform. Type a complete path or browse for a destination directory. If the directory you enter does not exist, the installer creates the target directory in the specified path. If the directory exists already, the installer will overwrite the contents of the directory. In either case the installer prompts you to confirm the action.The default installation path in Linux is:/usr/local/EnterprisePlatform-5.1.0The default installation path in Windows Server is:C:\Program Files\EnterprisePlatform-5.1.0Web Services
Select the Web Services stack you wish to install. The two choices areWSNativeandWSCXF. Only one stack can be selected. Changing the Web Services stack after installation requires reinstalling.Refer to Chapter 4, Installation Options for a description of the alternatives.Select Packs
There is one optional component for this release: the PicketLink Federation Tech Preview.To install the PicketLink Federation Tech Preview:- Click on eap-core
- Click the arrow to the left of eap-core to expand the options.
- Click the picketlink-federation checkbox.
JMX Security
The installer creates a new JAAS security domain with an active user.Optional: secure consoles and invokers using this security domain.- Supply a password for the admin user in the new JAAS security domain.
- Optional: change the username for the JAAS security domain admin user.
- Optional: change the name of the JAAS security domain.
- Optional: secure the JMX and Web consoles, and http and jmx invokers using the new JAAS security domain. The default is to secure all consoles and invokers.
ResultThe JAAS security domain is created and used to secure the Admin console and Tomcat console. The JAAS security domain is also used to secure any consoles and invokers specified in this step.Release Notes
Updated release notes are available at http://docs.redhat.com.Confirm Selections
Review the installation selections, then click Next to begin writing files to disk.Set up Shortcuts
Create desktop and start menu shortcuts on this screen. If you are running the installer as the administrator (Windows) or root user (Linux), you have the option to create desktop and start menu shortcuts for all users; otherwise you are able to create shortcuts for the currently logged in user only.Optional: Install Native Components
Refer to Chapter 8, Install Native Components for Native Component installation instructions.Perform post-installation configuration
Refer to Chapter 9, Post Installation Configuration for post-installation configuration instructions.
Chapter 8. Install Native Components
Native Components Manifest
- JBoss Native consists of the Apache Portable Runtime (APR), OpenSSL and Tomcat Native (TC-native);
Apache Portable Runtime (APR)provides superior scalability, performance, and improved integration with native server technologies. APR is a highly portable library that is at the heart of Apache HTTP Server 2.x. It enables access to advanced IO functionality (for example: sendfile, epoll and OpenSSL), Operating System level functionality (for example: random number generation and system status), and native process handling (shared memory, NT pipes and Unix sockets).OpenSSLimplements the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols and includes a basic cryptographic library.Tomcat Native (TC-Native)is a Java Native Interface (JNI) that provides much of Tomcat's core functionality in native code rather than Java. This allows for an overall increase in the speed of a server.
mod_jkconnects the Tomcat JSP container to the Apache webserver, providing load-balancing.mod_clusteris an httpd-based load balancer. In contrast to mod_jk, mod_cluster creates a feedback loop between the proxy server and the worker nodes, enabling intelligent load distribution and routing within a load-balancing cluster.ISAPIis a connector for the Microsoft IIS web server.NSAPIis a connector for Sun Java System Web Server, also known as Oracle iPlanet Web Server.- HornetQ LibAIO is used as a bridge between HornetQ and Linux LibAIO. It is used in HornetQ's high performance journal, when configured.
8.1. Red Hat Enterprise Linux-specific notes
apr and apr-util.
apr and apr-util packages installed, a message similar to the following will appear in logs:
WARN [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/ewpuser/jboss-ewp-5.1/native/lib.
8.2. Solaris-specific notes
jboss-ep-native can be installed on the same machine. The libraries for each are separated by the directories lib and lib64 respectively and each is automatically loaded depending on the JVM version that is used.
jboss-ep-native, use unzip -qo. The -o option ensures that one version of the package does not replace another during the installation.
8.3. Native Components Installation
Procedure 8.1. Install Native Components from RPM
Subscribe to the JBOSS EAP5 RHN channel
- Using a web browser, navigate to http://access.redhat.com and log in with your credentials.
- View the list of all systems, and find the system on which you have installed the Enterprise Platform. Click to view its subscriptions.
- Add the JBoss Application Platform or JBoss EWP channel appropriate to your version of Red Hat Enterprise Linux.
Install the
mod_cluster-jbossaspackageLog into the application server's host system as the root user. issue the commandyum install mod_cluster-jbossasAlternative: Install the
mod_jk-ap20packageOnly follow this step if you need to use mod_jk instead of mod_cluster. Log into the application server's host system as the root user. s the root user, issue the commandyum install mod_jk-ap20.
Procedure 8.2. Install Native Components from ZIP Archives
Download software
Refer to Appendix B, The Red Hat Customer Portal for file download instructions.To install Native Components, choose the Native Components download that corresponds to your operating system and the architecture of your Java Virtual Machine.Unzip components
Extract thenativedirectory from the zip file into thejboss-ewp-5.xdirectory, so that the native directory is at the same directory level as thejboss-as-webdirectory.Result:The Native Components are installed.Verify installation
During server startup the server will report the presence of the Native libraries:12:12:29,826 INFO [ServerInfo] VM arguments: -Dprogram.name=run.sh -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.protocol.handler.pkgs=org.jboss.handlers.stub -Djava.net.preferIPv4Stack=true -Djava.library.path=/home/ewpuser/jboss-ewp-5.1/native/lib64 -Djava.endorsed.dirs=/home/ewpuser/jboss-ewp-5.1/jboss-as/lib/endorsedThe option-Djava.library.path=/home/ewpuser/jboss-ewp-5.1/native/lib64shows that the server is detecting and loading the Native libraries.
Chapter 9. Post Installation Configuration
9.1. Post Installation Security Configuration
9.1.1. Security Configuration: JMX Console, Admin Console, HttpInvoker
Procedure 9.1. Create jmx-console, admin-console, and http invoker user account
Create a user in the default JAAS security domain
- Edit the file
jboss-as-web/server/$PROFILE/conf/props/jmx-console-users.properties. - Create a username = password pair.
Default admin user configuration
The commentedadmin=adminusername and password pair is an example of the username/password definition syntax. Do not use this for your user account.
Grant permissions to user
- Edit the file
jboss-as-web/server/$PROFILE/conf/props/jmx-console-roles.properties. - Create an entry for the user of the form:
username=JBossAdmin,HttpInvoker
- JBossAdmin
- Grant the user permission to access the JMX Console and Admin Console.
- HttpInvoker
- Grant the user permission to access the httpinvoker
Important
9.1.2. Securing the HTTPInvoker
Procedure 9.2. Secure the HTTP Invoker
Defining security constraints
Theserver/$PROFILE/deploy/http-invoker.sar/invoker.war/WEB-INF/web.xmlorserver/$PROFILE/deploy/httpha-invoker.sar/invoker.war/WEB-INF/web.xmlfile (depending on your server profile) must define a JNDIFactory, EJBInvokerServlet, and JMXInvokerServlet in the security realm. This means that thesecurity-constraintelement should be similar to: <security-constraint> <web-resource-collection> <web-resource-name>HttpInvokers</web-resource-name> <description>An example security config that only allows users with the role HttpInvoker to access the HTTP invoker servlets </description> <url-pattern>/restricted/*</url-pattern> <url-pattern>/JNDIFactory/*</url-pattern> <url-pattern>/EJBInvokerServlet/*</url-pattern> <url-pattern>/JMXInvokerServlet/*</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <role-name>HttpInvoker</role-name> </auth-constraint> </security-constraint>
Define an associated security domain
Add the following to fragment toweb.xml:<jboss-web> <security-domain>java:/jaas/jmx-console</security-domain> </jboss-web>
Binding the jmx-invoker to localhost
Note
Binding the jmx-invoker to localhost is highly recommended for security, but makes it unavailable for use remotely.Editserver/$PROFILE/conf/jboss-service.xmlsuch that the ServerAddress of the RMI/JRMP invoker islocalhost, as shown in the following code snippet:<-- RMI/JRMP invoker --> <mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker" name="jboss:service=invoker,type=jrmp"> <attribute name="RMIObjectPort">4444</attribute> <attribute name="ServerAddress">localhost</attribute> ....
- Add the following lines to the
serversection ofserver/$PROFILE/deploy/jmx-invoker-service.xml:<-- A pooled invoker bound to localhost --> <mbean code="org.jboss.invocation.pooled.server.PooledInvoker" name="jboss:service=invoker,type=pooled,host=localhost"> <attribute name="NumAcceptThreads">1</attribute> <attribute name="MaxPoolSize">300</attribute> <attribute name="ClientMaxPoolSize">300</attribute> <attribute name="SocketTimeout">60000</attribute> <attribute name="ServerBindAddress">localhost</attribute> <attribute name="ServerBindPort">4443</attribute> <attribute name="ClientConnectAddress">localhost</attribute> <attribute name="ClientConnectPort">0</attribute> <attribute name="ClientRetryCount">1</attribute> <attribute name="EnableTcpNoDelay">false</attribute> <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
- In the
<mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"section, change<depends optional-attribute-name="InvokerName">to:<depends optional-attribute-name="InvokerName"> jboss:service=invoker,type=pooled,host=localhost </depends>
9.1.3. Security Configuration: Web Console
Procedure 9.3. Create web console user account
Create a user in the web-console JAAS security domain
- Edit the file
web-console-users.propertiesinjboss-as-web/server/$PROFILE/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/. - Create a username = password pair.
Default admin user configuration
The commentedadmin=adminusername and password is an example of the username/password definition syntax. Do not use this for your user account.
Grant permissions to user
- Edit the file
web-console-roles.propertiesinjboss-as/server/$PROFILE/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/. - Create an entry for the user of the form:
username=JBossAdmin,HttpInvoker
- JBossAdmin
- Grant the user permission to access the Web-Console
- HttpInvoker
- Grant the user permission to access the HTTP Invoker
Important
9.1.4. Security Configuration: JBoss Messaging
suckerPassword in the configuration file:
Procedure 9.4. Set suckerPassword for JBoss Messaging:
- Edit the file
jboss-as-web/server/$PROFILE/deploy/messaging/messaging-jboss-beans.xml. - Change the
suckerPasswordvalue.
9.2. Default Database
Do not use the Hypersonic database in production
- no transaction isolation
- thread and socket leaks (
connection.close()does not tidy up resources) - low persistence quality (logs commonly become corrupted after a failure, preventing automatic recovery)
- database corruption
- instability under load (database processes cease when dealing with too much data)
- not viable in clustered environments
9.3. Memory Settings for the Enterprise Web Platform
-Xms1303m: Initial heap size, set in megabytes-Xmx1303m: Maximum heap size, set in megabytes
- Allocate the same values for initial and maximum heap sizes
- Use values smaller than the host's allocatable memory
- Be aware of other services and applications running on the host, and allow for their usage of memory
Procedure 9.5. Changing Memory Settings for the Enterprise Web Platform on Linux
- Navigate to
JBOSS_DIST/jboss-as/bin. - Using a text editor, open
run.conf. - The memory options are set on this line:
JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true"
Edit the line to include the new initial and maxium heap sizes for the JVM:JAVA_OPTS="-XmsINITIAL_HEAP_SIZEm -XmxMAX_HEAP_SIZEm -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true"
- The new settings will take effect when the Enterprise Web Platform is shut down and restarted.
Procedure 9.6. Changing Memory Settings for the Enterprise Web Platform on Windows
- Navigate to
JBOSS_DIST\jboss-as\bin. - Using a text editor, open
run.conf.bat. - The memory options are set on this line:
set "JAVA_OPTS=-Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true"Edit the line to include the new initial and maxium heap sizes for the JVM:set "JAVA_OPTS=-XmsINITIAL_HEAP_SIZEm -XmxMAX_HEAP_SIZEm -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true"
- The new settings will take effect when the Enterprise Web Platform is shut down and restarted.
9.4. Run the Application Server as a Service
Procedure 9.7. Running as a Service on Microsoft Windows Server
Open a command prompt with elevated privileges.
Navigate toC:\Windows\System32and right-click oncmd.exe. Select .Change to the JBoss Enterprise Web Platform directory where the service installation script is located.
cdJBOSS_DIST\native\sbinOptional: Edit
services.batto pass parameters to the application server at start-up.Under:cmdStart, alter the following line:call "%SVCPATH%\run.bat" < .r.lock >> run.log 2>&1To run the 'default' profile binding to the 'localhost' address, change to the following:call "%SVCPATH%\run.bat" -c default -b localhost < .r.lock >> run.log 2>&1For a full list of parameters torun.batsee the Getting Started Guide.Run the service installation script.
service.bat installCheck that the service is installed.
Under the Windows services list you will find this listed by the short name JBEAP5SVC and the long name JBoss EAP 5.Uninstalling a Service
To uninstall the service, issue the following command from a command prompt with elevated privileges:sc delete "JBEAP5SVC".
Chapter 10. Test your Installation
Procedure 10.1. Test the Platform installation
Start the Server
There are several options to start the server:Option 1 - Shortcut
Start the server using a desktop or start menu shortcut created by the Graphical Installer.Option 2 - run.sh / run.bat
Start the server using therun.sh(Linux) orrun.bat(Windows) script.Execute the following command in a terminal in thejboss-as/bindirectory:- Linux
./run.sh
- Windows
run.bat
Result:The server starts using thedefaultprofile.Test the Server homepage
Openhttp://127.0.0.1:8080in a web browser on the server machine.Result:The JBoss Enterprise Web Platform server homepage is displayed.
Chapter 11. Uninstall JBoss Enterprise Web Platform
Uninstaller/uninstaller.jar in the JBoss Enterprise Web Platform top-level directory.
jboss-as-web directory.
server/$PROFILE/deploy/jmx-console.war/WEB-INF/web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAdaptor</web-resource-name>
<description>An example security config that only allows users with the role JBossAdmin to access the HTML JMX console web application
</description>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>server/$PROFILE/deploy/management/console-mgr.sar/web-console.war/WEB-INF/web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAdaptor</web-resource-name>
<description>An example security config that only allows users with the role JBossAdmin to access the HTML JMX console web application
</description>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>JNDIFactory, EJBInvokerServlet, and JMXInvokerServlet need to be removed from the security realm in the file:
server/$PROFILE/deploy/httpha-invoker.sar/invoker.war/WEB-INF/web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>HttpInvokers</web-resource-name>
<description>An example security config that only allows users with the role HttpInvoker to access the HTTP invoker servlets
</description>
<url-pattern>/restricted/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>HttpInvoker</role-name>
</auth-constraint>
</security-constraint>server/$PROFILE/deploy/jmx-invoker-service.xml
org.jboss.jmx.connector.invoker.InvokerAdaptorService. In that section comment out the line that relates to authenticated users:
AuthenticationInterceptor module:
<descriptors>
<interceptors>
<!--Uncomment to require authenticated users-->
<interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
securityDomain="java:/jaas/jmx-console"/>
<!--Interceptor that deals with non-serializable results-->
<interceptor code="org.jboss.jmx.connector.invoker.SerializableInterceptor"
policyClass="StripModelMBeanInfoPolicy"/>
</interceptors>
</descriptors>ProfileService, edit the following file and comment out the contents of the serverProxyInterceptors list:
deploy/profileservice-jboss-beans.xml
<bean class="org.jboss.aspects.security.AuthenticationInterceptor">
<constructor>
<parameter>
<value-factory bean="JNDIBasedSecurityManagement" method="getAuthenticationManager" parameter="jmx-console"/>
</parameter>
</constructor>
</bean>
<bean class="org.jboss.aspects.security.RoleBasedAuthorizationInterceptor">
<constructor>
<parameter>
<value-factory bean="JNDIBasedSecurityManagement" method="getAuthenticationManager" parameter="jmx-console"/>
</parameter>
<parameter>
<value-factory bean="JNDIBasedSecurityManagement" method="getAuthenticationManager" parameter="jmx-console"/>
</parameter>
</constructor>
</bean>deploy/jbossws.sar/jbossws-management.war/WEB-INF/web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>ContextServlet</web-resource-name>
<description>An example security config that only allows users with the role 'friend' to access the JBossWS console web application
</description>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>friend</role-name>
</auth-constraint>
</security-constraint>Prerequisites
Procedure B.1. Downloading Files
- Open http://access.redhat.com in a web browser.
- Click the option in the menu across the top of the page.
- Click on in the list under JBoss Enterprise Middleware.
- Enter your login information.Result:You are taken to the Software Downloads page.
- Select
Enterprise Web Platformfrom either the drop-down box or the menu on the left.Result:You are presented with a list of file downloads.
- See Chapter 7, Installation using the Graphical Installer for Graphical Installer instructions.
- See Chapter 5, ZIP Installation from the Red Hat Customer Portal for ZIP installation instructions.
- See Chapter 8, Install Native Components for Native Component installation instructions.
Note
C.1. OpenJDK on Red Hat Enterprise Linux 5
Important
root.
Procedure C.1. Installing OpenJDK on Red Hat Enterprise Linux 5
Subscribe to the
base channel.The OpenJDK is available in Red Hat Enterprise Linux'sbase channel.Install the package.
To install OpenJDK, issue the following command:yum install java-1.6.0-openjdk-devel
Set OpenJDK as the system's default Java Development Kit.
To ensure that the correct JDK is set as the system default, run thealternativescommand as described in Section C.4, “ Setting the default JDK with the/usr/sbin/alternativesUtility ”
C.2. Sun Java Development Kit on Red Hat Enterprise Linux 5
Important
root.
Procedure C.2. Installing the Sun Microsystems JDK on Red Hat Enterprise Linux 5
Subscribe to
Supplementary Serverchannel.The Sun Microsystems Java Development Kit is available in theSupplementary Serverchannel.Install the package.
To install the Sun Microsystems Java Development Kit package, input this command:yum install java-1.6.0-sun-devel
Set OpenJDK as the system's default Java Development Kit
To ensure that the intended JDK is set as the system default, run thealternativescommand as described in Section C.4, “ Setting the default JDK with the/usr/sbin/alternativesUtility ”
C.3. Sun JDK on Red Hat Enterprise Linux AS/ES 4
Important
root.
Procedure C.3. Installing the Sun Microsystems JDK on Red Hat Enterprise Linux AS/ES 4
Subscribe to the
Extraschannel.The Sun Microsystems Java Development Kit is available in theRed Hat Extraschannel. Ensure that the machine is subscribed to this channel in order to install this package.Install using the
up2datecommand.Run this command to install the package:up2date java-1.6.0-sun-devel
Set OpenJDK to the system's default Java Development Kit.
To ensure that the intended JDK is set as the system default, run thealternativescommand as described in Section C.4, “ Setting the default JDK with the/usr/sbin/alternativesUtility ”
C.4. Setting the default JDK with the /usr/sbin/alternatives Utility
/usr/sbin/alternatives is a tool for managing different software packages that provide the same functionality. Red Hat Enterprise Linux uses /usr/sbin/alternatives to ensure that only one Java Development Kit is set as the system default at one time.
Important
/usr/sbin/alternatives may contain conflicting configurations. Refer to Procedure C.4, “ Using /usr/sbin/alternatives to Set the Default JDK ” for syntax of the /usr/sbin/alternatives command.
Procedure C.4. Using /usr/sbin/alternatives to Set the Default JDK
Become the root user.
/usr/sbin/alternativesneeds to be run with root privileges. Use thesucommand or other mechanism to gain these privileges.Set
java.Input this command:/usr/sbin/alternatives --config javaNext, follow the on-screen directions to ensure that the correct version ofjavais selected. Table C.1, “javaalternative commands” shows the relevant command settings for each of the different JDKs.Table C.1.
javaalternative commandsJDK alternative command OpenJDK 1.6 /usr/lib/jvm/jre-1.6.0-openjdk/bin/javaSun Microsystems JDK 1.6 /usr/lib/jvm/jre-1.6.0-sun/bin/javaSet
javac.Enter this command:/usr/sbin/alternatives --config javacFollow the on-screen directions to ensure that the correct version ofjavacis selected. Table C.2, “javacalternative commands” shows the appropriate command settings for the different JDKs.Table C.2.
javacalternative commandsJDK alternative command OpenJDK 1.6 /usr/lib/jvm/java-1.6.0-openjdk/bin/javacSun Microsystems JDK 1.6 /usr/lib/jvm/java-1.6.0-sun/bin/javacExtra Step: Set
java_sdk_1.6.0.The Sun Microsystems JDK 1.6 requires an additional command be run:/usr/sbin/alternatives --config java_sdk_1.6.0Follow the on-screen directions to ensure that the correctjava_sdkis selected. It is/usr/lib/jvm/java-1.6.0-sun.
Procedure D.1. Installing and Configuring the 32-bit Sun JDK on Microsoft Windows
Download the Software
Download the Sun Java 2 Development Kit from http://www.oracle.com/technetwork/java/javase/downloads/index.html.- Create an environmental variable called
JAVA_HOMEthat points to directory in which the JDK will be installed, such asC:\Program Files\Java\jdk1.6.0_16\. To do this, click on the , open the , (if necessary, switch to ), open the applet, select the Advanced Tab, and click on the Environment Variables button. - Add the JDK's
bindirectory to the path PATH.To do this, open the from the , (if necessary, switch to ), then edit the PATH environment variable found in System -> Advanced -> Environment Variables -> System Variables. Append a semicolon and%JAVA_HOME%\binto the end of the PATH value. - So that Java can be run from the command line, add the
jre\bindirectory to the path so that it looks similar toC:\Program Files\Java\jdk1.5.0_11\jre\bin.
Note
Note
Apache Ant, visit the project's website at http://ant.apache.org.
Procedure E.1. Installing Apache Ant on Red Hat Enterprise Linux
- Download and install
Apache Anton Red Hat Enterprise Linux Repository by issuing this command:[localhost]$ sudo yum install ant
Procedure E.2. Installing Apache Ant on Other Operating Systems
Download and Extract
Download theApache Antbinary release from http://ant.apache.org/bindownload.cgi.Once it is downloaded, extract it in a preferred installation location, such asc:\Program Files\Apache\Ant\or/opt/apache-ant-1.8/.Add the ANT_HOME Environmental Variable
Next, create create an environmental variable calledANT_HOME. This variable has to contain the path created in the previous step.- Do this on Red Hat Enterprise Linux by adding the following line to the
~/.bash_profilefile, substituting the path with that created above.export ANT_HOME=/opt/apache-ant-1.7.1 export ANT_HOME=/opt/apache-ant-1.7.1
- On Microsoft Windows, do this by click on the and opening the then selecting System -> Advanced -> Environment Variables. Create a new variable, calling it
ANT_HOMEand configure it to point to theantdirectory.
Include
binin thePATHNext, append theantinstallation'sbindirectory thePATHenvironmental variable.- On Unix/Linux systems, one does this simply by adding the following line to the
~/.bash_profilefile after the one which sets theANT_HOMEvariable:export PATH=$PATH:$ANT_HOME/bin export PATH=$PATH:$ANT_HOME/bin
- On Microsoft Windows, do this task by opening the then selecting System -> Advanced -> Environment Variables->System Variables -> Path. Create a new variable, calling it
ANT_HOME. Next, add a semicolon and%ANT_HOME%\binto the end of the path value.
ant -version from within a command line shell. The output should look similar to this:
[localhost]$ ant -version Apache Ant version 1.8 compiled on June 27 2008
| Revision History | |||
|---|---|---|---|
| Revision 5.1.1-105 | March 5, 2015 | ||
| |||
| Revision 5.1.1-104.400 | 2013-10-31 | ||
| |||
| Revision 5.1.1-104 | 2012-07-18 | ||
| |||
| Revision 5.1.1-100 | Mon Jul 18 2011 | ||
| |||
| Revision 5.1.0-105 | Wed Sep 29 2010 | , | |
| |||