The RHQ Server is a customized JBossAS server. It contains an EJB3/JPA container (utilizing Hibernate as the ORM persistence engine) as well as JBossWS as the Web Services container.
In jbossas/server/default/deploy you will find the rhq.ear that contains the RHQ Server application. rhq.ear contains the business layer (a set of EJB stateless session and message driven beans) and a core UI web application (rhq-portal.war). There is also a built-in installer (rhq-installer.war) used to initially prepare an out-of-box RHQ Server. Lastly, there is an embedded RHQ agent found in the rhq-agent.sar deployment artifact within the ear. It is within this sar that the embedded agent lives; but you must enabled the embedded agent for it to start.
In jbossas/server/default/conf you will find the keystore file used by the web application when accepting https/SSL connections from clients and the jboss-log4j.xml logging configuration file.
There are additional deployment artifacts in the deployment directory:
rhq-ds.xml - defines the database used by the RHQ Server
jms/ - folder containing the service descriptors used by the JMS/EJB MDB infrastructure
rhq.ear/alert-email-template.txt - template email used by the alert subsystem when sending email alerts
Of all of these artifacts, users should normally never alter these except for the rhq.ear/alert-email-template.txt (in the case they want to customize the emails emitted by RHQ), the conf/*.keystore file (if they want to supply their own SSL certificate) and jboss-log4j.xml if they want to alter the verbosity of logging message that the RHQ Server emits.