context « EJB « JPA Q&A

1. Detach an entity from JPA/EJB3 persistence context

What would be the easiest way to detach a specific JPA Entity Bean that was acquired through an EntityManager. Alternatively, could I have a query return detached objects in the first ...

2. Detach an entity from a JPA persistence context (JPA 2.0 / Hibernate / EJB 3 / J2EE 6)

I wrote a stateless EJB method allowing to get an entity in "read-only" mode. The way to do this is to get the entity with the EntityManager then detach it (using the ...

3. Manage persistent context before flushing

consider hibernate-link and JTA as peristence provider. How can I force em not to flush anything, and to handle it by myself?

public class SomeBean{
  EntityManager em;

4. how to force ejb3 to reload value from data base and not use those of the context

Hello here I have a big problem that I hope to find help here I have two entities @Entity @Inheritance(strategy=InheritanceType.JOINED) @DiscriminatorColumn(name="Role", discriminatorType=DiscriminatorType.STRING) public class Utilisateur implements Serializable { private static final long serialVersionUID = 1L;


@GeneratedValue(strategy = GenerationType.IDENTITY)

private ...