`
kylinsoong
  • 浏览: 240149 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Jboss-eap-5.1 starting up note

阅读更多

Jboss enterprise platform 5 have some big change compared with platform 4(Jboss-eap-4.3), to explore this changes, so we started our Jboss-eap-5.1 studying, this section we just point to platform 5's starting up.

Step 1: Pre-installation-Requisites

      From Jboss-eap-5.1 documents, there do not need some special requisite, compare with platform 4, the biggest change is JBoss Enterprise Application Platform 5 requires Java JDK1.6. this is very easy to accomplish, I installed jdk-6u21 to my pc as document decribed.

Step 2: Jboss-eap-5.1 installation

      The same operation like old version jboss installation, use green installing, just need unzip the zip file on you Disk, and its done. I am really care server folder structure, so navigate to this folder, this folder has been expended in platform 5 version 2 new folder has been added like bellow figure show:

    

 

Step 3 : pre-Starting up

      The same action like platform 4 jboss, we should do some Security Configure before we start up our jboss.

1> Edit the file $JBOSS_HOME/server/$PROFILE/conf/props/jmx-consoleusers.properties;

2> Create a username = password pair, use commended 'admin=admin', we just need remove '#'

3> If need someother configure we can do more, but in this test is enough.

Step 4: Starting up

      The same script 'run.bat' can be found under $JBOSS_HOME/bin, so triger the run.bat starting up jboss, unfortunately jboss crushed in the begining of start, the error as follow:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Press any key to continue . . .

 this is a very simple error:memory is not big enough, but intersting is there isn't any infomation about JVM starting Option in 'run.bat', check more careful find another difference with Jboss platform 4, 'run.conf.bat' can be found under $JBOSS_HOME/bin, open this batch file contains a series of configurable selections of JVM params, quickly I found the following line configuration:

JAVA_OPTS=-Xms1303m -Xmx1303m -XX:MaxPermSize=256m

 Obviously, this is for high performance Server machine, we need change this as the nexy line:

JAVA_OPTS=-Xms128m -Xmx512m -XX:MaxPermSize=128m

 exexute 'run.bat' again, and this time on the right way.

Step 5: Starting production

      In order to see more output info in jboss console, so before start production, we modify log4j.xml file where under $JBOSS_HOME/server/production/conf first.

then exexute 'run.bat' with params like start platform 4 Jboss, like following:

run.bat -c production -b 0.0.0.0

absolutlely, this times also on the right way, start production spend 40 minutes from concole output we can know.

Step 6: Test the installation

      Open http://192.168.1.103:8080/  in a web browser on the server machine, and the result The JBoss Enterprise Application Platform server homepage is displayed. the server homepage also has some differrence with eap-4.3: diffrerence interface layout, color decorated word, etc.

Step 7: View JMX-console

      Using http://192.168.1.103:8080/jmx-console/ can view new version Jboss JMX-console, By default, the JMX console is secured and will prompt you for a username and password, Use the username and password we defined in Step 3. The JMX Console is the JBoss Management Console which provides a raw view of the JMX MBeans which make up the server. They can provide a lot of information about the running server and allow you to modify its configuration, start and stop components and so on.

Step 8: Hot deployment service

      One of the Highlight features in Jboss is Hot-deployment service, Jboss plamtform 5 use absolute JMX Mbean control the  Hot-deployment service, Hot deployment of services in the server is controlled by the HDScanner MC bean configured in JBOSS_HOME\server\production\deploy\hdscanner-jboss-beans.xml as following:

<bean name="HDScanner" class="org.jboss.system.server.profileservice.hotdeploy.HDScanner">
        <property name="deployer"><inject bean="ProfileServiceDeployer"/></property>
        <property name="profileService"><inject bean="ProfileService"/></property>
        <property name="scanPeriod">60000</property>
        <property name="scanThreadName">HDScanner</property>
</bean>

 the default scanPeriod is set to 6 seconds.

Step 9: Add a local trasaction Datasource for Oracle DB

      Create a text file in the deploy directory named oracle-ds.xml with the following datasource descriptor:

<datasources>
  <local-tx-datasource>
    <jndi-name>HomeTestOracleDS</jndi-name>
    <connection-url>jdbc:oracle:thin:@192.168.1.105:1521:orcl</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>IPCUSER</user-name>
    <password>tibco</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
      <metadata>
         <type-mapping>Oracle10g</type-mapping>
      </metadata>
  </local-tx-datasource>
</datasources>

 Add this file to JBOSS_HOME\server\production\deploy folder restart server, and so far configuring datasource for Oracle DS has completed. to check added datasource we can through:

1. JMX-console jboss.jca module

2. JNDI View -> List -> java: Namespace

Step 10: Deploy an Web appliation to Jboss-eap-5.1

1. copy Oracle JBDC jar 'ojdbc14.jar' to JBOSS_HOME\server\production\lib

2. create homeTest-eap-5.1.war only contain a file 'index.jsp' as following:

 <%@page contentType="text/html"
import="java.util.*,javax.naming.*,javax.sql.DataSource,java.sql.*" %> <%
   
  DataSource ds = null;
  Connection con = null; 
  PreparedStatement pr = null; 
  InitialContext ic; 
  try {
  ic = new InitialContext();
  ds = (DataSource)ic.lookup( "java:/HomeTestOracleDS" );
  con = ds.getConnection(); 
  out.println("<br> " + con);
  }catch(Exception e){
  out.println("Exception thrown " +e); 
  }finally{
  if(con != null){
  con.close();
 }      
 } %>

 3. deploy homeTest-eap-5.1.war to JBOSS_HOME\server\production\deply, deploy successful info will be output from server console

 4. Test deploy result through http://192.168.1.103:8080/homeTest-eap-5.1/index.jsp

the following will turn out:



 As below show local transction connection has been created.

  • 大小: 14.6 KB
  • 大小: 2.7 KB
  • 大小: 1.7 KB
  • 大小: 1.3 KB
  • 大小: 2.8 KB
2
1
分享到:
评论
1 楼 stevenzuo 2012-09-26  
果然有效!

相关推荐

    jboss-eap-6.4.0.zip

    JBoss EAP 6.4 是 Red Hat 提供的一个企业级应用服务器,它基于 Java EE 6 规范,提供了全面的中间件服务,用于构建、部署和管理企业级应用程序。这个版本是 JBoss 产品线的一个关键里程碑,因为它包含了众多功能...

    jboss-eap-7.2.0.zip

    【JBoss EAP 7.2.0:企业级应用平台详解】 JBoss EAP(Enterprise Application Platform)是Red Hat公司推出的一款开源、基于Java EE(现在称为Jakarta EE)的应用服务器,它为企业级应用程序提供了稳定、安全和可...

    jboss-eap-fp-src-4.3.0.CP05_FP01.zip

    jboss-eap-fp-src-4.3.0.CP05_FP01.zip jboss-eap-fp-src-4.3.0.CP05_FP01.zip

    Jboss-EAP-6.4配置web工程,修改根目录,修改内存,修改端口

    最后,要更改Web工程的根目录,需要创建一个名为`jboss-web.xml`的文件,在`webroot/WEB-INF/`目录下。文件内容应包含`&lt;context-root&gt;`标签,用于定义Web应用的上下文路径。例如,设置`&lt;context-root&gt;/&lt;/context-...

    jboss-eap-7.2.6-patch

    - `jboss-eap-7.2.6.CP`: 这是 JBoss EAP 7.2.6 的累积补丁,它整合了从 7.2.1 到 7.2.5 的所有 GA 补丁,并可能额外包含其他修复或改进。 3. **应用补丁的过程** 应用 JBoss EAP 补丁通常涉及以下步骤: - 验证...

    jboss-eap-5.2.0.zip

    标题中的"jboss-eap-5.2.0.zip"指的是JBoss EAP的5.2.0版本的压缩包,这是在JDK 1.6环境下运行的。这个版本的发布对于那些需要维护或升级旧系统的开发者来说至关重要,因为它提供了对较早技术栈的支持。 **JBoss ...

    jboss-eap-6.2.0

    在使用JBoss EAP 6.2.0时,用户可以通过解压提供的“jboss-eap-6.2”压缩包文件来安装和配置服务器。这个压缩包内包含了完整的JBoss EAP 6.2.0安装文件,包括服务器二进制文件、配置文件、文档以及示例应用程序。...

    jboss-eap-6.3.0软件和源码.zip

    在本压缩包"jboss-eap-6.3.0软件和源码.zip"中,包含了JBoss EAP 6.3.0的完整安装文件以及源码,这对于开发者和系统管理员来说是非常宝贵的资源,可以深入理解其工作原理并进行定制化开发。 1. **JBoss EAP核心概念...

    jboss-eap-7.1.0

    JBoss EAP 7.1.0 是一个企业级的应用服务器,由Red Hat开发并维护,它是Java EE(现在称为Jakarta EE)平台的一个实现。这个版本提供了多种服务和功能,用于构建、部署和管理企业级Java应用程序。下面将详细讨论...

    jboss-eap-4.3webconsole无法登录的解决方案

    ### jboss-eap-4.3 webconsole无法登录的解决方案详解 #### 一、问题背景与现象 在项目开发过程中,有时会遇到需要使用特定版本的JBOSS应用服务器的情况。例如,在使用JBOSS EAP 4.3时可能会遇到无法登录Web ...

    linux-jboss-eap 集群搭建

    接下来,下载JBoss EAP 6.4.0的安装包`jboss-eap-6.4.0-installer.jar`,放置在`/home/Downloads`目录下。执行`java -jar jboss-eap-6.4.0-installer.jar`进行安装,根据提示设置安装路径和其他参数,包括管理员的...

    jboss-eap-7.0.0-installer

    jboss-eap-7.0.0-installer.jar~ ~

    jboss-logging-3.4.1.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.4.1.Final.jar; 赠送原API文档:jboss-logging-3.4.1.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.1.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.1.Final....

    jboss-threads-3.1.0.Final-API文档-中文版.zip

    赠送jar包:jboss-threads-3.1.0.Final.jar; 赠送原API文档:jboss-threads-3.1.0.Final-javadoc.jar; 赠送源代码:jboss-threads-3.1.0.Final-sources.jar; 赠送Maven依赖信息文件:jboss-threads-3.1.0.Final....

    jboss-logging-3.3.2.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.3.2.Final.jar; 赠送原API文档:jboss-logging-3.3.2.Final-javadoc.jar; 赠送源代码:jboss-logging-3.3.2.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.3.2.Final....

    jboss-logging-3.4.3.Final-API文档-中文版.zip

    赠送jar包:jboss-logging-3.4.3.Final.jar; 赠送原API文档:jboss-logging-3.4.3.Final-javadoc.jar; 赠送源代码:jboss-logging-3.4.3.Final-sources.jar; 赠送Maven依赖信息文件:jboss-logging-3.4.3.Final....

    jboss-annotations-api_1.3_spec-2.0.1.Final-API文档-中英对照版.zip

    赠送jar包:jboss-annotations-api_1.3_spec-2.0.1.Final.jar; 赠送原API文档:jboss-annotations-api_1.3_spec-2.0.1.Final-javadoc.jar; 赠送源代码:jboss-annotations-api_1.3_spec-2.0.1.Final-sources.jar;...

    jboss-eap-6.3.0

    JBoss EAP 6.3.0 是一个企业级的应用服务器,由Red Hat公司开发,是Java EE 6规范的实现。它提供了丰富的功能和工具,用于构建、部署和管理基于Java的应用程序。以下是关于JBoss EAP 6.3.0的一些关键知识点: 1. **...

    jboss-eap-7.4.0.zip

    JBoss EAP (Enterprise Application Platform) 7.4.0是一个Java应用服务器,提供了一套完整的开发、部署和管理企业级应用程序的解决方案。下面是对其解锁内容概要以及适合人群、使用场景和目标的简要说明: 解锁...

    Redhat openjdk11和jboss-eap-7.4.0

    综上所述,"Redhat openjdk11和jboss-eap-7.4.0"组合为企业级Java开发提供了一个强大且稳定的平台。OpenJDK11的先进特性和性能提升,加上JBoss EAP 7.4.0对Java EE 8的全面支持和丰富的管理功能,使得这个组合成为了...

Global site tag (gtag.js) - Google Analytics