欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
JBOSS3.x 學(xué)習筆記
JBOSS3.x 學(xué)習筆記
作者:Thatway (outhatway@hotmail.com)
來(lái)自:http://www.hibernate.org.cn


目 錄

一. 運行環(huán)境 2
二. 準備工作 2
三. 安裝 2
四. 配置實(shí)例xPetStore 2
五. 結束語(yǔ) 8


一. 運行環(huán)境
操作系統:Windows 2000
應用服務(wù)器:Jboss3.x
數據庫:MySQL4.x
虛擬機: SUN JDK1.4.x

二. 準備工作
1.請安裝JDK1.4.x版本,設置JAVA_HOME變量,并把“%JAVA_HOME%\bin”加入Path中。
2.請下載Jboss3.x。主站地址http://www.jboss.org/。
3.請下載并安裝MySQL4.x。主站地址http://www.mysql.org/。


三. 安裝
1. 把壓JBOSS下載文件解壓。本文假設解壓后路徑為C:\Work\jboss-3.2.2RC2。
2. 設置JBOSS_HOME變量。進(jìn)行命令窗口,運行bin目錄下的run.bat命令。請注意后臺有沒(méi)有拋出異常。
3. 約半分鐘后啟動(dòng)完畢,請訪(fǎng)問(wèn)http://localhost:8080/jmx-console/。如果成功顯示頁(yè)面,說(shuō)明安裝成功。
4. 進(jìn)行命令窗口,運行bin目錄下的shutdown.bat -S命令可以停止JBOSS。


四. 配置實(shí)例xPetStore
1. 創(chuàng )建JBOSS“xpetstore”服務(wù)
在JBOSS_HOME/server/下新建目錄xpetstore,并把JBOSS_HOME/server/default下的內容拷貝到xpetstore下。

2. 配置JMS
Create JBOSS_HOME\server\xpetstore\deploy\jms\jbossmq-destinations-xpetstore-service.xml to create JMS queues queue/order and queue/mail.

This xml file should look like this:
java代碼: 


<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: jbossmq-destinations-xpetstore-service.xml,v 1.0 2003-8-11 15:47 et Exp $ -->

<server>
  <!-- Destination without a configured SecurityManager or without a
       a SecurityConf will default to role guest with read=true, write=true,
       create=false.
  -->

  <mbean code="org.jboss.mq.server.jmx.Queue"
        name="jboss.mq.destination:service=Queue,name=order">
    <attribute name="JNDIName">queue/order</attribute>
    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
  </mbean>
 
  <mbean code="org.jboss.mq.server.jmx.Queue"
        name="jboss.mq.destination:service=Queue,name=mail">
    <attribute name="JNDIName">queue/mail</attribute>
    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
  </mbean>

</server>



3. 配置JDBC
Copy the JDBC driver to JBOSS_HOME/server/xpetstore/lib。
Rename JBOSS_HOME/server/xpetstore/deploy/hsqldb-ds.xml to mysql-ds.xml.
Edit mysql-ds.xml to create the datasource java:/xpetstoreDS。

JBOSS_HOME/server/xpetstore/deploy/mysql-ds.xml should look like this:
java代碼: 


<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: mysql-ds.xml,v 1.0 2003-8-11 15:56 et Exp $ -->


<datasources>
  <local-tx-datasource>
 
    <depends>jboss:service=Hypersonic</depends>
 
    <jndi-name>xpetstoreDS</jndi-name>
    <connection-url>jdbc:mysql://localhost/xpetstore</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>thatway</user-name>
    <password>thatway</password>
    <min-pool-size>5</min-pool-size>
    <security-domain>HsqlDbRealm</security-domain>
  </local-tx-datasource>

  <!-- this mbean should be used only when using tcp connections -->
  <mbean code="org.jboss.jdbc.HypersonicDatabase"
        name="jboss:service=Hypersonic">
    <attribute name="Port">1701</attribute>
    <attribute name="Silent">true</attribute>
    <attribute name="Database">default</attribute>
    <attribute name="Trace">false</attribute>
    <attribute name="No_system_exit">true</attribute>
  </mbean>
 
</datasources>



4. 配置JavaMail
Create the MailSesion java/:Mail.

Make sure that JBOSS_HOME/server/xpetstore/deploy/mail-service.xml look like this:
java代碼: 


<server>
  <classpath codebase="lib"
             archives="mail.jar, activation.jar, mail-plugin.jar"/>

  <mbean code="org.jboss.mail.MailService"
         name="jboss:service=Mail">
    <attribute name="JNDIName">Mail</attribute>
    <attribute name="User">your-user-name</attribute>
    <attribute name="Password">your-password</attribute>
    <attribute name="Configuration">
       <configuration>
          <property name="mail.store.protocol" value="pop3"/>
          <property name="mail.transport.protocol" value="smtp"/>
          <property name="mail.user" value="your-username"/>
          <property name="mail.pop3.host" value="your-pop3-host"/>
          <property name="mail.smtp.host" value="your-smtp-host"/>
          <property name="mail.from" value="noreply@xpetstore.sourceforge.net"/>
          <property name="mail.debug" value="false"/>
       </configuration>
    </attribute>
  </mbean>
