<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Knight of the round table

    wansong

    jboss JMS clustering

    http://community.jboss.org/wiki/JMSClusteringByExample

    http://community.jboss.org/wiki/JBossHA

    http://docs.jboss.org/jbossas/getting_started/v4/html/mdb.html
    http://carter.zhmy.com/archives/2007/112108.html


    Computer A:
    $ cd $JBOSS_HOME/bin
    $ ./run.sh -c all -b 192.168.0.143 -Djboss.messaging.ServerPeerID=1

    Computer B:
    $ cd $JBOSS_HOME/bin
    $ ./run.sh -c all -b 192.168.0.210 -Djboss.messaging.ServerPeerID=2


    It is necesary to give an ID to each server and this is accomplished with this directive:
    -Djboss.messaging.ServerPeerID

    When you start the jboss on computer A, you should see the logs (server.log) telling you that there is one node ready and listening, and once you start the jboss on computer B, on the log will appear the two nodes, the two IP's ready to consume messages.

    5) Now it's time to send a Message to the Queue. To accomplish this it's necessary to change the connection factory to "ClusteredConnectionFactory" (JMSDispatcher.java - See the code below).
    Also on the jndi.properties (if you are using the default InitialContext) file it's necessary to add the two computers ip's separated by comma to the java.naming.provider.url property. (In my case a create a Properties variable and I set all the necessary properties, JMSDispatcher.java - see the code below).

     

    java.naming.provider.url=192.168.0.143:1099,192.168.0.210:1099

    The client that I wrote is a web application, that consist in one index.jsp page, which contains a form that prompts you for the name of the queue, the type of messaging (Queue or Topic), the server ip and port, how many times it will send the message and the actual message to be sent; also the web application has a Servlet (JMSClusteredClient.java - see code below) that receives the postback and helper class (JMSDispatcher.java - see code below) that sends the message to the jboss servers.  You can to deploy it in any computer. In my case I deployed it on the Computer A. And you can access it through this URL: http://192.168.0.143:8080/JMSWeb/ (just modify the IP where the client war was deployed).If you notice (on the index.jsp - code below) I've already put some default values that reflects the name of the Queue, and the IP's of my two computers. Now, If you increment the number of times that the message will be sent (maybe a 10) and fill out the message box, and click "Send" you should see on the two servers some of the messages being consumed by the MDB.

    posted on 2011-09-15 19:48 w@ns0ng 閱讀(338) 評論(0)  編輯  收藏 所屬分類: jbossDistributed & Cluster

    主站蜘蛛池模板: 久久亚洲综合色一区二区三区| 亚洲美女视频免费| 免费jjzz在在线播放国产| 亚洲成人免费电影| 成人免费观看一区二区| 亚洲乱码在线播放| 成人五级毛片免费播放| 亚洲一级特黄特黄的大片| 在线播放免费人成视频在线观看| 精品亚洲成A人无码成A在线观看| 国产无人区码卡二卡三卡免费 | 亚欧免费一级毛片| 亚洲一区二区影院| 4虎永免费最新永久免费地址| 亚洲国产片在线观看| 成人免费无遮挡无码黄漫视频| 亚洲无人区码一二三码区别图片| 大学生a级毛片免费观看| 狼人大香伊蕉国产WWW亚洲 | 亚洲国产a∨无码中文777| 精品免费视在线观看| 亚洲网址在线观看| 成人最新午夜免费视频| 免费人成再在线观看网站| 亚洲午夜久久久久久久久电影网 | 亚洲国产精品久久久久秋霞影院| 久久精品免费一区二区喷潮| 亚洲AV无码一区二区三区电影 | 立即播放免费毛片一级| 亚洲欭美日韩颜射在线二| 无码中文字幕av免费放dvd| 国产婷婷综合丁香亚洲欧洲| 亚洲 无码 在线 专区| 国内精品免费视频精选在线观看| 久久亚洲国产精品成人AV秋霞| 成人一a毛片免费视频| 中文字幕不卡免费高清视频| 亚洲一级高清在线中文字幕| 免费在线观看视频a| 2022久久国产精品免费热麻豆| 黄网站在线播放视频免费观看 |