国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

如何在JBoss+MySQL環境下運行obe

2019-11-18 13:02:36
字體:
來源:轉載
供稿:網友

  **************************************************
  *** 在JBoss+MySQL環境下運行obe       ***
  **************************************************
  
  我按照obe文檔的說明試著在JBoss+MySQL環境下運行obe程序,在部署obe程序后啟動JBoss,總是一堆的異常信息;我曾試過好幾個版本的JBoss(3.2.3/3.2.5/4.0.0)都沒有成功,從cvs下載最新的源碼后認真閱讀了obe的文檔,最后選擇了JBoss 4.0.1,并對ConfigurationPRoperties文件中使用的JBoss數據源配置進行了修改,當然我們也需要在JBoss中配置對應的數據源信息。
  
  ##################################################
  ### obe文檔中幾個要害的說明部分
  ##################################################
  
  1、關于運行obe的應用服務器(這是我們選擇應用服務器的依據)
  -----------------------------------------------------------------------------------------
  application Servers
  
  The OBE build system is highly configurable and can easily be adapted to run on any J2EE
  application server that is supported by XDoclet. The OBE server runtime is known to work
  with the following application servers:
  
  JBoss 3.2.3+
  JBoss 4.0.1+ (but not JBoss 4.0)
  WebLogic 7.x
  WebLogic 8.x
  Note that of these, only JBoss 4.0.1 supports Servlet 1.3 as required by the OBE Web-based
  Worklist Handler client
  ------------------------------------------------------------------------------------------
  
  2、運行obe的應用服務器的資源配置(這段內容說明了運行obe所需要的數據源、JMS隊列以及JAAS)
  ------------------------------------------------------------------------------------------
  Configure the application server, to ensure that the resources required by OBE will be available.
  The resources required include:
  
  One DataSource, JNDI name (default 'MySQLDS') to match
  Two JMS Queues, JNDI names 'OBEAsyncRequest' and 'OBEApplicationEvent'.
  One JAAS Configuration, default name 'other'
  ------------------------------------------------------------------------------------------
  
  3、關于運行obe的JBoss服務器的配置(這段內容說明了如何配置Jboss應用服務器)
  ------------------------------------------------------------------------------------------
  OBE provides some preconfigured resources for use with JBoss, under ${staging.dir}/j2ee/jboss.
  The conf and deploy Directories can be copied to the ${as.dir}/server/default directory - you
  will need to rename / edit the *-ds.xml data source definition file in the conf directory to
  suit your database type and connection properties. The 'default' server configuration should
  be adequate for most purposes. Do not use the 'minimal' server configuration - it does not provide
  all the J2EE container functionality required by OBE.
  
  Note that OBE provides a modified version of the Castor XML library that fixes certain critical bugs,
  so it is necessary either to delete the one that comes with JBoss in ${jboss.home}/server/default/deploy/snmp-adaptor.sar,
  or to replace it with the OBE version (castor-0.9.5.3.jar) if you wish to use the JBoss SNMP adaptor.
  This incompatibility is the result of the JBoss UnifiedClassLoader3 merging the classpaths of the
  various J2EE applications.
  ------------------------------------------------------------------------------------------
  
  ##################################################
  ### 運行環境說明
  ##################################################
  1、操作系統:Windows2000 pro
  2、JBoss(4.0.1):(http://sourceforge.net/project/showfiles.phpgroup_id=22866&package_id=16942&release_id=305380)
  3、MySQL(4.14):(http://www.mysql.com)
  4、JDBC驅動程序:我使用的是mysql-connector-java-3.1.7-bin.jar,最新的驅動程序可以在(http://dev.mysql.com/downloads/connector/j)下載
  
  ##################################################
  ### 從cvs上下載的obe源程序
  ##################################################
  1、cvs工具可以使用wincvs/TortoiseCVS
  
  2、下載方法(轉貼)
  --------------------------------------------------
  界面方式:
  認證方式:pserver
  路徑:/cvsroot/obe
  主機地址:cvs.sourceforge.net
  用戶名:anonymous
  登陸,密碼為空,檢出模塊為 .(注重:一個點,表示下載當前目錄下的所有東西)
  
  命令方式:
  $cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/obe login
  $cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/obe checkout .
  --------------------------------------------------
  
  ##################################################
  ### 在MySQL中創建運行obe需要的數據庫、用戶名和密碼
  ##################################################
  mysql>create database obe;
  mysql>grant all on *.* to obe@localhost identified by 'obe' with grant option;
  
  ##################################################
  ### 在JBoss中創建運行obe需要的數據源
  ##################################################
  
  obe文檔中指導我們在Jboss中配置的數據源名稱為MySQLDS,我試著在Jboss中配置這個數據源,但是配置后運行obe出現了其他的問題,所以我就參照Jboss的相關文檔把obe使用MySQL的數據源配置為DefaultDS,同時修改Jboss的相關配置讓這個數據源可以正常使用。下面就如何在Jboss中配置obe使用的DefaultDS數據源作具體說明。(注:在Jboss中,默認的DefaultDS數據源是hsql使用的)
  
  1、首先把我們要使用的JDBC驅動程序拷貝到$JBOSS_HOME/server/default/lib目錄下;
  
  2、然后拷貝$JBOSS_HOME/docs/examples/jca/mysql-ds.xml到$JBOSS_HOME/server/default/deploy目錄下;
  
  3、用文本編輯器打開mysql-ds.xml文件,搜索找到配置項[<jndi-name>MySqlDS</jndi-name>],修改該配置
  
  項為[<jndi-name>DefaultDS</jndi-name>],同時修改配置項[connection-url]、[driver-class]、[user-name]、
  
  [passWord]以符合我們自己的環境。下面是我修改完成后的mysql-ds.xml配置文件內容:
  ------------------------------------------------------------------------------------------
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- $Id: mysql-ds.xml,v 1.3.2.1 2004/12/01 11:46:00 schrouf EXP $ -->
  <!-- Datasource config for MySQL using 3.0.9 available from:
  http://www.mysql.com/downloads/api-jdbc-stable.Html
  -->
  
  <datasources>
  <local-tx-datasource>
  <jndi-name>DefaultDS</jndi-name>
  <connection-url>jdbc:mysql://localhost:3306/obe</connection-url>
  <driver-class>com.mysql.jdbc.Driver</driver-class>
  <user-name>obe</user-name>
  <password>obe</password>
  <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
  <!-- sql to call when connection is created
  <new-connection-sql>some arbitrary sql</new-connection-sql>
  -->
  <!-- sql to call on an existing pooled connection when it is oBTained from pool
  <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
  -->
  
  <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
  <metadata>
  <type-mapping>mySQL</type-mapping>
  </metadata>
  </local-tx-datasource>
  </datasources>
  ------------------------------------------------------------------------------------------
  4、由于$JBOSS_HOME/server/default/deploy目錄下的hsqldb-ds.xml文件配置的數據源也為DefaultDS,所以必須把這個文件刪除掉
  
  5、接下來配置Jboss的消息隊列以可以使用我們配置的DefaultDS(for MySQL)數據源。
  
  A、拷貝$JBOSS_HOME/docs/examples/jms/mysql-jdbc2-service.xml到$JBOSS_HOME/server/default/deploy/jms目錄下;
  
  B、同樣為了避免和hsqldb的沖突,需要把$JBOSS_HOME/server/default/deploy/jms目錄下的hsqldb-jdbc2-service.xml刪除掉;

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 关岭| 满洲里市| 进贤县| 双桥区| 淮南市| 昌乐县| 榆社县| 新巴尔虎左旗| 呼伦贝尔市| 遂宁市| 哈尔滨市| 久治县| 盘锦市| 抚顺市| 应用必备| 安化县| 明水县| 长顺县| 昆山市| 浑源县| 昌都县| 盘山县| 万安县| 新龙县| 腾冲县| 类乌齐县| 绥棱县| 图们市| 平阴县| 怀宁县| 青田县| 萍乡市| 栾城县| 化州市| 巴东县| 余姚市| 县级市| 兰州市| 蓝田县| 会泽县| 龙山县|