- 浏览: 270548 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
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 1345Servlet 3.0中最主要的两个新特性总结如下: 改变了 ... -
Java中wait与notify方法的使用
2010-05-22 14:09 9460在java多线程编程中 ... -
MySql批量插入数据
2010-04-05 15:55 10642在实际的开发过程中,特别是大型的分布式应用系统,往往会涉 ... -
去掉对Spring BeanFacotry的getBean方法的依赖
2009-12-27 23:52 2710在使用Spring时,有时会碰到这种情况: 引用需要在 ... -
通过HttpServletRequestWrapper解决Tomcat请求乱码问题
2009-11-16 23:08 2215应用一:解决tomcat下中文乱码问题(先来个简单的) 在t ... -
相对路径获取Tomcat Web容器中的资源
2009-08-20 21:36 14417最近做项目碰到个问题,我需要利用velocity模版来渲染 ... -
Jboss是数据源配置
2009-08-16 15:38 2008配置Jboss的数据源非常简单,可以从$JBOSS_HOME\ ... -
Jboss 4.x 端口及其修改
2009-08-07 14:49 2797注:本文中所述内容适合于Jboss 4.x系列应用服务器。 ... -
Tomcat热部署
2009-06-24 20:33 3775使用过tomcat的人都知道 ... -
Improved Session Tracking
2009-06-24 01:23 1146Improved Session Tracking Septe ... -
jsessionid存在的问题及其解决方案
2009-06-24 00:29 3117jsessionid是Java Web Server( ... -
tomcat数据库连接池设置
2009-06-23 16:56 14001.Tomcat中的设置 2.我的工作目录在c:\eclip ... -
ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务
2009-06-23 16:47 24911. 首先查看tnsnames.ora ... -
webwork type等于redirect时的参数传递
2009-06-23 02:09 2130Webwork在使用result类型为redirect时,将会 ... -
js跨域问题小结
2009-06-11 15:43 1698js跨域问题小结 javascript出于安全方面的考虑,是不 ... -
Spring共享上下文机制
2009-05-19 15:53 3828对于Spring应用程序上下文的引用基本有两种形式 ... -
webwork result type之redirect&redirect-action
2009-05-09 17:49 3205可能大家都知道在webwork里面如果想重定向到另外一个 ... -
使用javascirpt获取JSON格式的日期
2009-05-08 14:00 1969在用json-lib里的net.sf.json.JSONO ... -
JQuery JSON异步请求中文乱码问题
2009-05-08 13:48 15831最近在用Jquery的getJSON方法进行AJAX异步调 ... -
webwork-2.1.7与Spring2.0整合
2009-05-03 14:00 1434这里使用随webwork2.2发布的ActionAutowir ...
相关推荐
现在很多公司都用novell的suselinux来做服务器的操作系统,在安装网页服务器的时候经常会遇到许多问题。这里我拿一个我们公司安装jboss的手册来供大家共享。
Nginx 1.2.1 + JBOSS AS 7 负载配置及Session处理
lib 一些 JAR , JBoss 启动时加载,且被所有 JBoss 配置共享。(不要把你的库放在这里) server 各种 JBoss 配置。每个配置必须放在不同的子目录。子目录的名字表示配置的名字。 JBoss 包含 3 个默认的配置: ...
NULL 博文链接:https://yy-danvip.iteye.com/blog/366446
JBOSS架构分析, 介绍JOBSS架构文章,想了解请下载,资源共享!
单个只能60所以分了三块
jboss-eap-5.0.2.zip,来自于官网,因为改动代码需要用到比较老的jboss-eap包,所以自己找到了这个资源,免费共享给大家,适用于JDK1.6
经常需要用到的jboss的源码,但是想用时却总是找不到,这回放上来给大家共享,免得用时到处找
JBoss管理与开发 JBoss JMX实现架构 一个很专业的jboss教程 给大家共享一下
一些很老的资源,太难找了,共享共享。 一些很老的资源,太难找了,共享共享。
公司需要做 Apache Tomcat集群,研究了数日,终配置成功,把研究结果共享一下。 最下面的红色字体[在一台机器上启动两个JBoss服务器],不同机器端口和路径不同,可根据自己情况适当修改。
jcors.zip,Java的跨源资源共享用于在Java Web应用程序上启用跨源资源共享(CORS)的简单筛选器
JBoss EAP (Enterprise Application Platform) 7.4.0是一个Java应用服务器,提供了一套完整的开发、部署和管理企业级应用程序的解决方案。下面是对其解锁内容概要以及适合人群、使用场景和目标的简要说明: 解锁...
jboss7与ejb3的环境搭建 刚刚开始学习ejb3 由于jboss7的改动使得网上很多的方法都行不通 再此找到一篇能够搭建成功的文档 共享一下
此文档从新浪下载,个人觉得不错,共享出来给正在学习JBoss集群的人以参考。
最近看了一下JBOSS-5.0.0GA的集群搭建的文档,于是把自己的理解发上来和大家共享一下。不过还是有好多问题需要和大家,共同讨论一下
学习Struts时,多说孙卫琴的精通Struts基于MVC的Java.Web设计与开发>>比较基础,但是附带光盘中没有“jboss-3.2.1_tomcat-4.1.24.zip“软件,现在把软件的下载地址共享了。(为了中国的软件行业)
官方网站藏的有点深,而且网站访问实在有些慢,传这里共享
JBoss, OpenOffice等第三方软件设置而成的文档共享与发布平台。 系统的主要特色为一下: 1、支持文档的在线预览。 2、文档在线预览转换支持线程的监听与控制,应对非法大文件的攻击 3、文档存储采用虚拟目录,保证...
弹簧全局上下文这个项目展示了如何让 JBoss 模块能够在 Wildfly 下的 web 应用程序之间共享单个 Spring 上下文