ejb « EntityManager « JPA Q&A

1. Can't create EntityManager    stackoverflow.com

New to EJB3, please help/explain. Inside a session bean I declare an EntityManager as follow

private EntityManager em;
and this works. But when I do this
private EntityManager em;
private EntityManagerFactory emf;

public void myFunction() {

2. Websphere 7 EntityManagerFactory creation problem    stackoverflow.com

I'm working on a maven project which uses seam 2.2.0, hibernate 3.5.0-CR-2 as JPA provider, DB2 as database server and Websphere 7 as application server. Now I'm facing de following problem:

  • In ...

3. Entity Manager / persistance file structure    stackoverflow.com

The title isnt clear as i couldnt think of one but, i have an EJB project and am trying to play with JPA. To create the entity manager i am injecting ...

4. entitymanager persist    stackoverflow.com

I have a problem when trying to update foreign keys. Using the merge function I always get a out of memory error, or I get a timeout Fakultaet and Standort are foreign keys ...

5. How to use JDBC ClientInfo with JPA and EJB3    stackoverflow.com

We are migrating a JDBC based application to JPA and EJB3. Our old application used the Connect#setClientInfo API to record the current user name as part of the client info:

6. One entityManger finds entity , the other does not    stackoverflow.com

I have a very strange behavior in my program. I have 2 classes (class LogIn and CreateGame) where i have injected an EntityManager in each using the annotation


7. javax.ejb.EJBException when persisting an entity    stackoverflow.com

I have an entity called Medico which was created as an Entity Class from Database, hence I think the entity definition is failsafe here, nevertheless the definition is the following: ...

8. org.hibernate.ejb.Version INFO: Hibernate EntityManager 3.2.0.CR1    java-forums.org

Java Code: --------------------------------------- ERROR ---------------------------------------------- 11/06/2007 20:31:10 org.hibernate.ejb.Version INFO: Hibernate EntityManager 3.2.0.CR1 11/06/2007 20:31:10 org.hibernate.cfg.annotations.Version INFO: Hibernate Annotations 3.2.0.CR1 11/06/2007 20:31:10 org.hibernate.cfg.Environment INFO: Hibernate 3.2 cr2 11/06/2007 20:31:10 org.hibernate.cfg.Environment INFO: hibernate.properties not found 11/06/2007 20:31:10 org.hibernate.cfg.Environment buildBytecodeProvider INFO: Bytecode provider name : cglib 11/06/2007 20:31:10 org.hibernate.cfg.Environment INFO: using JDK 1.4 java.sql.Timestamp handling 11/06/2007 20:31:10 org.hibernate.ejb.Ejb3Configuration$4 accept ...

9. EJB3 - unitTest only entity managers...    forum.hibernate.org

Hello, I have a bit of a problem here with JPA, more specifically with the "persistence.xml" configuration file. As I understand, each and every PersistenceUnit has to be declared in the "persistence.xml" file. What I want is to declare 2 different Persistence units: one for production environment using a specific database and another one for testing purposes only (for this one, ...

10. EJB - RuntimeExceptions on EntityManager    forum.hibernate.org

Ops, i reread the book carefully, and asked help from a friend and now i get it. System Exceptions does get rolled back. But the second question is: What happened with application exceptions that do not have @ApplicationException(rollback=true)? The transaction stays "iddle" until it expires? The expiration time is up to the container them? Thks, Israel