[weld-issues] [JBoss JIRA] Created: (WELD-456) Example of transactional observer won't compile

Matthieu Chase Heimer (JIRA) jira-events at lists.jboss.org
Sat Feb 27 12:18:10 EST 2010


Example of transactional observer won't compile
-----------------------------------------------

                 Key: WELD-456
                 URL: https://jira.jboss.org/jira/browse/WELD-456
             Project: Weld
          Issue Type: Bug
          Components: Documentation
    Affects Versions: 1.0.1.Final
            Reporter: Matthieu Chase Heimer
            Priority: Minor


>From the last code example in section 11.7: http://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html_single/#d0e4211

I think you meant for that second addProduct method to be named something else.


@ApplicationScoped @Singleton

public class Catalog {

   void addProduct(@Observes(during = AFTER_SUCCESS) @Created Product product) {
      products.add(product);
   }

   void addProduct(@Observes(during = AFTER_SUCCESS) @Deleted Product product) {
      products.remove(product);
   }
}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list