[jboss-dev-forums] [JBoss ESB Development] - Annotation based Action classes
Keith Babo
do-not-reply at jboss.com
Fri Jun 18 11:14:06 EDT 2010
Keith Babo [http://community.jboss.org/people/kcbabo] replied to the discussion
"Annotation based Action classes"
To view the discussion, visit: http://community.jboss.org/message/548739#548739
--------------------------------------------------------------
Argh! Brain fart on my end. Completely spaced the fact that the action class is directly referenced in the service definition.
>
> Re adding the @Action annotation... we can do this, but there's no "need" for it at the moment. The annotated actions currently work without a Type level annotation and also without implementing/extending any interfaces/classes. An example of the most basic action...
> *public* *class* MyAction {
> @ProcessMethod
> *public* *void* processOrder(Order order) { //..... }}
I'm all for cute, but sometimes you can get too cute. ;-) Personally, I like the clarity that the annotation provides. It saves us an extra conditional in the parsing, but more importantly it makes it very clear to the action developer (and subsequent maintainer) what's going on.
> So... what currently marks this as an action is the @ProcessMethod annotation (to be renamed) on the processOrder method. I toyed with adding an @Action annotation but it seemed a bit redundant until such time as we support some type level annotation data. In fact... we could drop the requirement of having to have the @ProcessMethod in situations where the action only has a single method e.g....
>
> *public* *class* MyAction {
> *public* *void* processOrder(Order order) { //..... }}
>
>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/548739#548739]
Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2032]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20100618/6014b5fd/attachment.html
More information about the jboss-dev-forums
mailing list