Slimming JBoss EAP 5.1 and 5.2
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.1.x
- 5.2.0
Issue
- How can I slim services from JBoss EAP 5.1 / 5.2?
- How to remove the EJB components in Red Hat JBoss EAP 5.1.2?
- We are planning to thin Jboss (default version) by removing below files
- hdscanner-jboss-beans.xml
- Quartz scheduling package
- hsqldb-ds.xml
- sqlexception-service.xml
Resolution
-
If you have not yet removed HypersonicSQL, refer to How do I remove Hypersonic SQL database from JBoss EAP?
Note: HypersonicSQL should not be used in a production environment. Please refer to This content is not included.Is Hypersonic (HSQLDB) supported in JBoss production environment ? about this. -
If you do not want your JBoss instances to form a cluster, please refer to How do I disable clustering in JBoss EAP 5's "production" configuration?
-
If you do not need JMS functionality (provided via JBoss Messaging), remove:
-
$JBOSS_HOME/server/$PROFILE/deploy/messaging/ -
$JBOSS_HOME/server/$PROFILE/deploy/jms-ra.rar/ -
$JBOSS_HOME/server/$PROFILE/deployers/messaging-definitions-jboss-beans.xml -
the following
XAResourceRecovery.JBMESSAGING1definition if it exists in$JBOSS_HOME/server/$PROFILE/conf/jbossts-properties.xml:<property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1" value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/DefaultJMSProvider"/>
-
-
If you do not use EJB3, remove:
$JBOSS_HOME/server/$PROFILE/deploy/ejb3-connectors-jboss-beans.xml$JBOSS_HOME/server/$PROFILE/deploy/ejb3-container-jboss-beans.xml$JBOSS_HOME/server/$PROFILE/deploy/ejb3-interceptors-aop.xml$JBOSS_HOME/server/$PROFILE/deploy/ejb3-timerservice-jboss-beans.xml$JBOSS_HOME/server/$PROFILE/deployers/ejb3-deployers-jboss-beans.xml$JBOSS_HOME/server/$PROFILE/deployers/jboss-ejb3-endpoint-deployer.jar$JBOSS_HOME/server/$PROFILE/deployers/jboss-ejb3-metrics-deployer.jar$JBOSS_HOME/server/$PROFILE/deployers/ejb3.deployer/
and add:
<property name="persistenceUnitDependencyResolver"><null/></property>to the
WarDeployerbean block in$JBOSS_HOME/server/$PROFILE/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml. -
If you do not use EJB2, remove:
$JBOSS_HOME/server/$PROFILE/deploy/ejb2-container-jboss-beans.xml- In addition, if you have removed the EJB3 timer service (
deploy/ejb3-timerservice-jboss-beans.xml), you can also remove:$JBOSS_HOME/server/$PROFILE/deploy/ejb2-timer-service.xml
Note: If you remove EJB 2.x/3.x but not remove web services (JBossWS), you need some additional steps. Please also refer to Removing dependence on EJB deployers from JBossWS deployer in JBoss EAP 5.1 for details.
-
If you do not need web services (provided via JBossWS), remove:
$JBOSS_HOME/server/$PROFILE/deploy/jbossws.sar/$JBOSS_HOME/server/$PROFILE/deployers/jbossws.deployer/
-
If you do not need scheduled jobs or timer EJBs, remove:
$JBOSS_HOME/server/$PROFILE/deploy/schedule-manager-service.xml$JBOSS_HOME/server/$PROFILE/deploy/scheduler-service.xml$JBOSS_HOME/server/$PROFILE/deploy/quartz-ra.rar/$JBOSS_HOME/server/$PROFILE/deploy/ejb3-timerservice-jboss-beans.xml$JBOSS_HOME/server/$PROFILE/deploy/ejb2-timer-service.xml
-
If you do not need to use UDDI for web services, remove:
$JBOSS_HOME/server/$PROFILE/deploy/juddi-service.sar/
Note: this directory exists in the "all", "production", or "standard" based profile.
-
If you do not need to use IIOP, remove:
$JBOSS_HOME/server/$PROFILE/deploy/iiop-service.xml
Note: this file exists in the "all", "production", or "standard" based profile.
-
If you do not need to send email, remove:
$JBOSS_HOME/server/$PROFILE/deploy/mail-service.xml$JBOSS_HOME/server/$PROFILE/deploy/mail-ra.rar/
-
If you do not need to use BeanShell scripts, remove:
$JBOSS_HOME/server/$PROFILE/deployers/bsh.deployer/
-
If you do not need to use XNIO, remove:
$JBOSS_HOME/server/$PROFILE/deploy/xnio-provider.jar/$JBOSS_HOME/server/$PROFILE/deployers/xnio.deployer/
-
If you do not need to use Quartz scheduling package, to remove it refer This content is not included.KCS article
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.