Re: JPA doc related to EM Producer

2014-10-03 Thread hwaastad
Hi, maybe a little late on this but I've been testing differet scenarios using tomee and deltaspike and using JTA these are the ones I found out working: @Produces @ApplicationScoped public EntityManagerFactory createEntityManagerFactory() { System.out.println(Producing

Re: JPA doc related to EM Producer

2014-10-03 Thread Karl Kildén
Can you try this? @PersistenceContext(unitName = APP_NAME) private EntityManager entityManager; @Produces @RequestScoped protected EntityManager createEntityManager() { return this.entityManager; } On 3 October 2014 08:02, hwaastad he...@waastad.org wrote: Hi, maybe a little late on this but

Re: JPA doc related to EM Producer

2014-10-03 Thread hwaastad
Hi, I've tried but realized an issue when using deltaspike and cdi injection in custom validators. the entity is flushed before validation is run and hence will fail. I made a test project on github (https://github.com/hwaastad/TomeeDsValidation.git) and u'll see that validation fails if the

Re: JPA doc related to EM Producer

2014-10-03 Thread Romain Manni-Bucau
IIRC with deltaspike you need a custom transaction strategy for JTA (DS is really designed for resource local *by default*) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau

Re: JPA doc related to EM Producer

2014-10-03 Thread hwaastad
Hi, DS doc specifies the use of BeanManagedUserTransactionStrategy in beans.xml. Should'nt that be enough? ..or containermanaged strategy? br hw -- View this message in context:

[jira] [Created] (DELTASPIKE-736) MockAwareInjectionTargetWrapper breaks interceptors in unit tests

2014-10-03 Thread Ronald Steininger (JIRA)
Ronald Steininger created DELTASPIKE-736: Summary: MockAwareInjectionTargetWrapper breaks interceptors in unit tests Key: DELTASPIKE-736 URL: https://issues.apache.org/jira/browse/DELTASPIKE-736

[jira] [Created] (DELTASPIKE-737) MockExtension can't be deactivated

2014-10-03 Thread Ronald Steininger (JIRA)
Ronald Steininger created DELTASPIKE-737: Summary: MockExtension can't be deactivated Key: DELTASPIKE-737 URL: https://issues.apache.org/jira/browse/DELTASPIKE-737 Project: DeltaSpike

ContainerManagedTransactionStrategy

2014-10-03 Thread hwaastad
Hi, i was wondering if there is any doc on the usage of ContainerManagedTransactionStrategy? I've been trying to add this in beans.xml, but I only get a: javax.persistence.PersistenceException: java.lang.NullPointerException at

[jira] [Commented] (DELTASPIKE-736) MockAwareInjectionTargetWrapper breaks interceptors in unit tests

2014-10-03 Thread Gerhard Petracek (JIRA)
[ https://issues.apache.org/jira/browse/DELTASPIKE-736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14158531#comment-14158531 ] Gerhard Petracek commented on DELTASPIKE-736: - please test it with weld or

[jira] [Resolved] (DELTASPIKE-737) MockExtension can't be deactivated

2014-10-03 Thread Gerhard Petracek (JIRA)
[ https://issues.apache.org/jira/browse/DELTASPIKE-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gerhard Petracek resolved DELTASPIKE-737. - Resolution: Cannot Reproduce i tested it with