[
https://issues.apache.org/jira/browse/DELTASPIKE-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14153006#comment-14153006
]
Loïc Prieto Dehennault edited comment on DELTASPIKE-734 at 9/30/14 9:23 AM:
----------------------------------------------------------------------------
I've implemented the two changes but to no avail. The entity is still not
removed. Since I'm getting the same result with EntityManager, it means it's no
longer a deltaspike data problem, so I appreciate the help you're providing.
I'm going to close the issue though, so that no one loses time on what seems to
be a problem in our codebase or configuration, I'm sorry for having thought
otherwise.
Still, if you could help me further I would be most grateful :)
The EM producer is now like this:
{code:java}
@RequestScoped
public class OciCommerceEntityManagerProducer {
@PersistenceContext(unitName = "ociCommercePersistenceUnit", type =
PersistenceContextType.TRANSACTION)
private EntityManager entityManager;
@Produces
public EntityManager createOciCommerceEntityManager() {
return this.entityManager;
}
}
{code}
I've also tried putting the RequestScoped annotation to the producer method.
I've also tried to build the persistence context in extended mode with the JSF
CDI Bean that initiates the remove operation being a Stateful bean (conversion
scoped) as described in the link you provided me that explained the diferences
between the transaction and extended modes. But still it doesn't work.
I'm quite stunned as to what may cause this, since we had not this problem
before introducing deltaspike data. I'm sure it must be another change or a
configuration somewhere that has changed since we introduced deltaspike data.
I'm going to dig into the revision log and see what I can find.
was (Author: [email protected]):
I've implemented the two changes but to no avail. The entity is still not
removed. Since I'm getting the same result with EntityManager, it means it's no
longer a deltaspike data problem, so I appreciate the help you're providing.
I'm going to close the issue though, so that no one loses time on what seems to
be a problem in our codebase or configuration, I'm sorry for having thought
otherwise.
Still, if you could help me further I would be most grateful :)
The EM producer is know like this:
{code:java}
@RequestScoped
public class OciCommerceEntityManagerProducer {
@PersistenceContext(unitName = "ociCommercePersistenceUnit", type =
PersistenceContextType.TRANSACTION)
private EntityManager entityManager;
@Produces
public EntityManager createOciCommerceEntityManager() {
return this.entityManager;
}
}
{code}
I've also tried putting the RequestScoped annotation to the producer method.
I've also tried to build the persistence context in extended mode with the JSF
CDI Bean that initiates the remove operation being a Stateful bean (conversion
scoped) as described in the link you provided me that explained the diferences
between the transaction and extended modes. But still it doesn't work.
I'm quite stunned as to what may cause this, since we had not this problem
before introducing deltaspike data. I'm sure it must be another change or a
configuration somewhere that has changed since we introduced deltaspike data.
I'm going to dig into the revision log and see what I can find.
> remove() and removeFlush() doesn't seem to perform the operation
> ----------------------------------------------------------------
>
> Key: DELTASPIKE-734
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-734
> Project: DeltaSpike
> Issue Type: Bug
> Components: Data-Module
> Affects Versions: 1.0.2
> Environment: Windows 7, JBoss EAP 6.3, Deltaspike 1.0.2, intel i5
> Reporter: Loïc Prieto Dehennault
>
> We've recently moved the project from a custom-built JPA query
> builder/executor to deltaspike Data, using the EntityRepository interface to
> perform CRUD operations, and the remove and removeFlush methods of
> EntityRepository do not seem to perform the operation. They pass without
> error, but nothing is affected.
> The transaction context is provided by a Stateless EJB bean, which invokes
> the methods of the repositories (that implement the EntityRepository and
> CriteriaSupport interfaces).
> Update and create operations are performed correctly, only the remove
> operation is not completed.
> Thats all I can think off the top of my head, if you need any more info,
> please ask for it and I will gladly provide.
> Thanks,
> Loïc Prieto.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)