Questions tagged [entitymanager]

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

1802 questions
0
votes
1 answer

Symfony2 insert multiple entities

I have a question about inserting multiple entities. What happens to the entities if i persist every entity in a loop and then i flush ? I mean what happens if one of this entities is duplicated and can't be inserted ? Are all entities removed or…
0
votes
2 answers

How to improve performance of Updating data using JPA

I am using EJB and Container managed EM ( for local testing I am creating em here). I have a requirement where I need to update database based on some condition, My issue is Update is taking very long time, how to reduce it ? I tried two approach 1>…
Arvind
  • 1,207
  • 6
  • 27
  • 55
0
votes
1 answer

Attempting to execute an operation on a closed EntityManager (when invoking setParameter() function on a named query)

I have Netbeans_8.0.2 to development my project using Glassfish_4.1. In the stateless bean, I initialize a named query in a method that has a @postconstruct annotation. But it throws an IllegalStateException when I try to invoke setParameter() on…
retupmoc
  • 1
  • 1
  • 3
0
votes
1 answer

TestConnectionOnCheckin c3p0 Configuration Property in Hibernate/Spring Framework

I would like to set the testConnectionOnCheckin property for c3p0. However I am having trouble doing so because the c3p0 datasource is created on my behalf within a hibernate entity-manager bean.
Randy
  • 43
  • 1
  • 5
0
votes
1 answer

Instantiate EntityManager from Datasource with JBoss properties

I've checked in google many hours without good results so i share my code. If you have a better solution i'm very interessed! The problem is : I've added a JPA datasource into jboss configuration and i've added some properties
Chklang
  • 857
  • 1
  • 8
  • 17
0
votes
0 answers

"java.lang.ClassNotFoundException: EntityManager" , when trying to start jboss v5.0.4, jboss.javaee.jar is well placed in the lib folder

the stack error: 15:59:09,062 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/D:/projectfoldername/jboss/jboss-5.1.0.GA/server/default/deploy/.ear file / state=PreReal mode=Manual…
Anna
  • 31
  • 8
0
votes
1 answer

WebSphere no persistent classes found for query class

I'm new to WebSphere and am trying to host a simple website that I can log into using an Oracle database. I can get to my website, but when I try and log in I get the following warning and am not able to log in: [WARNING ] Detected JSESSIONID with…
user3058866
  • 53
  • 2
  • 10
0
votes
0 answers

How refresh data in EJBs on Database change?

I am working with EJB 1.1 and would like to get the updated data in the app when ever there is database change. Currently it takes random amount of time to get the updated data. I am not sure what i am supposed to be looking for . Is there a config…
oortcloud_domicile
  • 840
  • 6
  • 21
  • 41
0
votes
0 answers

symfony2 doctrine2: How can I configure the mapping for a second entity manager

In my symfony2 application using doctrine2, I have an exception listener which logs any exception. If the exception is database related, if the entitymanager is closed, a new exception is raised in my exception listener, which is of course not good.…
Sébastien
  • 5,263
  • 11
  • 55
  • 116
0
votes
0 answers

EntityManager not injected using @PersistenceContext in JBoss 4.3 (EJB3 and Hibernate 4.3.9 Final)

I'm trying to create an extended PersistenceContext by having the container inject the EntityManager into a Stateful EJB. With JBoss 4.3.0.GA_06 and Hibernate 4.3.9.Final, the EntityManager is not injected despite annotating the EJB field with…
Lauri Harpf
  • 1,448
  • 1
  • 12
  • 30
0
votes
1 answer

EntityManager not injected in Stateless Session Bean

I have been looking through a lot of similar questions which did not reflect my exact problem. If i overlooked that someone already had this problem solved, please let me know. I am currently migrating an old EJB 2.1 application on JBoss 3.x to EJB…
Christian Kullmann
  • 558
  • 1
  • 7
  • 21
0
votes
4 answers

Java EE and Entity : best way to get results from a DB

I am currently learning Java EE and how to use JPA. I have made a great database, which one of its table got more than 20 fields. I was wondering what is the best way to get the results from the DB. Currently, I am using a @NamedQuery which takes…
user4676340
0
votes
1 answer

Hibernate EntityManagerFactory EntityManager

Can I create an EntityManager from EntityManagerFactory outside a bean. If so, how would I do it?
Raj
  • 147
  • 4
  • 15
0
votes
2 answers

EntityManager.merge()

ReportDimensions.java: package com.test.main.domain.resource; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import…
Jop.pop
  • 335
  • 4
  • 18
0
votes
4 answers

NullPointerException thrown from EntityManager

I have a problem with an EntityManager, it throws a NullPointerException. This is the code: PersonServiceJpa.java package com.smartpump.service.jpa; import org.springframework.stereotype.Service; import…
dreTa
  • 27
  • 1
  • 3
1 2 3
99
100