Top "Entitymanager" questions

The EntityManager is the representation of a PersistenceContext, allowing a user to manipulate data pulled from a database.

How to manually start a transaction on a shared EntityManager in Spring?

I have a LocalContainerEntityManagerFactoryBean as EntityManager instance. To quickly drop a full tables' content, I want to run the following …

java spring spring-data-jpa entitymanager
why EntityManager is null?

In my web applicaton I use OpenJPA on Apache Tomcat (TomEE)/7.0.37 server. I use Netbeans to auto generate class ("Entity …

java entitymanager openjpa persistence.xml apache-tomee
How to mock EntityManager?

I need to mock entity-manager to make testing service layer (in my case a session facade) to be independent of …

java unit-testing jpa mocking entitymanager
java.lang.IllegalStateException: EntityManager is closed

I'm building a JAR file, deploying to JBoss 4.2.3.GA (can't help it), with Hibernate 4.1.5.SP1 with validator 4.3.0.Final. The database …

hibernate jboss entitymanager hibernate-entitymanager
JAVA: an EntityManager object in a multithread environment

if I have multiple threads, each use injector to get the EntityManager object, each use the em object to select …

java persistence entitymanager
How to set the timeout period on a JPA EntityManager query

I'm currently getting connection timeout errors from my EntityManager queries. Is it possible to set a timeout for these? persistence.…

java hibernate jpa timeout entitymanager
EntityManager throws TransactionRequiredException on merge() in JBoss JSF bean

I've set up a JSF application on JBoss 5.0.1GA to present a list of Users in a table and allow …

java jsf jpa jboss entitymanager
No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call

No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call when I do a test …

spring-mvc jpa entitymanager
PersistenceUnit vs PersistenceContext

In few project I have been successfully using @PersistenceUnit(unitName = "MiddlewareJPA") EntityManagerFactory emf; ... EntityManager entityManager = emf.createEntityManager(); to obtain EntityManager …

java jakarta-ee jpa persistence entitymanager
When to use Entity Manager in Symfony2

At the moment I am learning how to use Symfony2. I got to the point where they explain how to …

symfony doctrine-orm entitymanager