ejb « Glassfish « JPA Q&A





1. Java Persistance Issue    stackoverflow.com

I am trying to get a simple example up and running using JPA in an EJB through GlassFish. I have the following persistence.xml

<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="default" ...

2. Does Hibernate3.5 support JPA1+EJB3.0 on GlassfishV2?    stackoverflow.com

Can I use newest version of hibernate 3.5 (3.5.0-3.5.2) as JPA1 provider with EJB3.0 on Glassfishv2? I tried, but hibernate 3.5 required JPA2 spec and obviously this did not work with GFv2. Thanks, Anton ...

3. EJB,JPA in javaEE projects => cyclic references (interesting!)    java.net

hello, I would like to create a javaEE6 project which contains some JPA classes, one EJB class (which persist an item in the database) and a client project. so in netbeans 6.9.1, I created one enterprise application project (EAP),with a EJB project inside, in which I created some entity classes from database. all runs fine.

4. EJB,JPA in javaEE projects => cyclic references (interesting!)    java.net

hello, I would like to create a javaEE6 project which contains some JPA classes, one EJB class (which persist an item in the database) and a client project. so in netbeans 6.9.1, I created one enterprise application project (EAP),with a EJB project inside, in which I created some entity classes from database. all runs fine.

7. JPA not working with EJB3    java.net


@Stateless
public class UserServiceBean implements UserService {

/**
* Default constructor.
*/
public UserServiceBean() {
// TODO Auto-generated constructor stub
}

@Override
public User create(User user) {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("workingpoint-model");
EntityManager em = emf.createEntityManager();

em.getTransaction().begin();

em.persist(user);

em.getTransaction().commit();

em.close();

return user;
}

...

8. JPA clasess access from the EJB    java.net

On 4/26/10 2:07 PM, glassfish@javadesktop.org wrote: > Dear all, > > I've got the problem with deploying my project under AS: > > App. Server: Glassgish v3 > IDE: Eclipse 3.5 > > I've three projects: > JPA project > EJB project, it's designed to use the classes from JPA project > EAR project which us used for deployment to the ...