- JBoss:Developer's Guide
- Elvadas Nono Woguia
- 221字
- 2021-07-02 18:37:29
Session replication demo
Once the application is deployed, perform the following steps:
- Open the application link from node13 http://localhost:8380/beosbank-web/.
- Fill the money transfer details and click on Next to select the payment options:
- Sender Country: France
- Receiver Country: Cameroon
- Amount to send: 100
- Sender: Noe Nono
- Receiver: Michele Bertille

- Click on the Next button to reach the Payment Infos tab:
- Fill the credit card number field with the value: 000-1111-2222 3333
- Click on the Next button.
- Try to open the application URL from the second node of the group (host2:node23) in another tab of your browser--http://localhost:8780/beosbank-web/:

You will automatically arrive on the first tab with data entered from the node13 session:
- Sender Country: France
- Receiver Country: Cameroon
- Amount to send: 100
- Sender: Noe Nono
- Receiver: Michele Bertille
The session you started on node13 session has been replicated on node23; if you shut down one node, the caller can still find this data from the other node:
[domain@127.0.0.1:9999 /] /host=host1/server=node13:stop
{"outcome" => "success",
"result" => "STOPPING"
}
http://localhost:8380/beosbank-web/ => KO
http://localhost:8780/beosbank-web/ => OK
With this configuration, in order avoid request failures, the caller has to implement a failover process to automatically switch to a running node when the current node goes down. This approach makes the client code become strongly coupled to the server instance URLs.
推薦閱讀
- Visual C++程序設(shè)計(jì)教程
- JavaScript前端開發(fā)模塊化教程
- 嵌入式軟件系統(tǒng)測(cè)試:基于形式化方法的自動(dòng)化測(cè)試解決方案
- Docker技術(shù)入門與實(shí)戰(zhàn)(第3版)
- QGIS:Becoming a GIS Power User
- 深入剖析Java虛擬機(jī):源碼剖析與實(shí)例詳解(基礎(chǔ)卷)
- Mastering Web Application Development with AngularJS
- RubyMotion iOS Develoment Essentials
- Hacking Android
- PHP 8從入門到精通(視頻教學(xué)版)
- jQuery從入門到精通(微課精編版)
- Building Clouds with Windows Azure Pack
- Java EE程序設(shè)計(jì)與開發(fā)實(shí)踐教程
- Learning QGIS(Second Edition)
- 算法(第4版)