- 浏览: 273160 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
muyufenghua:
public static <T super B> ...
浅谈Java泛型中的extends和super关键字 -
wantodare:
class Test1 {
{
a=1;
}
pr ...
Java对象初始化详解 -
wubo2qml:
问下如何进行列中数字大小的比较。我看了几个过滤器,最接近的是S ...
利用Filter进行HBase查询 -
blackproof:
rowkey是A_B我知道要的A集合,也知道要的B范围不用自定 ...
利用Filter进行HBase查询 -
bin_1715575332:
文章不错,尤其了后半部分讲解一些原理。
利用Filter进行HBase查询
本文内容适合于Jboss 4.x系列应用服务器。
在项目中,我们可能会碰到有多个开发人员共用一个服务器,每个人都需要有单独的开发环境来运行项目程序。如果每个人都安装一个自己的Jboss,这样会浪费很多磁盘空间。另外,还有可能需要在一个服务器上运行多个不同的Jboss项目,或者我们对远程机器上的Jboss目录没有写权限,因此就没有办法把我们的项目放到远程服务器上。为了解决这个问题,Jboss提供的共享安装机制。本文描述了这种机制。
Why use a Shared JBoss Installation Directory?
Development teams typically have a development lab consisting of shared hardware for testing deployments in a more 'production-like' way. The shared hardware usually has multiple instances of the application deployed on it (a few instances per developer), and one installation of the application server software. For example, on a Linux system it would be common for applications such as JBoss to be installed in the /usr/local directory, and the individual developer instances of the application to be deployed in each user's home directory, or perhaps some other part of the filesystem set up explicitly for deployments. So, you may need a shared installation directory for a number of reasons.
Default directory setup
After installation, the JBoss home directory will have a server directory under it which will contain a directory for each 'configuration' or 'server name'. Each of these will have a 'deploy' directory underneath it. For example:
For a shared installation, it might not work to have the subdirectories of 'server' for each configuration, or user. So that leaves two problems that must be solved:
JBoss System Properties
Jboss共享安装的重点在于修改Jboss启动是的系统参数,下面列出了Jboss 4.x系列应用服务器的系统参数。关于Jboss系统参数的详细介绍,可以看下Jboss官方网站的Wiki。
http://www.jboss.org/community/wiki/JBossProperties
Fortunately, it is quite simple to start JBoss so that it will use a shared installation. The key is to understand how to use the JBoss system properties. These properties depend on each other, care must be taken to set them properly.
Where are the ports defined?
为了在一台机器上同时启动多个Jboss,每个Jboss的端口都不能重复,关于Jboss的端口及其修改请看本Blog的另外一篇文章:Jboss端口及其修改。
Examples of setting jboss.server.home
Jboss共享安装的重点在于修改jboss.server.home.dir和jboss.server.home.url这两个启动时的系统参数。下面是Linux和Windows下的两个例子。
Example 1 - Linux
Suppose JBoss is installed in /usr/local/jboss and there is an application deployment in /home/jdavis/myapp. Before starting up JBoss we will need to set some environment variables. We can make a shell script to do this:
~~Note that this script will start a new shell~~, so you can simply exit the shell at any time to go back to the environment variables you had before.
Now, we need to get a sample deployment. For this example, we can copy the 'default' configuration in the JBoss server directory.
We can now start the 'myapp' server like this:
除了修改jboss.server.base.dir和jboss.server.base.url这两个属性来启动Jboss之外,我们还可以修改jboss.server.home.dir和jboss.server.home.url这两个属性来启动Jboss,效果是一样的,启动脚本如下。
In this example we've set the server base directory to the directory above the application deployment and used the -c option to specify the sub-directory, which is the default behavior. Also note that the prefix for the URL form of the base directory is file://. The third forward slash is for the filesystem root directory.
Example 2 - Windows Command Shell
This is the equivalent of the previous example.
1. Java is installed in D:/java/jdk1.5.0_09
2. JBoss in installed in D:/java/jboss-4.0.5.GA
3. The local deployment is in D:/jdavis/myapp
Here is the CMD script to start JBoss on the local deployment:
In this example, we've set the server base directory to the directory above the application deployment and used the -c option to specify the sub-directory, which is the default behavior.
原文出处:http://shrubbery.mynetgear.net/wiki/Shared_JBoss_Installation_Directory
在项目中,我们可能会碰到有多个开发人员共用一个服务器,每个人都需要有单独的开发环境来运行项目程序。如果每个人都安装一个自己的Jboss,这样会浪费很多磁盘空间。另外,还有可能需要在一个服务器上运行多个不同的Jboss项目,或者我们对远程机器上的Jboss目录没有写权限,因此就没有办法把我们的项目放到远程服务器上。为了解决这个问题,Jboss提供的共享安装机制。本文描述了这种机制。
Why use a Shared JBoss Installation Directory?
Development teams typically have a development lab consisting of shared hardware for testing deployments in a more 'production-like' way. The shared hardware usually has multiple instances of the application deployed on it (a few instances per developer), and one installation of the application server software. For example, on a Linux system it would be common for applications such as JBoss to be installed in the /usr/local directory, and the individual developer instances of the application to be deployed in each user's home directory, or perhaps some other part of the filesystem set up explicitly for deployments. So, you may need a shared installation directory for a number of reasons.
- You want to have a directory for each instance of JBoss somewhere other than in the JBoss installation 'server' directory.
- There is a shared (Linux or Unix) deployment box where each user refers to the JBoss installation directory which is read only for their account. (Of course, you could have each user have their own copy of JBoss, but that isn't a very good use of disk space)
- The JBoss installation is on a network drive and read only.
Default directory setup
After installation, the JBoss home directory will have a server directory under it which will contain a directory for each 'configuration' or 'server name'. Each of these will have a 'deploy' directory underneath it. For example:
JBOSS_HOME \- server +- default \- minimal
For a shared installation, it might not work to have the subdirectories of 'server' for each configuration, or user. So that leaves two problems that must be solved:
- How do we tell JBoss to use some directory other than $JBOSS_HOME/server for deployments / configurations?
- How do we run multiple instances of JBoss on the same server?
JBoss System Properties
Jboss共享安装的重点在于修改Jboss启动是的系统参数,下面列出了Jboss 4.x系列应用服务器的系统参数。关于Jboss系统参数的详细介绍,可以看下Jboss官方网站的Wiki。
http://www.jboss.org/community/wiki/JBossProperties
Fortunately, it is quite simple to start JBoss so that it will use a shared installation. The key is to understand how to use the JBoss system properties. These properties depend on each other, care must be taken to set them properly.
Where are the ports defined?
为了在一台机器上同时启动多个Jboss,每个Jboss的端口都不能重复,关于Jboss的端口及其修改请看本Blog的另外一篇文章:Jboss端口及其修改。
Examples of setting jboss.server.home
Jboss共享安装的重点在于修改jboss.server.home.dir和jboss.server.home.url这两个启动时的系统参数。下面是Linux和Windows下的两个例子。
Example 1 - Linux
Suppose JBoss is installed in /usr/local/jboss and there is an application deployment in /home/jdavis/myapp. Before starting up JBoss we will need to set some environment variables. We can make a shell script to do this:
#!/bin/bash # start-env.sh - starts a new shell with instance variables set export JBOSS_HOME=/usr/local/jboss JAVA_HOME=/usr/java/jdk1.5.0_04 export PATH=$JAVA_HOME/bin:$JBOSS_HOME/bin:$PATH echo "Runtime shell..." $SHELL
~~Note that this script will start a new shell~~, so you can simply exit the shell at any time to go back to the environment variables you had before.
Now, we need to get a sample deployment. For this example, we can copy the 'default' configuration in the JBoss server directory.
$ ./start-env.sh #$ cp -r $JBOSS_HOME/server/default /home/jdavis/myapp #原文中是将default拷贝到/home/jdavis/myapp下,但个人觉得应该是拷贝到/home/jdavis目录下面。其实问题也不是很大 $ cp -r $JBOSS_HOME/server/default /home/jdavis
We can now start the 'myapp' server like this:
$ run.sh -Djboss.server.base.dir=/home/jdavis \ -Djboss.server.base.url=file:///home/jdavis -c myapp
除了修改jboss.server.base.dir和jboss.server.base.url这两个属性来启动Jboss之外,我们还可以修改jboss.server.home.dir和jboss.server.home.url这两个属性来启动Jboss,效果是一样的,启动脚本如下。
$ run.sh -Djboss.server.home.dir=/home/jdavis/default \ -Djboss.server.home.url=file:///home/jdavis/default #使用jboss.server.home.dir和jboss.server.home.url系统属性时,需要将目录指向default #目录,而不是default的上级目录。-c参数去掉,将你的项目直接放到default/deploy下面。
In this example we've set the server base directory to the directory above the application deployment and used the -c option to specify the sub-directory, which is the default behavior. Also note that the prefix for the URL form of the base directory is file://. The third forward slash is for the filesystem root directory.
Example 2 - Windows Command Shell
This is the equivalent of the previous example.
1. Java is installed in D:/java/jdk1.5.0_09
2. JBoss in installed in D:/java/jboss-4.0.5.GA
3. The local deployment is in D:/jdavis/myapp
Here is the CMD script to start JBoss on the local deployment:
set JBOSS_HOME=D:/java/jboss-4.0.5.GA set JAVA_HOME=D:/java/jdk1.5.0_09 call %JBOSS_HOME%/bin/run.bat -Djboss.server.base.dir=D:/jdavis \ -Djboss.server.base.url=file:/D:/jdavis -c myapp
In this example, we've set the server base directory to the directory above the application deployment and used the -c option to specify the sub-directory, which is the default behavior.
原文出处:http://shrubbery.mynetgear.net/wiki/Shared_JBoss_Installation_Directory
发表评论
-
Servlet 3.0新特性
2011-03-11 13:12 1377Servlet 3.0中最主要的两个新特性总结如下: 改变了 ... -
Java中wait与notify方法的使用
2010-05-22 14:09 9492在java多线程编程中 ... -
MySql批量插入数据
2010-04-05 15:55 10672在实际的开发过程中,特别是大型的分布式应用系统,往往会涉 ... -
去掉对Spring BeanFacotry的getBean方法的依赖
2009-12-27 23:52 2738在使用Spring时,有时会碰到这种情况: 引用需要在 ... -
通过HttpServletRequestWrapper解决Tomcat请求乱码问题
2009-11-16 23:08 2281应用一:解决tomcat下中文乱码问题(先来个简单的) 在t ... -
相对路径获取Tomcat Web容器中的资源
2009-08-20 21:36 14457最近做项目碰到个问题,我需要利用velocity模版来渲染 ... -
Jboss是数据源配置
2009-08-16 15:38 2042配置Jboss的数据源非常简单,可以从$JBOSS_HOME\ ... -
Jboss 4.x 端口及其修改
2009-08-07 14:49 2848注:本文中所述内容适合于Jboss 4.x系列应用服务器。 ... -
Tomcat热部署
2009-06-24 20:33 3813使用过tomcat的人都知道 ... -
Improved Session Tracking
2009-06-24 01:23 1174Improved Session Tracking Septe ... -
jsessionid存在的问题及其解决方案
2009-06-24 00:29 3179jsessionid是Java Web Server( ... -
tomcat数据库连接池设置
2009-06-23 16:56 14441.Tomcat中的设置 2.我的工作目录在c:\eclip ... -
ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务
2009-06-23 16:47 25281. 首先查看tnsnames.ora ... -
webwork type等于redirect时的参数传递
2009-06-23 02:09 2161Webwork在使用result类型为redirect时,将会 ... -
js跨域问题小结
2009-06-11 15:43 1739js跨域问题小结 javascript出于安全方面的考虑,是不 ... -
Spring共享上下文机制
2009-05-19 15:53 3864对于Spring应用程序上下文的引用基本有两种形式 ... -
webwork result type之redirect&redirect-action
2009-05-09 17:49 3234可能大家都知道在webwork里面如果想重定向到另外一个 ... -
使用javascirpt获取JSON格式的日期
2009-05-08 14:00 1997在用json-lib里的net.sf.json.JSONO ... -
JQuery JSON异步请求中文乱码问题
2009-05-08 13:48 15867最近在用Jquery的getJSON方法进行AJAX异步调 ... -
webwork-2.1.7与Spring2.0整合
2009-05-03 14:00 1471这里使用随webwork2.2发布的ActionAutowir ...
相关推荐
5. lib:一些 JAR,JBoss 启动时加载,且被所有 JBoss 配置共享。 6. server:各种 JBoss 配置。每个配置必须放在不同的子目录中。子目录的名字表示配置的名字。JBoss 包含 3 个默认的配置:minimial、default 和 ...
- 当jBoss与其他应用程序(如Oracle)共享同一台机器时,可能会遇到端口冲突。例如,如果Oracle占用了8080端口,那么你需要修改jBoss的配置文件`server.xml`,位于`deploy/jbossweb-tomcat50.sar/`目录下,将8080...
JBoss 集群安装手册详细讲解了在Windows环境下如何设置和配置JBoss集群,以及利用Nginx实现负载均衡。以下是对主要内容的详细解析: 1. **引言** - **1.1 说明**:该文档适用于两台Windows Server 2008系统的环境...
### JBoss安装配置详解 #### 一、概述 JBoss是一款开源的应用服务器,适用于开发、部署和管理基于Java的企业级应用。本文档旨在提供一份详尽的JBoss安装配置手册,特别针对Windows操作系统下的安装与配置流程。...
5. **lib**:JBoss启动时加载的共享JARs,不建议在此处添加自定义库。 6. **server**:包含不同配置的子目录,如minimal、default和all。默认使用的是server\default配置。 - server/all:完全配置,启动所有服务...
本文详细介绍了中间件JBoss的环境搭建流程,包括JDK的选择与安装、JBoss的安装配置以及集群配置等内容。通过这些步骤,可以帮助开发者顺利完成JBoss环境的搭建,并为后续的应用开发奠定坚实的基础。需要注意的是,在...
6. **数据缓存**:JBoss包含Infinispan,一个高性能、分布式的内存数据网格,用于缓存和数据共享,提升应用性能。 7. **服务注册与发现**:使用EJB和JNDI(Java Naming and Directory Interface)进行服务注册和...
- lib目录:JBoss启动时加载的一般JAR文件,这些JAR文件可供所有配置共享。 - server目录:包含服务器配置文件,每个配置有独立的子目录。 - server/all目录:JBoss的完整配置,启动所有服务,包括集群和IIOP。 - ...
根据所提供的文件信息,本文将详细解析《Jboss安装配置手册_unix_.pdf》中的关键知识点,主要包括Jboss中间件的安装及配置过程。 ### JBoss中间件安装配置指南 —— JBoss for Unix #### 1. 概述 文档标题与描述均...
### JBoss 5.1.0.GA 安装指南知识点总结 #### 一、引言 本文档作为JBoss Enterprise Application Platform 5.0 的安装指南,详细介绍了该版本的相关信息及其安装流程。该指南适用于希望在企业环境中部署JBoss 5.1.0...
【JBoss安装配置详解】 JBoss是一款开源的应用服务器,它基于Java EE标准,提供了一个用于部署和管理企业级应用的平台。在本文中,我们将详细讲解如何安装和配置JBoss 4.2.1.GA版本。 **一、下载与安装** 首先,...
集群允许多个服务器共享状态,提供高可用性和负载均衡。配置包括成员发现、会话复制、负载均衡策略等。 7. **Web服务器集成**:JBOSS内嵌了Apache Tomcat作为默认的HTTP服务器,其配置在`standalone.xml`的`...
这里假设您已经安装了JBoss 4.0.5.GA版本,并且部署目录结构保持默认状态。 3. **修改端口号:** - 打开上述提到的`server.xml`文件。通常可以使用文本编辑器如vi或nano打开该文件: ```bash vi /opt/jboss-...
- `lib`:JBoss启动时加载的共享JARs,不建议在此处添加自定义库。 - `server`:包含不同配置的子目录,如`minimal`、`default`和`all`。默认使用`default`配置。 - `server/all`:全功能配置,包含集群和IIOP服务...
1. **安装与准备**:首先确保在多台Windows机器上安装相同版本的JBoss,保持环境一致。 2. **复制服务器配置**:将一个已配置好的JBoss实例作为模板,复制到其他机器上。修改每个实例的主机名和端口号以避免冲突。 ...