Tom Fennelly [
http://community.jboss.org/people/tfennelly] replied to the discussion
"Annotation based Action classes"
To view the discussion, visit:
http://community.jboss.org/message/542781#542781
--------------------------------------------------------------
I commited what I have on this to a workspace in SVN:
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/workspace/tfennelly/ann...
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/workspace/tfennelly/ann...
I modified the http_gateway quickstart as one example:
*
http://fisheye.jboss.org/browse/JBossESB/workspace/tfennelly/annotated_co...
before
*
http://fisheye.jboss.org/browse/JBossESB/workspace/tfennelly/annotated_co...
after
In it you can see how the @ProcessMethod method is now taking multiple non ESB Message
params. The params are annotated with @BodyParam and @PropertyParam annotations, which
tell the ESB from where to extrat those params on the Message before invoking
(@AttachmentParam is also there).
@ProcessMethod
public String printHttpRequestInfo(@BodyParam byte[] httpPayload, @PropertyParam
HttpRequest requestInfo )
Those params can also take an explicit named location (e.g.
@BodyParam("orderInfo")). These @XParam annotations are not required. If not
present, the ESB will search the message based on param type, which is convenient but of
course has the obvious "risks" that need to be kept in mind.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/542781#542781]
Start a new discussion in JBoss ESB Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]