[jboss-user] [JBoss Seam] - Can you merge multiple annotations in one?
bfo81
do-not-reply at jboss.com
Mon Sep 4 05:11:03 EDT 2006
Many of my beans are annotated like this:
@Stateful
| @Scope(...)
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| @Conversational(ifNotBegunOutcome="main")
| @Name("...")
Is it possible to create a new annotation that encapsulates all those annotations? e.g.
@MyBean(scope=CONVERSATION, name="whatever")
This would reduce the code lines slightly and there would be one source for mistakes less (e.g. you won't accidently leave out one of the annotations anymore). And you know the golden rule: Don't repeat yourself ;).
Didn't find something like that, and I'm absolutely unexperienced with creating custom annotations. What do you think?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969181#3969181
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969181
More information about the jboss-user
mailing list