</server>




5. 啟動(dòng)JBOSS
cd JBOSS_HOME/bin
run.bat -c xpetstore

6. 指定xPetStore的應用服務(wù)器
Download and unzip the xpetstore3.1.x file.
Edit the file XPETSTORE_HOME/conf/as/appserver.properties and set the property app.server=jboss. You may want to review XPETSTORE_HOME/conf/as/jboss.properties to make sure that all the properties are properly set.

7. 指定數據庫
Edit the file XPETSTORE_HOME/conf/db/database.properties and set the property db.name=mysql.
Edit the file XPETSTORE_HOME/conf/db/mysql.properties to configure the database.You must set the following properties:
db.driver
db.url
db.user
db.password
db.classpath
PS: Don‘t change the hibernate properties.

8. Build源代碼
cd XPETSTORE_HOME/xpetstore-servlet
run build.bat

This command will :
Generate Java code in XPETSTORE_HOME/xpetstore-servlet/build/java
Generate the deployment descriptors at XPETSTORE_HOME/xpetstore- servlet/build/META-INF and XPETSTORE_HOME/xpetstore- servlet/build/WEB-INF
Compile the source code and build .jar, .war and .ear files at XPETSTORE_HOME/dist

經(jīng)測試,事實(shí)上這樣build是不足夠的,在發(fā)布運行的過(guò)程中會(huì )出錯。但考慮到官方文件是這樣說(shuō)的,并且這些的確是正確的主要步驟。之所以不能運行,完全是“意外”問(wèn)題。因此,我們暫且跳過(guò),到運行時(shí)再把步驟補全。

9. 發(fā)布應用
build.bat deploy

10. 初始化數據庫
build.bat db

11. 運行應用
http://localhost:8080/xpetstore-servlet/


12. 意外錯誤排除
第一次build的過(guò)程會(huì )拋出xpetstore-servlet\build\META-INF not found的錯誤。此時(shí),可以手工在相應目錄建立META-INF文件夾。再運行build。

再發(fā)布時(shí)會(huì )拋出錯誤:Exception processing TLD at resource path /META-INF/taglib.tld。此時(shí),可以手工將XPETSTORE_HOME\lib\main\com.opensymphony.module.webwork\webword.jar\META-INF中的taglib.tld 拷貝到XPETSTORE_HOME\xpetstore-servlet\web\META-INF目錄下。(META-INF是手工建立的)。再編輯XPETSTORE_HOME\xpetstore-servlet\build.xml,在“WAR”欄加入以下語(yǔ)句把taglib.tld拷貝進(jìn)war中。再運行build。
java代碼: 


                    <!-- Added by thatway 2003-8-5 13:40-->
                      <metainf dir="${web.dir}/META-INF">
                              <include name="**/*" />
                      </metainf>
                    <!-- END -->



發(fā)布時(shí)還會(huì )提出錯誤,主要原因是Hibernate getConnection時(shí)不能通過(guò)JBOSS的安全驗證。此時(shí),要修改JBOSS_HOME/server/xpetstore/conf/login_config.xml和JBOSS_HOME/server/xpetstore/deploy/mydql_ds.xml。
先說(shuō)login_config.xml。參照HsqlDbRealm段,添加如下代碼。
java代碼: 


    <application-policy name = "MysqlDbRealm">
       <authentication>
          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
             flag = "required">
             <module-option name = "principal"></module-option>
             <module-option name = "userName"></module-option>
             <module-option name = "password"></module-option>
             <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=xpetstoreDS</module-option>
          </login-module>
       </authentication>
    </application-policy>



再到mysql_ds.xml。修改security-domain值。
<security-domain>MysqlDbRealm</security-domain>


注意1:修改login-config.xml需要重啟JBOSS才生效;修改mysql.xml則不必。
注意2:調試的過(guò)程中必然會(huì )多次重啟JBOSS,如果xpetstore還沒(méi)有發(fā)布成功的話(huà),重啟前請刪除deploy目錄下的xpetstore發(fā)布文件。


五. 結束語(yǔ)
至此,我們的痛苦就結束了。請訪(fǎng)問(wèn) http://localhost:8080/xpetstore-servlet/ 看一看自己辛勞的成果。如果還運行失敗,請聯(lián)系我。

此番配置有兩個(gè)目的,一是熟悉JBOSS,二是便于學(xué)習xpetstore源代碼。第一個(gè)目標我們是達到了,但第二個(gè)目標現在才開(kāi)始,所以讓我們一起共勉,繼續努力。
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
JBossAS Tuning Sliming jboss 瘦身配置
Jboss 配置數據源和JMS主題與隊列 - myth
提高EJB性能的十大技巧
JBoss ESB-jBPM集成
jboss配置文件的簡(jiǎn)單介紹 - JAVA流通橋 - BlogJava
jboss4.0安裝及duke‘s bank部署心得
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久