- 浏览: 236135 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
akka_li:
学习了!但是为什么后续的没有了?!
EJB4:RMI和RMI-IIOP -
springaop_springmvc:
apache lucene开源框架demo使用实例教程源代码下 ...
Lucene学习笔记(一)Lucene入门实例 -
qepipnu:
求solr 客户端 jar包
Solr学习笔记(三)Solr客户端开发实例 -
zhangbc:
是这问题,赞!
Oracle Start Up 2 Oracle 框架构件、启动、解决一个问题 -
feilian09:
查询 select hibernate jdbc 那个效率快
Hibernate,JDBC性能探讨
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.
发表评论
-
Oracle - Add Exist Validation Before Create Table
2011-11-07 13:49 1404Usually we need to check the ta ... -
JMX Architecture & "Hello Word" the JMX way
2011-10-25 20:07 1746JMX Architecture Overview: JMX ... -
Jboss-eap-5.1 Messaging
2011-08-02 21:50 2400This section I will concertate ... -
EJB Security & JAAS Demo
2011-05-21 19:39 1575PROLOGUE: When deploying ... -
JBoss LoginInitialContext Factory Implementation
2011-05-15 16:05 1466Jboss has a series of imp ... -
Jboss Reference Exception Gallery
2011-04-27 14:08 28491. Unable to locate a login con ... -
Hibernate Annotation 的一个问题,给点意见
2011-03-10 12:43 22问题:org.hibernate.annotations. ... -
大家说说BBC的网站用的是什么技术做的
2011-02-22 05:01 1394最近在英国出差,发现这里的一些网站做的相当有特色,有些网站不是 ... -
Hibernate OneToMany 单向和双向配置对数据存取性能的比较
2011-02-08 17:06 22421. 开篇说明:今天是春 ... -
对Hibernate属性(CascadeType、JoinColumn、JoinTable、ForeignKey等)的研究
2010-12-26 15:45 16604本文列出几个“EJB 学习阶段总结:JBoss下发布一个Toy ... -
EJB 学习阶段总结:JBoss下发布一个Toy企业应用
2010-12-25 12:11 2549解释题目:为什 ... -
EJB7: Message Driven Bean
2010-12-21 22:42 2098在企业系统中需要使用 ... -
EJB6: EntityBean例子
2010-11-26 14:48 1441本例子描述向EJB容器(JBoss)部署http: ... -
JPA dev: 几个问题总结(续)
2010-11-25 18:02 24052. 如何由PoJo类生成数据库中的表 首先可以根据实体间关 ... -
JPA dev: 几个问题总结
2010-11-25 16:56 3350最近工作中遇到几个与JPA相关的问题,本文通过一个例子总结一下 ... -
JAXB学习
2010-11-24 22:35 01 什么是JAXB? JAXB全称Java Ar ... -
EJB5: JPA扩展-J2SE环境下使用EntityManager
2010-11-10 19:07 2641好久没有写博客了,最近比较忙,今天抽时间写点,最近 ... -
EJB4:RMI和RMI-IIOP
2010-11-02 21:14 4066计划提纲:引入→RMI概念→RMI HelloWorld程序→ ... -
EJB3: JBOSS 企业版、JBOSS服务器构架、EJB2.0 HelloWrold实例
2010-10-26 22:43 6414本文的研究基于jboss-eap- ... -
jboss-eap-4.3 启动停止在Configuring from URL: resource:jboss-log4j.xml 问题
2010-10-25 14:49 4006如题,我改用jboss-eap-4.3, 启动时停止在Conf ...
相关推荐
jboss-eap-6.4.0.zip
jboss-eap-7.1.0 jboss-eap-7.1.0 jboss-eap-7.1.0 jboss-eap-7.1.0 jboss-eap-7.1.0
jboss-eap-fp-src-4.3.0.CP05_FP01.zip jboss-eap-fp-src-4.3.0.CP05_FP01.zip
jboss-eap-6.2.0,javaweb的服务器,性能稳定, 比jboss4更好用
jboss-eap-7.2.0 jboss企业版7.2,官网速度慢,在csdn备份后续可用...
jboss-eap-6.3.0软件和源码.zip
linux下jboss-eap搭建应用服务器集群。JBoss-EAP-6.4.0 域(Domain)模式+mod_cluster-1.2.6 集群环境配置
jboss-eap-5.0.2.zip,来自于官网,因为改动代码需要用到比较老的jboss-eap包,所以自己找到了这个资源,免费共享给大家,适用于JDK1.6
jboss-eap-7.2.6-patch,jboss补丁包
jboss-eap-6.3.0 ,windows 64位 安装包,可用的,欢迎下载
本资源举例FineReport,若有帮助,望好评一下下啦,谢谢
jboss-eap-7.0.0-installer.jar~ ~
Redhat openjdk11和jboss-eap-7.4.0
赠送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....
赠送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....
赠送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-eap-4.3,因此下载了一个安装试试。 安装完运行run.bat启动,然后登陆http://localhost:8080/web-console/,弹出登录对话框,奇怪的是,无论输入什么用户名和密码,admin=admin也好,空也好...
赠送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 (Enterprise Application Platform) 7.4.0是一个Java应用服务器,提供了一套完整的开发、部署和管理企业级应用程序的解决方案。下面是对其解锁内容概要以及适合人群、使用场景和目标的简要说明: 解锁...
JBoss AS快速入门 简介:快速入门演示了Java EE 6和JBoss堆栈中的一些其他技术。 它们提供了小的,具体的工作示例,可以作为您自己项目的参考。 介绍 这些快速入门可以在JBoss企业应用平台6和JBoss AS 7上运行。如果...