[jboss-dev-forums] [JBoss ESB Development] New message: "NotifyServices - Consolidating notification targets"

Vijay Ratnagiri do-not-reply at jboss.com
Fri Feb 5 15:53:01 EST 2010


JBoss development,

A new message was posted in the thread "NotifyServices - Consolidating notification targets":

http://community.jboss.org/message/524488#524488

Author  : Vijay Ratnagiri
Profile : http://community.jboss.org/people/vijay911

Message:
--------------------------------------------------------------
Hello,
 
I was going through the JBoss ESB developers guide and I did notice that JBoss does not recommend using the Notifier to notify ESB aware services. But I see some value in consolidating all the notification targets at one place instead of taking one approach - namely, using the Notifier -- to notify all types of endpoints while using another approach - namely, using the ServiceInvoker from withing the action handlers - to notify a ESB aware service.
 
So, I set about writing a NotifyServices Class that facilitates adding one or more notification targets that are ESB aware services. Here is an example configuration snippet of how you would add:
 
<target class="NotifyServices">
  <!-- If notification to this service fails, an exception will be thrown
      and an error will be logged. -->
  <logicalEPR category="<exampleCategory2>" name="<exampleName2>" />
  <logicalEPR category="<exampleCategory1>" name="<exampleName1>" 
      errorOnFail="false" />
</target>


I have unit tested the NotifyServices class and when I supply it with a ConfigTree that would be constructed from the XML in the above snippet, it works great.
 
Now, the problem is when, I try to actually integration test it by having it be instantiated by the Notifier class in the actual system flow. For some reason, when I say: ConfigTree[] servicesToBeNotified = configTree.getChildren(LOGICAL_EPR_TAG); where LOGICAL_EPR_TAG is public static final String LOGICAL_EPR_TAG = "logicalEPR";, I don't get the expected array. I get an empty array.
 
I was wondering if someone could help me with this issue. I'll attach the source code for the classes and the unit test.
 
Thank you very much in advance.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/524488#524488




More information about the jboss-dev-forums mailing list