Matus Abaffy commented on Bug WELD-1364

Hi,
at this moment annotation @PersistenceUnit does not work on setter methods, e.g. the following code:

MyClass.java
EntityManagerFactory persistenceUnit;

    @PersistenceUnit
    private void setPersistenceUnit(EntityManagerFactory persistenceUnit) {
        this.persistenceUnit = persistenceUnit;
    }

causes an exception during deployment

...WeldStartService: Failed to start service
    Caused by: java.lang.IllegalArgumentException: JBAS016065: interface javax.persistence.PersistenceUnit annotation not found on ...MyClass.setPersistenceUnit(javax.persistence.EntityManagerFactory)

The pull request you've mentioned fixes this problem.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to