Or you can turn the implementation inside out and use a @Factory method, which decides what object to return. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050262#4050262 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050262