0 Replies Latest reply on May 25, 2006 10:16 PM by chane

    JBossProxy

      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();
       }
      }



      In another SFSB I have a reference to the above SFSB:
      @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";
       }
      
      }


      All of the methods I expect (and a few more from the proxy stuff), are logged. However, none of the annotations are logged. Is there a way to access the class (or annotations) on the qEditor property?

      TIA,
      Chris....