Re: Data and JPA module
Thomas, I get it. Thank you. On Wed, Jul 1, 2015 at 6:51 AM, Thomas Hug thomas@gmail.com wrote: Hi Daniel AFAIR we have a hook in the JPA module [1][2] where we can propagate the repository EM to the transaction strategy (DefaultEntityManagerHolder and [3]). So EntityManagerResolver should have precedence, but it depends overall on the TransactionStrategy if it's picked up or not. Agree that it would be nice to be consistent here. EntityManagerConfig was introduced AFAIR to have the same concept as MessageContextConfig / Resolver in the JSF module. The current @Transactional way works not with qualifier attributes. [1] https://github.com/apache/deltaspike/blob/master/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/spi/entitymanager/ActiveEntityManagerHolder.java [2] https://github.com/apache/deltaspike/blob/master/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/transaction/ResourceLocalTransactionStrategy.java#L87 [3] https://github.com/apache/deltaspike/blob/master/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/TransactionalQueryRunner.java On Tue, Jun 30, 2015 at 9:40 PM, Daniel Cunha daniels...@gmail.com wrote: Hi folks, we have a new issue little bit weird. https://issues.apache.org/jira/browse/DELTASPIKE-940 My doubt is: If we have define EntityManagerConfig in ours Repository, so.. Do we use the @Transactional in some method, what is assumed? @Transactional or the EntityManagerResolver in EntityManagerConfig? On Tue, Jun 30, 2015 at 4:38 PM, Daniel Cunha daniels...@gmail.com wrote: Hi folks, we have a new issue little bit weird. https://issues.apache.org/jira/browse/DELTASPIKE-940 My doubt is: If we have define EntityManagerConfig in ours Repository, so.. we does' -- Best regard, Daniel Cunha (soro) -- Best regard, Daniel Cunha (soro) -- Best regard, Daniel Cunha (soro)
[jira] [Commented] (DELTASPIKE-871) save() and findByxxx() in same transaction gives constraint violation exception
[ https://issues.apache.org/jira/browse/DELTASPIKE-871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14610192#comment-14610192 ] Daniel Cunha (soro) commented on DELTASPIKE-871: Hi [~mdkamaruzzaman], I'll close it If you cannot reproduce and doesn't have some sample to show, but reopen if you have this problem again or have some sample to us. We'll to be here to hear you when necessary. Thank you for reporting. save() and findByxxx() in same transaction gives constraint violation exception --- Key: DELTASPIKE-871 URL: https://issues.apache.org/jira/browse/DELTASPIKE-871 Project: DeltaSpike Issue Type: Bug Components: Data-Module Affects Versions: 1.2.0 Environment: Windows-7, Java-8, Netbeans-8.0.2 Reporter: Md Kamaruzzaman Assignee: Daniel Cunha (soro) It seems like when in the same EJB transaction, save() and findByxxx() is called, then delta-spike inserts the entity twice [once in save() and other time in findByxxx()] and gives a constraint violation exception. After some debuggin, it seems like save() gives a INSERT query in DB and findByxxx() method calls a flush which again gives the same INSERT query in DB [INSERT query from save() is not removed from EntityManager] and gives constraint violation exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (DELTASPIKE-871) save() and findByxxx() in same transaction gives constraint violation exception
[ https://issues.apache.org/jira/browse/DELTASPIKE-871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cunha (soro) resolved DELTASPIKE-871. Resolution: Cannot Reproduce save() and findByxxx() in same transaction gives constraint violation exception --- Key: DELTASPIKE-871 URL: https://issues.apache.org/jira/browse/DELTASPIKE-871 Project: DeltaSpike Issue Type: Bug Components: Data-Module Affects Versions: 1.2.0 Environment: Windows-7, Java-8, Netbeans-8.0.2 Reporter: Md Kamaruzzaman Assignee: Daniel Cunha (soro) It seems like when in the same EJB transaction, save() and findByxxx() is called, then delta-spike inserts the entity twice [once in save() and other time in findByxxx()] and gives a constraint violation exception. After some debuggin, it seems like save() gives a INSERT query in DB and findByxxx() method calls a flush which again gives the same INSERT query in DB [INSERT query from save() is not removed from EntityManager] and gives constraint violation exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (DELTASPIKE-673) CdiQueryInvocationContext#isNew does not work well with OpenJpa and detached entities
[ https://issues.apache.org/jira/browse/DELTASPIKE-673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cunha (soro) updated DELTASPIKE-673: --- Fix Version/s: 1.4.2 CdiQueryInvocationContext#isNew does not work well with OpenJpa and detached entities - Key: DELTASPIKE-673 URL: https://issues.apache.org/jira/browse/DELTASPIKE-673 Project: DeltaSpike Issue Type: Improvement Components: Data-Module Affects Versions: 1.0.0 Reporter: Philip Herbst Assignee: Daniel Cunha (soro) Fix For: 1.4.2 I'm trying to use org.apache.deltaspike.data.api.EntityRepository on TomEE 1.5.2 with detached entities. Whenever I try to call the save method of EntityRepository I get {code} org.apache.openjpa.persistence.EntityExistsException: Attempt to persist detached object {code} CdiQueryInvocationContex#isNew returns true for my detached entity and and because of that EntityManager#persist is called. see org.apache.deltaspike.data.impl.handler.EntityRepositoryHandler#save From OpenJpaPersistenceUtil#getIdentifier(OpenJPAEntityManagerFactory emf, Object entity) {code} /** * Get the object identifier for a persistent entity managed by one * of the entity managers of the specified entity manager factory. * @return The identifier of the entity or null if the entity does * not have an identifier assigned or is not managed by any of the * entity managers of the entity manager factory. */ {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (DELTASPIKE-941) JPA link broken in Data Module documentation
[ https://issues.apache.org/jira/browse/DELTASPIKE-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Cunha (soro) updated DELTASPIKE-941: --- Fix Version/s: 1.4.2 JPA link broken in Data Module documentation Key: DELTASPIKE-941 URL: https://issues.apache.org/jira/browse/DELTASPIKE-941 Project: DeltaSpike Issue Type: Bug Components: Documentation Reporter: Daniel Cunha (soro) Assignee: Daniel Cunha (soro) Priority: Minor Fix For: 1.4.2 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (DELTASPIKE-871) save() and findByxxx() in same transaction gives constraint violation exception
[ https://issues.apache.org/jira/browse/DELTASPIKE-871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gerhard Petracek closed DELTASPIKE-871. --- save() and findByxxx() in same transaction gives constraint violation exception --- Key: DELTASPIKE-871 URL: https://issues.apache.org/jira/browse/DELTASPIKE-871 Project: DeltaSpike Issue Type: Bug Components: Data-Module Affects Versions: 1.2.0 Environment: Windows-7, Java-8, Netbeans-8.0.2 Reporter: Md Kamaruzzaman Assignee: Daniel Cunha (soro) It seems like when in the same EJB transaction, save() and findByxxx() is called, then delta-spike inserts the entity twice [once in save() and other time in findByxxx()] and gives a constraint violation exception. After some debuggin, it seems like save() gives a INSERT query in DB and findByxxx() method calls a flush which again gives the same INSERT query in DB [INSERT query from save() is not removed from EntityManager] and gives constraint violation exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
Re: [MARKETING] LinkedIn Group
Gerhard let me know that some are interested in helping to moderate the new LinkedIn group... which is great! If you have not moderated a LinkedIn group before... it is not challenging... although you must have a LinkedIn account and already be member of the group. Please contact Marvin Toll on LinkedIn and let me know you are interested in being a moderator. _Marvin MarvinToll wrote A new LinkedIn group has been started for Apache DeltaSpike: https://www.linkedin.com/grp/home?gid=6979265 https://www.linkedin.com/grp/home?gid=6979265 Consider joining this group and helping mentor a growing DeltaSpike community. _Marvin Toll -- View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/MARKETING-LinkedIn-Group-tp4660955p4660981.html Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.