@Send to @Consumer 沒測試成功,請benq百忙之中指點一下
今天下載了jdonframework-6.8進行試用。
首先, 建了一個Model
第二, 建了一個Consumer
第三,建了一個Service介面,並實現
第四,建了一個client,
最後,執行client,發現MyDomainEventHandler.onEvent()沒有執行。
請大家幫我看看,是我哪兒沒做對?
首先, 建了一個Model
@[author]Model[/author] @[author]Introduce[/author]("message") public class My[author]Model[/author]{ private String id; private String name; @[author]Send[/author]("myMethod.has.done") public DomainMessage myMethod(){ System.out.println("myMethod are doing..."); DomainMessage dm = new DomainMessage(this.name); return dm; } } <p class="indent"> |
第二, 建了一個Consumer
@[author]Consumer[/author]("myMethod.has.done") public class MyDomainEventHandler implements DomainEventHandler { @[author][author]Override[/author][/author] public void onEvent(EventDisruptor arg0, boolean arg1) throws Exception { System.out.println("I just received a message: 'myMethod.has.done'"); } } <p class="indent"> |
第三,建了一個Service介面,並實現
public interface MyService { public void doit(); } <p class="indent"> |
@[author]Component[/author]("myService") public class MyServiceImpl implements MyService { @[author][author]Override[/author][/author] public void doit() { My[author]Model[/author] mm = new My[author]Model[/author](); mm.myMethod(); } } <p class="indent"> |
第四,建了一個client,
public class Client { public static void main(String[] args){ AppUtil appUtil = new AppUtil(); MyService ms = (MyService)appUtil.get[author]Component[/author]Instance("myService"); ms.doit(); } } <p class="indent"> |
最後,執行client,發現MyDomainEventHandler.onEvent()沒有執行。
請大家幫我看看,是我哪兒沒做對?
[該貼被javaGhost於2013-12-23 21:56修改過]
[該貼被javaGhost於2013-12-23 21:59修改過]
[該貼被javaGhost於2013-12-23 22:02修改過]
[該貼被javaGhost於2013-12-23 22:03修改過]
[該貼被javaGhost於2013-12-23 22:07修改過]
相關文章
- 請benq大哥說得明白點,謝謝ENQ
- benq,你好!框架中有關 getDataSource()問題請教一下ENQ框架
- 系統測試成功的關鍵點
- Jmin框架包已開源,請Banq老師指點一下框架
- 請bang大哥指點一下JBoss的jaas授權過程!
- 關於快取的問題,請板橋大哥指點一下快取
- 請問一下大家,客戶端做 UI 自動化測試有沒有好的方案客戶端UI
- > 測試一下
- 效能測試之測試指標指標
- 請教benq資料庫設計ENQ資料庫
- 請教指點,工作迷茫
- 關於DIP原則中介面的放置問題,請大家指點一下。
- 請高手指點一下啊
- 效能測試指標指標
- 測試安裝是否成功
- benq大哥,幫忙,請進入,謝謝!ENQ
- phpunit測試成功phpunit測試實踐程式碼PHP
- Burpsuite安全測試測試指導UI
- 效能測試有哪些指標需要測試?指標
- 關於就業的兩個方向選擇,想請教一下benq和各位前輩就業ENQ
- 關於學習jdon框架cache的疑問,請banq老師指點一下。框架
- 面試問到測試方法論完全懵逼,請問一下測試方法論到底 是什麼面試
- 前端呼叫介面成功但後端沒收到請求前端後端
- 求大神指點思路-python 自動化介面測試Python
- 軟體效能測試常見指標。在哪裡測試測試?指標
- 敏捷測試關鍵成功因素敏捷測試
- Django 測試是否安裝成功Django
- 模式新手的FACTORY看法。請指點模式
- 剛用java請教高人指點!!!Java
- OTT 方面的測試,有沒有熱 做過系統一點的測試,求指教。
- 請bang及各位高手指點一下
- 懇請benq指點:JBoss中cmr時複合關鍵字類的foreign keys mapping問題,線上等待!ENQAPP
- 關於repaint()問題,大家請指點AI
- 上雲測試,這些關鍵點你get 到沒有
- 有沒有一種自動化測試是不需要編寫測試指令碼的呢?瞭解一下指令碼
- 網路測試儀測試交換機的基本指標指標
- 請教各位元件化、paas 化得測試,採用什麼樣的測試方法,大家有這方面測試的希望多交流一下元件化
- redis測試點Redis