<mbean code="org.jboss.invocation.pooled.server.PooledInvoker" name="jboss:service=invoker,type=pooled"> <attribute name="NumAcceptThreads">1</attribute> <attribute name="MaxPoolSize">30</attribute> <attribute name="ClientMaxPoolSize">200</attribute> <attribute name="SocketTimeout">6000</attribute> <attribute name="ServerBindAddress">${jboss.bind.address}</attribute> <attribute name="ServerBindPort">5555</attribute> <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute> <attribute name="ClientConnectPort">0</attribute> <attribute name="EnableTcpNoDelay">false</attribute> <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends> </mbean> <!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout in seconds. If you want to disable caching of security credentials, set this to 0 to force authentication to occur every time. This has no affect if the AuthenticationCacheJndiName has been changed from the default value. --> <attribute name="DefaultCacheTimeout">1800</attribute> <attribute name="ThreadGroupName">System Threads</attribute> <!-- How long a thread will live without any tasks in MS --> <attribute name="KeepAliveTime">60000</attribute> <!-- The min number of threads in the pool --> <attribute name="MinimumPoolSize">1</attribute> <!-- The max number of threads in the pool --> <attribute name="MaximumPoolSize">10</attribute> <!-- The max number of tasks before the queue is full --> <attribute name="MaximumQueueSize">1000</attribute> <!-- The behavior of the pool when a task is added and the 以及这些都是具体干啥的啊?
<mbean code="org.jboss.invocation.pooled.server.PooledInvoker" name="jboss:service=invoker,type=pooled"> <attribute name="NumAcceptThreads">1</attribute> <attribute name="MaxPoolSize">30</attribute> <attribute name="ClientMaxPoolSize">200</attribute> <attribute name="SocketTimeout">6000</attribute> <attribute name="ServerBindAddress">${jboss.bind.address}</attribute> <attribute name="ServerBindPort">5555</attribute> <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute> <attribute name="ClientConnectPort">0</attribute> <attribute name="EnableTcpNoDelay">false</attribute> <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends> </mbean> <!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout in seconds. If you want to disable caching of security credentials, set this to 0 to force authentication to occur every time. This has no affect if the AuthenticationCacheJndiName has been changed from the default value. --> <attribute name="DefaultCacheTimeout">1800</attribute> <attribute name="ThreadGroupName">System Threads</attribute> <!-- How long a thread will live without any tasks in MS --> <attribute name="KeepAliveTime">60000</attribute> <!-- The min number of threads in the pool --> <attribute name="MinimumPoolSize">1</attribute> <!-- The max number of threads in the pool --> <attribute name="MaximumPoolSize">10</attribute> <!-- The max number of tasks before the queue is full --> <attribute name="MaximumQueueSize">1000</attribute> <!-- The behavior of the pool when a task is added and the 以及这些都是具体干啥的啊?
<mbean code="org.jboss.invocation.pooled.server.PooledInvoker" name="jboss:service=invoker,type=pooled"> <attribute name="NumAcceptThreads">1</attribute> <attribute name="MaxPoolSize">30</attribute> <attribute name="ClientMaxPoolSize">200</attribute> <attribute name="SocketTimeout">6000</attribute> <attribute name="ServerBindAddress">${jboss.bind.address}</attribute> <attribute name="ServerBindPort">5555</attribute> <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute> <attribute name="ClientConnectPort">0</attribute> <attribute name="EnableTcpNoDelay">false</attribute> <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends> </mbean> <!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout in seconds. If you want to disable caching of security credentials, set this to 0 to force authentication to occur every time. This has no affect if the AuthenticationCacheJndiName has been changed from the default value. --> <attribute name="DefaultCacheTimeout">1800</attribute> <attribute name="ThreadGroupName">System Threads</attribute> <!-- How long a thread will live without any tasks in MS --> <attribute name="KeepAliveTime">60000</attribute> <!-- The min number of threads in the pool --> <attribute name="MinimumPoolSize">1</attribute> <!-- The max number of threads in the pool --> <attribute name="MaximumPoolSize">10</attribute> <!-- The max number of tasks before the queue is full --> <attribute name="MaximumQueueSize">1000</attribute> <!-- The behavior of the pool when a task is added and the 以及这些都是具体干啥的啊?
http://762626559-qq-com.javaeye.com/blog/407903
很详细...
安装和配置
JBoss的安装和配置可以直接拷贝使用,但是要改动 %JBoss-HOME%\bin\run.bat里JAVA-HOME的设置,改成本机JDK的目录。运行run.bat来启动JBoss 关闭JBoss:关闭JBoss的 DOS 窗口或按"CTRL + C"
Jboss的目录结构
1、bin:开始和停止JBoss的地方。 其中有两个主要的批处理文件:run.bat和shutdown.bat。要启动JBoss只要执行run.bat文件即可;要停止JBoss必须执行shutdown.bat。 注意,shutdown.bat文件直接执行并不会自动停止JBoss,它必须要输入参数,参数意义如下: h显示帮助信息;D设置系统属性;-停止处理选项;s停止用JNDI URL指定的远程服务;n通过制定JMX名字来停止服务;a适配到指定的JNDI名称的远程服务;u指定用户名称;p指定用户密码;S停止服务器;e从虚拟机退出;H暂停。 一般,我们使用S选项来停止服务器。即执行shutdown.bat -S。 2、docs:放置JBoss的例子、测试脚本和各种脚本配置文件的DTD。 3、lib:放置JBoss所需要的部分jar包文件。 4、client:放置EJB客户端运行时所需要的jar包。 5、server:放置各启动类型的服务器端EJB配置所需要的文件等。 6、backup
以80端口服务
修改这个文件: {%JBOSS_HOME%}\server\default\deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml 在"8080"的配置后加入以下代码 <!-- A HTTP/1.1 Connector on port 80 --> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="80" minProcessors="5" maxProcessors="100" enableLookups="true" acceptCount="10" debug="0" connectionTimeout="20000" useURIValidationHack="false"/> 重新启动JBoss即可
启动过程
设置环境变量 JBOSS_CLASSPATH (可以自己加上安全管理器和xml解析器) a) %JBOSS_CLASSPATH%; b) %JAVA_HOME%/lib/tools.jar; c) run.jar d) ../lib/crimson.jar; 设置启动参数JAXP(xml解析器和相应工厂) 启动 设置配置信息 读取配置文件JBoss.properties,保存在系统属性中(System.properties) 设置缺省属性jboss.home和java.security.auth.login.config 创建MBeanServer.的实例: 把配置文件和补丁文件所在的目录指定给特定的远程类加载器Mlet 加载保存配置文件(mlet会自动在配置文件目录中查找) 初始化并启动MBean 配置服务ConfigurationService 加载配置文件 保存配置 服务控制ServiceControl 初始化服务程序(init方法) 启动服务程序(start方法)
在JBOSS中发布文件
1、制作JSP的war部署文件 用"jar cvf hello.war index.jsp main.jsp"的方式生成把index.jsp和main.jsp文件加入到hello.war中。把生成的hello.war拷贝到jboss安装目录\server\default\deploy\下,部署成功。用"http://localhost:8080/hello/"或"http://localhost:8080/hello/index.jsp"这两个地址进行测试。 2、制作Servlet的war部署文件 A、用"javac -classpath "%CLASSPATH%;%jboss_home%\server\default\lib\javax.servlet.jar" HelloWorld.java"的形式编译HelloWorld.java(这是一个Servlet)得到HelloWorld.class B、写一个web.xml配置文件 代码如下: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>HelloWorld</servlet-name> <servlet-class>hello.HelloWorld</servlet-class> </servlet> <servlet-mapping> <servlet-name>HelloWorld</servlet-name> <url-pattern>/HelloWorld</url-pattern> </servlet-mapping> </web-app> 每个标记必须小写,否则会出错。 C、先在c:\servlet下建立一个web-inf目录,在目录中放入web.xml文件。 D、在web-inf目录下建立一个classes目录,放入编译好的HelloWorld.class文件 E、在c:\servlet下执行jar cvf hello.war *.*,很快就生成了一个名为hello.war的文件,接着把hello.war复制到jboss的安装目录\server\default\deploy\下完成部署。 3、也可以不打包,把文件放在deploy下的同名文件夹下也可以。比如原来是制作成hello.war文件,可以建立一个名称为hello.war的文件夹,把要发布的文件拷贝到这个目录底下也可以发布成功。
你可以自己去看下。
name="jboss:service=invoker,type=pooled">
<attribute name="NumAcceptThreads">1</attribute>
<attribute name="MaxPoolSize">30</attribute>
<attribute name="ClientMaxPoolSize">200</attribute>
<attribute name="SocketTimeout">6000</attribute>
<attribute name="ServerBindAddress">${jboss.bind.address}</attribute>
<attribute name="ServerBindPort">5555</attribute>
<attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>
<attribute name="ClientConnectPort">0</attribute>
<attribute name="EnableTcpNoDelay">false</attribute> <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
</mbean>
<!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
in seconds.
If you want to disable caching of security credentials, set this to 0 to
force authentication to occur every time. This has no affect if the
AuthenticationCacheJndiName has been changed from the default value.
-->
<attribute name="DefaultCacheTimeout">1800</attribute>
<attribute name="ThreadGroupName">System Threads</attribute>
<!-- How long a thread will live without any tasks in MS -->
<attribute name="KeepAliveTime">60000</attribute>
<!-- The min number of threads in the pool -->
<attribute name="MinimumPoolSize">1</attribute>
<!-- The max number of threads in the pool -->
<attribute name="MaximumPoolSize">10</attribute>
<!-- The max number of tasks before the queue is full -->
<attribute name="MaximumQueueSize">1000</attribute>
<!-- The behavior of the pool when a task is added and the 以及这些都是具体干啥的啊?
name="jboss:service=invoker,type=pooled">
<attribute name="NumAcceptThreads">1</attribute>
<attribute name="MaxPoolSize">30</attribute>
<attribute name="ClientMaxPoolSize">200</attribute>
<attribute name="SocketTimeout">6000</attribute>
<attribute name="ServerBindAddress">${jboss.bind.address}</attribute>
<attribute name="ServerBindPort">5555</attribute>
<attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>
<attribute name="ClientConnectPort">0</attribute>
<attribute name="EnableTcpNoDelay">false</attribute> <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
</mbean>
<!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
in seconds.
If you want to disable caching of security credentials, set this to 0 to
force authentication to occur every time. This has no affect if the
AuthenticationCacheJndiName has been changed from the default value.
-->
<attribute name="DefaultCacheTimeout">1800</attribute>
<attribute name="ThreadGroupName">System Threads</attribute>
<!-- How long a thread will live without any tasks in MS -->
<attribute name="KeepAliveTime">60000</attribute>
<!-- The min number of threads in the pool -->
<attribute name="MinimumPoolSize">1</attribute>
<!-- The max number of threads in the pool -->
<attribute name="MaximumPoolSize">10</attribute>
<!-- The max number of tasks before the queue is full -->
<attribute name="MaximumQueueSize">1000</attribute>
<!-- The behavior of the pool when a task is added and the 以及这些都是具体干啥的啊?
name="jboss:service=invoker,type=pooled">
<attribute name="NumAcceptThreads">1</attribute>
<attribute name="MaxPoolSize">30</attribute>
<attribute name="ClientMaxPoolSize">200</attribute>
<attribute name="SocketTimeout">6000</attribute>
<attribute name="ServerBindAddress">${jboss.bind.address}</attribute>
<attribute name="ServerBindPort">5555</attribute>
<attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>
<attribute name="ClientConnectPort">0</attribute>
<attribute name="EnableTcpNoDelay">false</attribute> <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
</mbean>
<!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
in seconds.
If you want to disable caching of security credentials, set this to 0 to
force authentication to occur every time. This has no affect if the
AuthenticationCacheJndiName has been changed from the default value.
-->
<attribute name="DefaultCacheTimeout">1800</attribute>
<attribute name="ThreadGroupName">System Threads</attribute>
<!-- How long a thread will live without any tasks in MS -->
<attribute name="KeepAliveTime">60000</attribute>
<!-- The min number of threads in the pool -->
<attribute name="MinimumPoolSize">1</attribute>
<!-- The max number of threads in the pool -->
<attribute name="MaximumPoolSize">10</attribute>
<!-- The max number of tasks before the queue is full -->
<attribute name="MaximumQueueSize">1000</attribute>
<!-- The behavior of the pool when a task is added and the 以及这些都是具体干啥的啊?
http://deer.javaeye.com/blog/416787
这两个文档都很不错
JBoss的安装和配置可以直接拷贝使用,但是要改动 %JBoss-HOME%\bin\run.bat里JAVA-HOME的设置,改成本机JDK的目录。运行run.bat来启动JBoss 关闭JBoss:关闭JBoss的 DOS 窗口或按"CTRL + C"
Jboss的目录结构
1、bin:开始和停止JBoss的地方。 其中有两个主要的批处理文件:run.bat和shutdown.bat。要启动JBoss只要执行run.bat文件即可;要停止JBoss必须执行shutdown.bat。 注意,shutdown.bat文件直接执行并不会自动停止JBoss,它必须要输入参数,参数意义如下: h显示帮助信息;D设置系统属性;-停止处理选项;s停止用JNDI URL指定的远程服务;n通过制定JMX名字来停止服务;a适配到指定的JNDI名称的远程服务;u指定用户名称;p指定用户密码;S停止服务器;e从虚拟机退出;H暂停。 一般,我们使用S选项来停止服务器。即执行shutdown.bat -S。 2、docs:放置JBoss的例子、测试脚本和各种脚本配置文件的DTD。 3、lib:放置JBoss所需要的部分jar包文件。 4、client:放置EJB客户端运行时所需要的jar包。 5、server:放置各启动类型的服务器端EJB配置所需要的文件等。 6、backup
以80端口服务
修改这个文件: {%JBOSS_HOME%}\server\default\deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml 在"8080"的配置后加入以下代码 <!-- A HTTP/1.1 Connector on port 80 --> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="80" minProcessors="5" maxProcessors="100" enableLookups="true" acceptCount="10" debug="0" connectionTimeout="20000" useURIValidationHack="false"/> 重新启动JBoss即可
启动过程
设置环境变量 JBOSS_CLASSPATH (可以自己加上安全管理器和xml解析器) a) %JBOSS_CLASSPATH%; b) %JAVA_HOME%/lib/tools.jar; c) run.jar d) ../lib/crimson.jar; 设置启动参数JAXP(xml解析器和相应工厂) 启动 设置配置信息 读取配置文件JBoss.properties,保存在系统属性中(System.properties) 设置缺省属性jboss.home和java.security.auth.login.config 创建MBeanServer.的实例: 把配置文件和补丁文件所在的目录指定给特定的远程类加载器Mlet 加载保存配置文件(mlet会自动在配置文件目录中查找) 初始化并启动MBean 配置服务ConfigurationService 加载配置文件 保存配置 服务控制ServiceControl 初始化服务程序(init方法) 启动服务程序(start方法)
在JBOSS中发布文件
1、制作JSP的war部署文件 用"jar cvf hello.war index.jsp main.jsp"的方式生成把index.jsp和main.jsp文件加入到hello.war中。把生成的hello.war拷贝到jboss安装目录\server\default\deploy\下,部署成功。用"http://localhost:8080/hello/"或"http://localhost:8080/hello/index.jsp"这两个地址进行测试。 2、制作Servlet的war部署文件 A、用"javac -classpath "%CLASSPATH%;%jboss_home%\server\default\lib\javax.servlet.jar" HelloWorld.java"的形式编译HelloWorld.java(这是一个Servlet)得到HelloWorld.class B、写一个web.xml配置文件 代码如下: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>HelloWorld</servlet-name> <servlet-class>hello.HelloWorld</servlet-class> </servlet> <servlet-mapping> <servlet-name>HelloWorld</servlet-name> <url-pattern>/HelloWorld</url-pattern> </servlet-mapping> </web-app> 每个标记必须小写,否则会出错。 C、先在c:\servlet下建立一个web-inf目录,在目录中放入web.xml文件。 D、在web-inf目录下建立一个classes目录,放入编译好的HelloWorld.class文件 E、在c:\servlet下执行jar cvf hello.war *.*,很快就生成了一个名为hello.war的文件,接着把hello.war复制到jboss的安装目录\server\default\deploy\下完成部署。 3、也可以不打包,把文件放在deploy下的同名文件夹下也可以。比如原来是制作成hello.war文件,可以建立一个名称为hello.war的文件夹,把要发布的文件拷贝到这个目录底下也可以发布成功。
这招够厉害吧,让你用,不告诉你怎么用,要想知道怎么用,付钱~~
http://www.javaeye.com/topic/241283
http://762626559-qq-com.javaeye.com/blog/407903