context « EJB « JPA Q&A





1. Detach an entity from JPA/EJB3 persistence context    stackoverflow.com

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)    stackoverflow.com

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    stackoverflow.com

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

@Stateless 
public class SomeBean{
  @PersistenceContext
  EntityManager em;
  ...

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

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;

@Id

@GeneratedValue(strategy = GenerationType.IDENTITY)

@Column(name="id")
private ...