跟我学JBoss应用服务器下的J2EE应用开发——JBoss应用服务器的配置和管理详解(第2部分)
- 格式:pdf
- 大小:429.58 KB
- 文档页数:13
JBoss7配置指南1. jboss各主要版本特性 (3)1.1. jboss4特性 (3)1.2. jboss5特性 (5)1.3. jboss6特性 (6)1.4. jboss7特性 (7)2. 为什么JBoss AS7 这么快 (8)3. JBoss AS7中的新概念-域 (10)3.1. 域(Domain)的概念及其与群集(Cluster)的区别 (10)3.2. 实验 (11)1.1.1. 准备工作 (11)1.1.2. 配置 (12)3.2.1.1. Master上面的配置 (14)3.2.1.1.1. domain.xml (14)3.2.1.1.2. host.xml (15)3.2.1.2. Slave上面的配置 (16)3.2.1.2.1.domain.xml (16)3.2.1.2.2. host.xml (16)3.3. AS 7.1的安全补充说明 (17)3.4. 部署 (20)3.5. 小结 (25)4. JBoss7配置 (26)4.1. 目标听众 (26)4.1.1. 开始之前 (26)4.1.2. 手册中的示例 (26)4.2. 客户端 (26)4.2.1. web接口 (26)4.2.1.1. HTTP管理接入点 (26)4.2.1.2. 访问管理控制台 (27)4.2.1.3. 对管理控制台进行加密 (27)4.2.2. 命令行接口 (27)4.2.2.1. Native管理接入点 (28)4.2.2.2. 运行命令行管理工具 (28)4.2.2.3. 管理请求 (29)4.2.2.3.1. 管理资源的地址 (30)4.2.2.3.2. 操作类型和操作描述列表 (30)4.2.2.4. 命令行历史信息 (32)4.2.2.5. 批处理 (32)4.2.3. 配置文件 (33)4.3. 核心管理概念 (34)4.3.1. 运行模式 (34)4.3.1.1. 单服务器模式 (34)4.3.1.2. 管理域 (34)4.3.1.2.1. Host(主机) (35)4.3.1.2.2. 主机控制器(HostController) (35)4.3.1.2.3. Domain Controller(域控制器) (36)4.3.1.2.4. Server Group (服务器组) (37)4.3.1.2.5. Server (服务器) (38)4.3.1.3. 决定运行在单独服务器或者管理域上 (38)4.3.2. 通用的配置概念 (39)4.3.2.1. Extensions (扩展) (39)4.3.2.2. Profile和subsystem(子系统) (40)4.3.2.3. Paths( 路径) (40)4.3.2.4. nterfaces (接口) (42)4.3.2.5. socket binding(socket绑定)和socket binding group(socket绑定组) (43)4.3.2.6. System Properties( 系统属性) (43)4.3.3. Management resources( 管理资源) (44)4.3.3.1. Address (地址) (44)4.3.3.2. operations( 操作) (45)4.3.3.3. Attributes( 属性) (47)4.3.3.4. Children(子节点) (49)4.3.3.5. Descriptions(描述) (51)4.3.3.6. 和JMX Beans相比 (53)4.3.3.7. 管理资源树的基本结构(management resource trees) (53)4.3.3.7.1. 单服务器模式(Standalone server) (53)4.3.3.7.2. 管理域模式(managed domain) (54)4.4. 管理任务 (56)4.4.1. 网络接口和端口 (56)4.4.1.1. 网络接口声明 (56)4.4.1.2. Socket Binding Groups (58)4.4.2. 管理接口的安全性 (59)4.4.2.1. 初始化设置 (60)4.4.2.2. 快速配置 (61)4.4.2.3. 详细配置 (63)4.4.2.3.1. 管理接口 (63)4.4.2.3.2. 安全域 (64)4.4.2.3.3. Outbound connections(外部连接) (68)4.4.2.4. 问题 (68)4.4.3. JVM设置 (68)4.4.3.1. 管理域 (69)4.4.3.2. 单独运行服务器 (70)4.4.4. 命令行参数 (70)4.4.4.1. 系统属性 (71)4.4.4.2. 单独运行模式(Standalone) (71)4.4.4.3. 管理域模式(Managed Domain) (72)4.4.4.4. 其他命令行参数 (72)4.4.4.4.1. 单服务器模式(Standalone) (73)4.4.4.4.2. 管理域模式(Managed Domain) (73)4.4.4.4.3. 通用参数(Common parameters) (73)4.4.5. 子系统配置 (74)4.4.5.1. 数据源(Data sources) (74)4.4.5.1.1. JDBC驱动安装 (74)4.4.5.1.2. 数据源定义(Datasource Definitions) (75)4.4.5.1.3. 参考 (78)4.4.5.2. 消息(Messaging) (78)4.4.5.2.1. Connection Factories (78)4.4.5.2.2. Queues and Topics (79)4.4.5.2.3. Dead Letter和Redelivery (80)4.4.5.2.4. 安全性 (81)4.4.5.2.5. 参考 (82)4.4.5.3. Web (82)4.4.5.3.1. 容器设置(Container configuration) (82)4.4.5.3.2. Connector设置(Connector configuration) (84)4.4.5.3.3. Virtual-server配置(Virtual-Server configuration) (88)4.4.5.3.4. 参考 (89)4.4.5.4. Web services (89)4.4.5.4.1. 参考 (90)1.jboss各主要版本特性1.1. jboss4特性JBoss4包括web服务器(servlet/JSP容器,HTML服务器)、EJB2.0容器。
JBoss服务器JBoss是一套开源的企业级Java中间件软件,用于实现基于SOA架构的web应用和服务。
Jboss包含一组可独立运行的软件。
2006年4月10日,Redhat宣布斥资3.5亿美元收购JBossJBoss是一个免费的开源应用服务器,全面支持J2EE,包括JSP,Servlets,EJB。
为了让J2EE开发人员快速熟悉JBoss,本文将带您开始JBoss之旅,包括下载,安装,部署应用程序和配置数据源。
工具准备为了运行JBoss,你需要准备以下工具:u JDK 1.3.1或更高。
为了在JBoss上开发应用程序,你可能还需要以下开发工具:u Ant 1.5,一个Java Build Tool。
u XDoclet 1.1.2,一个用于生成代码的Javadoc插件。
u JBoss Project Template下载可以从/">获得JBoss,JBoss现在有两种供你选择:标准版,包括用于Web页和Servlets的Jetty,和另一个用Tomcat替换Jetty的版本。
在写作本文时,JBoss 3.2.1是最新的稳定版本。
安装解压压缩包到一个指定的目录,例如JBoss-3.2.1,解压完毕后,应该生成如下目录:u bin:命令和脚本u client:客户端jarsu docs:JBoss的文档u lib:服务器端jarsu server:服务器配置文件第二步,建立以下环境变量:u JBoss_HOME:设置为JBoss的安装目录。
u JAVA_HOME:设置为JDK的安装目录。
服务器配置JBoss提供了3种服务器配置:u Minimal:最小配置,仅仅包括日志,JNDI服务和URL部署扫描器,你可能会在一个不需要J2EE的应用中使用这种配置,或者以该配置为基础自定义配置。
u Default:缺省配置,包括除了RMI/IIOP和集群的所有J2EE服务。
u All:这种配置包括所有的JBoss服务。
Jboss应用服务器教程JBoss应用服务器是一种基于Java的开源应用服务器,它提供了构建、部署和管理Java应用程序的平台。
本教程将介绍JBoss应用服务器的基本知识和使用方法,帮助读者快速掌握JBoss的开发和管理技巧。
第一章:JBoss应用服务器简介1.1 什么是JBoss应用服务器JBoss应用服务器是一种基于JavaEE规范的开源应用服务器,它提供了一系列的容器和部署工具,用于开发、部署和管理Java应用程序。
JBoss应用服务器具有高性能、可扩展性和可靠性等特点,被广泛应用于企业级Java开发。
1.2 JBoss应用服务器的特点- 支持JavaEE规范:JBoss应用服务器完全支持JavaEE规范,包括EJB、Servlet、JSP等。
- 高性能:JBoss应用服务器使用了高效的线程池和连接池等技术,能够提供卓越的性能。
- 可扩展性:JBoss应用服务器的架构设计具有良好的可扩展性,可以根据需求添加新的模块或扩展现有功能。
- 安全性:JBoss应用服务器提供了丰富的安全机制,包括身份认证、权限控制等,保护应用程序的安全。
- 高可用性:JBoss应用服务器支持集群部署和负载均衡,提供了高可用性和容错能力。
1.3 JBoss应用服务器的版本目前最新的JBoss应用服务器版本是JBoss EAP(JBoss企业应用平台),它是JBoss应用服务器的商业版本,提供了更多的功能和支持。
此外,JBoss社区还提供了免费的开源版本,如JBoss AS、WildFly等。
第二章:JBoss应用服务器的安装与配置2.1 下载JBoss应用服务器在官方网站上下载适合您系统的JBoss应用服务器安装包,并解压到您的机器上。
2.2 配置JBoss应用服务器- 设置JAVA_HOME:将JAVA_HOME环境变量指向您的JDK安装路径。
- 配置JBoss服务器:根据您的需求修改JBoss的配置文件,如端口号、数据库连接等。
JBoss是一个开放源码的EJB服务器,它与其它服务器整合后可以提供一个完整的J2EE平台。
本文介绍如何在Linux/windows环境下安装和配置JBoss,以及如何在JBoss平台上实现EJB的开发和部署。
作为J2EE架构中最重要的构件,EJB是实现服务器端分布式计算的核心。
EBJ服务器是EJB的容器,它控制着EJB的运行,并为其提供事务处理、数据库访问、安全控制等一系列系统级的服务。
EJB服务器是J2EE应用服务器的一个重要组成部分。
Sun公司的J2EE SDK、IBM公司的WebSphere,以及BEA公司的WebLogic等J2EE实现都内嵌了EJB服务器。
虽然JBoss目前还不是一个完整的J2EE 应用服务器,但它却是一个完整的EJB服务器,在与Tomcat、Jetty等Web服务器整合后,能够提供一个完整的J2EE平台。
JBoss最大的优点在于它是源代码开放的自由软件,并完全遵循J2EE规范。
由于JBoss强大的功能和优异的性能,以及与Linux等GNU项目的结合,目前已经成为J2EE服务器端企业级应用的一股强大力量。
安装JBossJBoss的安装和配置相对比较简单。
首先到上下载JBoss软件包。
目前JBoss的最高版本为3.0,建议下载相对稳定的JBoss2.4.4和Tomcat3.2.3集成的二进制软件包,这样就避免了单个软件包下载后JBoss和Tomcat之间的配置问题。
下载的软件包解压缩到/usr目录后,将生成/usr/JBoss-2.4.4_Tomcat-3.2.3这目录。
为方便今后的使用,把该目录更名为/usr/jb_tom。
在/usr/jb_tom目录下可以找到/usr/jb_tom/jboss和/usr/jb_tom/tomcat两个子目录,它们分别为JBoss和Tomcat的根目录。
在正式启动JBoss之前,应该先安装好JDK(建议安装JDK 1.3以上的版本),并将环境变量ClassPath 设置好。
Jboss+EJB的配置与使用实验报告一、实验目的:1.学习和了解J2EE的EJB规范2.学习掌握如何利用Jboss来部署和使用会话EJB (stateful & stateless)3.学习掌握利用Jboss+mySQL来部署和使用会话实体EJB (BMP & CMP)二、实验环境Windows XP三、实验内容:1、会话EJB(stateless)1)Jboss需要JDK的支持,因此安装之前要先检查一下JDK是否已经安装好了,并在添加系统环境变量JAVA_HOME为你JDK的安装目录,例:D:\ProgramFiles\Java\jdk1.5.0_012)下载jboss-4.0.2.zip,无需安装,只要解压到某一路径即可。
例:解压到C:\3)下载参考例子session-stateless-EJB.rar到本地硬盘并解压。
4)进入目录后,打开setenv.cmd,设置JAVA_HOME和JBOSS_HOME为你系统中,java和jboss的主目录。
set JAVA_HOME=G:\Program Files\Java\jdk1.6.0_02set JBOSS_HOME=G:\lab7\jboss-4.0.2运行compile.cmd对该目录下的java源文件进行编译。
5)编译完成后,运行EJB_Packet.bat进行打包操作,生成sessionEJB.jar文件,把这个文件复制到%JBOSS_HOME\server\default\deploy目录。
6)打开jboss的安装目录\bin目录下的run.bat, 然后分别运行run_sClien*.cmd,其中*代表1、2、3、a和b。
将看到运行无状态会话EJB的结果7)运行结果:run_sClien1.cmdrun_sClien2.cmdrun_sClien3.cmdrun_sCliena.cmdrun_sClienb.cmd2、会话EJB(stateful)实验步骤参照会话EJB(stateless) 运行结果:run.batrun_sClien1.cmdrun_sClien2.cmdrun_sClien3.cmdrun_sCliena.cmdrun_sClienb.cmd小结:2、配置Jboss与Mysql数据库连接池在实验一、会话EJB(stateless)的基础上,进行以下步骤。
JBOSS的下载安装、环境变量配置以及部署JBoss是纯Java的EJB(企业JavaBean)服务器。
第一步:下载安装1.进入官网/downloads,选择“(158mb Install)”这个是JBoss EAP6.2.0.GA,是最新版的,而且是Windows安装包。
如果想下载ZIP压缩包,就选择“Seemore……”,再选择ZIP压缩包。
2.下载完成后,安装就可以,安装路径一般是:C:\program files\EAP-6.2.0\jboss-eap-6.2;ZIP压缩包解压到一个路径纯英文的文件夹下,如:E:\JBOSS\jboss-eap-6.2.0第二步:环境变量配置JBoss的使用必须有JDK,只有JRE是不行的,所以你的电脑必须首先配置Java环境变量3.下载JDK(/technetwork/java/javase/downloads/index.html),现在最新版本为8.05,安装或者解压后到一个纯英文目录或者文件夹下:如:C:\ProgramFiles\Java\jdk1.8.0_05\。
我以windows 7 来说明,4.首先右键点击桌面上的计算机,选择属性-->高级系统设置-->环境变量,在系统变量中新建一个变量名:JAVA_HOME,变量值(路径):就是你解压的路径,路径一直到看得见bin目录为止:将上面路径复制环境变量路径里,确定。
5.找到path变量,然后在打开在最前面输入%JAVA_HOME%\bin; 注意最后的分号不能少,他能把该路径和别的路径区分开。
6.现在JDK配置好了,接下来可以配置JBOSS了;还是在环境变量新建一个:JBOSS_HOME 路径为你解压JBOSS的路径:一直到看的到bin目录为止,路径粘贴复制到新建的环境变量路径里,确定。
7.新建一个环境变量:Classpath 路径为:%JAVA_HOME%\lib; 注意最后的分号不能少。
JBOSS最大连接数配置和jvm内存配置一.调整JBOSS最大连接数.配置deploy/jboss-web.deployer/server.xml文件 .<Connectorport="8080"address="0.0.0.0"maxThreads="1600"minSpareThreads="100"maxSpareThreads="250"emptySessionPath="false"enableLookups="false"redirectPort="8443"acceptCount="800"connectionTimeout="20000"disableUploadTimeout="true"URIEncoding="UTF-8"/>maxThreads:表示最多同时处理的连接数。
应该将线程数(最大线程数)设置比最大预期负载(同时并发的点击)多25%(经验规则)。
acceptCount:当同时连接的人数达到maxThreads时,还可以接收排队的连接。
minSpareThread:指“启动以后,总是保持该数量的线程空闲等待”;设置比预期负载多25%。
maxSpareThread:指“如果超过了minSpareThread,然后总是保持该数量的线程空闲等待”;设置比预期负载多25%。
其中主要修改两个参数maxThreads和acceptCount值。
增加maxThreads,减少acceptCount值有利缩短系统的响应时间。
但是maxThreads和acceptCount的总和最高值不能超过6000,而且maxThreads过大会增加CPU和内存消耗,故低配置用户可通过降低maxThreads并同时增大acceptCount值来保证系统的稳定。
关于JBOSS服务器性能配置说明一、服务器性能配置:1.运行堆扩容设置:找到JBOSS 4.0+安装目录,以<JBOSS>为例;找到<JBOSS>\bin\run.conf文件,搜索并找到这行(一般是在第43行):JA V A_OPTS="-server –Xms128m –Xmx512m …将以上内容修改成:JA V A_OPTS="-server –Xms500m –Xmx1000m -XX:PermSize=200m -XX:MaxPermSize=400m …✓备注:以下四个参数分别含义如下:-Xms:最小运行堆容量;-Xmx:最大运行堆容量;-XX:PermSize:通常运行的垃圾回收(gc)堆容量;-XX:MaxPermSize:垃圾回收(gc)最大堆容量;二、数据库连接池配置:1.找到JBOSS应用程序发布目录,一般为<JBOSS>\server\default\deploy;2.新建一个oracle-ds.xml文件,大致内容如下:<?xml version="1.0" encoding="UTF-8"?><datasources><local-tx-datasource><!—在java环境上下文中可以调用到的资源名称→<jndi-name>PIPM-oracle</jndi-name><!—数据库jdbc连接的URL →<connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url><!—jdbc驱动→<driver-class>jdbc.oracle.driver.oracleDriver</driver-class><!—数据库登录用户名→<user-name>sxpipm_real</user-name><!—数据库登录用户密码→<password>sxpipm_real</password><!—连接池最小连接数→<min-pool-size>5</min-pool-size><!—连接池最大连接数→<max-pool-size>20</max-pool-size><!—闲置连接超时时间分钟数→<idle-timeout-minutes>30</idle-timeout-minutes><!—跟踪数据库操纵记录→<track-statements/><!—预读式数据库操纵缓存容量(kb) →<prepared-statement-cache-size>32</prepared-statement-cache-size></local-tx-datasource></datasources>3.在现有投资计划管理系统中调用以上定义的数据库连接池:在应用程序代码中找到hibernate.properties文件(一般在src目录下或WEB-INF\classes 下);关闭原先的jdbc连接方式配置(条目前面加#符号):# hibernate.connection.url jdbc:oracle:thin:@localhost:1521:orcl# ername sxpipm_real# hibernate.connection.password sxpipm_real启用已配置的数据库连接池(取消条目前的#符号):hibernate.connection.datasource java: PIPM-oraclehibernate.connection.pool_size 20hibernate.statement_cache.size 32hibernate.jdbc.fetch_size 50hibernate.jdbc.batch_size 25至此,数据库连接池已配置完毕;重新启动JBOSS服务器就可以正式启用连接池。
JDK1.5+SSH+Jboss4.2.3应用部署、开发配置。
张均锋修改时间2011/11/1一、概述JBoss是一个开源的符合J2EE规范的应用服务器,在J2EE应用服务器领域,JBoss 是发展最为迅速的应用服务器。
JBoss是免费的,开放源代码J2EE的实现,它通过LGPL许可证进行发布,这使得JBoss广为流行。
从JBoss项目开始至今,它已经从一个EJB容器发展成为一个基于的J2EE的一个web 操作系统(operating system for web),它体现了J2EE规范中最新的技术。
JBoss4.2X的web容器使用JBoss Web v2.x (集成tomcat6),对大部分Java EE 5“新的”API来说,比如EJB3、JAX-WS、JPA等,在JBoss AS 4.2系列中已经实现了。
这里我们选用JBOSS4.2.3版本作为我们的web应用服务器。
JBoss4.2.3使用JDK1.5,JDK1.5的安装配置略。
二、Jboss配置(步骤):1.配置数据源:在 jboss路径\docs\examples\jca目录下有各种数据库配置文件的样本。
选择一个你合适的,copy到 server\default\deploy 下。
配置文件可"随意"命名为XXXX-ds.xml,该命名的后辍请"确保"为"-ds.xml",如:v10-oracle-ds.xml。
配置如下:<?xml version="1.0" encoding="UTF-8"?><datasources><local-tx-datasource><jndi-name>jdbc/btdb1</jndi-name><connection-url>jdbc:oracle:thin:@192.168.0.36:1522:ORCL11GR2</con nection-url><driver-class>oracle.jdbc.driver.OracleDriver</driver-class><user-name>BTV10_GS</user-name><password>BTV10_GS</password><!--使用Java上下文,设置为flase --><use-java-context>false</use-java-context><!--最小连接池数目--><min-pool-size>5</min-pool-size><!--最大连接池数目--><max-pool-size>800</max-pool-size><!--数据库连接空闲时间,单位为分钟,如果负载较大,可以设为5,如果一般,可以设为3--><idle-timeout-minutes>5</idle-timeout-minutes><exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.Or acleExceptionSorter</exception-sorter-class-name><metadata><type-mapping>Oracle9i</type-mapping></metadata></local-tx-datasource><local-tx-datasource><jndi-name>jdbc/btdb2</jndi-name><connection-url>jdbc:oracle:thin:@192.168.0.36:1522:ORCL11GR2</ connection-url><driver-class>oracle.jdbc.driver.OracleDriver</driver-class><user-name>BTV10_GS</user-name><password>BTV10_GS</password><!--使用Java上下文,设置为flase --><use-java-context>false</use-java-context><!--最小连接池数目--><min-pool-size>5</min-pool-size><!--最大连接池数目--><max-pool-size>800</max-pool-size><!--数据库连接空闲时间,单位为分钟,如果负载较大,可以设为5,如果一般,可以设为3--><idle-timeout-minutes>5</idle-timeout-minutes><exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor .OracleExceptionSorter</exception-sorter-class-name><metadata><type-mapping>Oracle9i</type-mapping></metadata></local-tx-datasource></datasources>2.将web应用解压至“JBOSS安装目录\server\default\deploy”目录下,文件夹改名为xxx.war(如server\default\deploy\btweb.war),或者直接将war包拷贝到该目录。
1.1跟我学JBoss应用服务器下的J2EE应用开发——JBoss应用服务器的配置和管理详解(第2部分)1、设置Jboss中的控制台以进行登录验证(1)启动JBoss的控制台安装好JBoss并启动JBoss后,在浏览器窗口的地址栏里键入http://localhost:8080/jmx-console就可以浏览JBoss的部署管理的一些信息,默认情况下不键入任何用户名和密码就可以进入此页面方便是方便,但真正使用起来还是有点安全隐患,因为不管任何人只要知道服务器主机的IP地址都可以进去访问。
(2)给JBoss的控制台增加用户登录验证下面我们针对此问题对JBoss进行配置,使得访问jmx-console也必须要知道用户名和密码才可进去访问。
(3)配置步骤进入jmx-console.war的目录,通常此目录在{jboss_home}\server\default\deploy目录下。
●编辑该目录下的WEB-INF\web.xml文件,把其中的<security-constraint>部分注释去掉●编辑该目录下的WEB-INF\classes的roles.properties和users.properties两文件(新建它们),其中在users.properties文件里定义用户名和密码,格式为username=password。
当然,可以依照此格式添加多个用户。
而在roles.properties文件里定义用户名和角色,格式为username=role。
这里的role必须和web.xml文件里的<role-name>相对应(本例为JBossAdmin)。
编辑WEB-INF\jboss-web.xml文件,打开<security-domain>部分注释注意:这里<security-domain>内容对应的security-domain对应{jboss_home}\server\default\conf\login-config.xml这个jaas配置文件里的某个application-policy。
如上面的jboss-web.xml文件中存在<security-domain>java:/jaas/jmx-console</security-domain>而在login-config.xml里对应有:<application-policy name = "jmx-console"><authentication><login-module code="ersRolesLoginModule" flag = "required" /></authentication></application-policy>重启jboss,就会出现你想要的输入username和password的窗口输入在前面users.properties文件所提供的用户名称admin和密码admin,将能够成功地登录。
(4)利用JBoss的控制台管理和查看JBoss服务器中的各种配置---如查看JNDI树然后找到list()方法点击“Invoke”按钮,将显示出JBoss中的各个JNDI树2、JBoss服务器的各个缺省的配置文件及其主要的作用c:/JBoss/server/default目录为JBoss服务器的各个缺省的配置文件的目录位置。
(1)conf/jboss-minimal.xmlThis is a minimalist example of the jboss-service.xml configuration file. It is the jboss-service.xml file used in the minimal configuration file set.(2)conf/jboss-service.xmljboss-service.xml defines the core services configurations. The complete DTD and syntax of this file is described, along with the details on integrating custom services, in Section 2.4.2, “JBoss MBean Services”.(3)conf/jboss.webThis directory is used by Tomcat.(4)conf/jndi.propertiesThe jndi.properties file specifies the JNDI InitialContext properties that are used within the JBoss server when an InitialContext is created using the no-arg constructor.(5)conf/log4j.xmlThis file configures the Apache log4j framework category priorities and appenders used by the JBoss server code. See the JBoss/Log4j book for details on configuring and using log4j with JBoss.(6)conf/login-config.xmlThis file contains sample server side authentication configurations that are applicable when using JAAS based security. See Chapter 8, Security on JBoss for additional details on the JBoss security framework and the format of this file.(7)conf/server.policyThe server.policy file is a place holder for Java2 security permissions. The default file simply grall permissions to all codebases.(8)conf/standardjaws.xmlThis file provides a default configuration file for the legacy EJB 1.1 JBossCMP engine.(9)conf/standardjboss.xmlThis file provides the default container configurations. Use of this file is covered in Chapter 5, EJBs on JBoss(10)conf/standardjbosscmp-jdbc.xmlThis file provides a default configuration file for the JBoss CMP engine(11)conf/xmdesc/*-mbean.xmlThe xmdesc directory contains XMBean descriptors for several services configured in the jboss-service.xml file.(12)deploy/bsh-deployer.xmlThis configures the bean shell deployer, which deploys bean shell scripts as JBoss services. (13)deploy/cache-invalidation-service.xmlThis is a service that allows for custom invalidation of the EJB caches via JMS notifications. It is disabled by default.(14)deploy/client-deployer-service.xmlThis is a service that provides support for J2EE application clients. It manages the java:comp/env enterprise naming context for client applications based on the application-client.xml descriptor.(15)deploy/ear-deployer.xmlThe EAR deployer is the service responsible for deploying J2EE EAR files.(16)deploy/ejb-deployer.xmlThe EJB deployer is the service responsible for deploying J2EE EJB JAR files.(17)deploy/hsqldb-ds.xmlhsqldb-ds.xml configures the Hypersonic 1.7.1 embedded database service configuration file. It sets up the embedded database and related connection factories. The format of JCA datasource files is discussed in Section 7.3, “Configuring JDBC DataSources”.(18)deploy/jms/hsqldb-jdbc-state-service.xmlState Management using HSQLDB(19)deploy/jms/hsqldb-jdbc2-service.xmlhsqldb-jdbc2-service.xml configures the JMS persistence and caching using Hypersonic. It also contains the DestinationManager MBean which is the core service for the JMS implementation. (20)deploy/jms/jbossmq-destinations-service.xmljbossmq-destinations-service.xml configures a number of JMS queues and topics used by the JMS unit tests. Configuration of JMS destinations is discussed in Chapter 6, Messaging on JBoss. (21)deploy/mail-service.xmlThe mail-service.xml file is an MBean service descriptor that provides JavaMail sessions for use inside of the JBoss server.(22)deploy/monitoring-service.xmlThe monitoring-service.xml file configures alert monitors like the console listener and email listener used by JMX notifications.(23)deploy/properties-service.xmlThe properties-service.xml file is an MBean service descriptor that allows for customization of the JavaBeans PropertyEditors as well as the definition of system properties. This is discussed further in Section 10.1, “System Properties Management”.(24)deploy/scheduler-service.xml, schedule-manager-service.xmlThe scheduler-service.xml, schedule-manager-service.xml files are MBean service descriptors that provides a scheduling type of service. This is discussed further in Section 10.4, “Scheduling Tasks”.(25)deploy/sqlexception-service.xmlThe sqlexception-service.xml file is an MBean service descriptor for handling vendor specific handling of java.sql.SQLExceptions. Its usage is discussed in Section 11.11, “Entity Commands and Primary Key Generation”.3、JBoss服务器中所带的的各个控制程序及其主要的作用(1)deploy/http-invoker.sarhttp-invoker.sar contains the detached invoker that supports RMI/HTTP. It also setups bindings of RMI/HTTP proxies for the JNDI naming service that allow the JBoss JNDI service to be accessed over http. This will be discussed in Section 2.7.2.5, “The HttpInvoker - RMI/HTTP Transport”(2)deploy/jboss-aop.deployerjboss-aop.deployer configures the AspectManagerService and deploys JBoss AOP applications. (3)deploy/jboss-hibernate.deployerjboss-hibernate.deployer deploys Hibernate archives (HAR files).(4)deploy/jboss-local-jdbc.rarjboss-local-jdbc.rar is a JCA resource adaptor that implements the JCA ManagedConnectionFactory interface for JDBC drivers that support the DataSource interface but not JCA.(5)deploy/jboss-ws4ee.sarjboss-ws4ee.sar provides J2EE web services support.(6)deploy/jboss-xa-jdbc.rarThe jboss-xa-jdbc.rar is a JCA resource adaptor that implements the JCA ManagedConnectionFactory interface for JDBC drivers that support the XADataSource interface, but do not provide JCA adaptor.(7)deploy/jbossjca-service.sarjbossjca-service.sar is the application server implementation of the 1.0 JCA specification. It provides the connection management facilities for integrating resource adaptors into the JBoss server. The JCA layer is discussed in Chapter 7, Connectors on JBoss.(8)deploy/jbossweb-tomcat50.sarThe jbossweb-tomcat50.sar directory is an unpacked MBean service archive for the configuration of the Tomcat 5 servlet engine. The SAR is unpacked rather than deployed as a JAR archive so that the tomcat configuration files can be easily edited. This service is discussed in Chapter 9, Web Applications.(9)deploy/jms/jbossmq-httpil.sarjbossmq-httpil.sar provides a JMS invocation layer that allows the use of JMS over http. (10)deploy/jms/jbossmq-service.xmlThe jbossmq-service.xml file configures the core JBossMQ JMS service. These JMS services are discussed in Chapter 6, Messaging on JBoss.(11)deploy/jms/jms-ds.xmlThe jms-ds.xml file configures the JBossMQ JMS provider for use with the jms-ra.rar JCA resource adaptor.(12)deploy/jms/jms-ra.rarjms-ra.rar is a JCA resource adaptor that implements the JCA ManagedConnectionFactory interface for JMS connection factories.(13)deploy/jms/jvm-il-service.xmljvm-il-service.xml configures the inter-vm JMS transport invocation layer. This transport layer is described in org.jboss.mq.il.jvm.JVMServerILService.(14)deploy/jms/uil2-service.xmluil2-service.xml configures the JMS version 2 unified invocation layer. Its a custom socket based transport that is the fastest and most reliable and should be used for inter-vm messaging. This transport layer is described in org.jboss.mq.il.uil2.UILServerILService.(15)deploy/jmx-console.warThe jmx-console.war directory is an unpackaged web application archive that provides an HTML adaptor for the JMX MBeanServer. The WAR is unpackaged rather than deployed as a jar archive so that the jmx-console.war/WEB-INF/*.xml descriptors may be edited to configure role based security easily. The JMX Console is discussed in Section 2.3.1, “Inspecting the Server - the JMX Console Web Applicat ion”(16)deploy/jmx-invoker-service.sarjmx-invoker-service.sar is an unpacked MBean service archive that exposes a subset of the JMX MBeanServer interface methods as an RMI interface to enable remote access to the JMX core functionality. This is similar to the legacy jmx-rmi-adaptor.sar, with the difference that the transport is handled by the detached invoker architecture. This service is discussed in Section 2.3.4, “Connecting to JMX Using Any Protocol”.(17)deploy/mail-ra.rarmail-ra.rar is a resource adaptor that provides a JavaMail connector.(18)deploy/management/console-mgr.sar, web-console.warconsole-mgr.sar and web-console.war provide the Web Console. It is a web application/applet that provide a richer view of the JMX server management data than the JMX console. You may view the console using the URL http://localhost:8080/web-console/.(19)deploy/uuid-key-generator.sarThe uuid-key-generator.sar service provides a UUID-based key generation facility.。