If there is a more appropriate place to ask this question, please let me know....
I am using EJB3/Seam and need to access the annotations on a SFSB. When I retrieve the object, the getClass() methods tells me that it is a Proxy object.
I have access to the Local interfaces annotations, just not the SFSB annotation. Is there a way to access the annotation on the proxied object?
Specific I have the following class:
@Name("quote.editor")
@Stateful
public class QuoteEditor implements IQuoteEditor{
public Quote quote;
@Create
@Begin
public void initialize(){
quote = load(Quote.class);
items = new ArrayList<Item>();
items.addAll(quote.getItems());
}
@Relate(name = "quote")
public String save(){
return super.save();
}
}@Stateful
@Scope(ScopeType.CONVERSATION)
@Name("quote.configurator")
public class QuoteConfigurator implements IQuoteConfigurator {
public boolean getBooleanFalse(){
return false;
}
private static final Log log = LogFactory.getLog(QuoteConfigurator.class);
private TreeItem root;
private TreeModel model;
@RequestParameter
private String selected;
@DataModel
private List<Product> products;
@In(value="quote.editor")
private IQuoteEditor qEditor;
public String configure(){
log.fatal(" methods for class["+qEditor.getClass()+"]:"); //<-- Proxy class and not a QuoteEditor
for(Method m: qEditor.getMethods()){
log.fatal(" method["+m.getName()+"]");
for(Annotation ann : m.getAnnotations()){
log.fatal(" int ann["+ann+"]");
}
}
return "configure";
}
}