FileDocCategorySizeDatePackage
Session1Bean.javaAPI DocJBoss 4.2.12599Fri Jul 13 20:54:44 BST 2007org.jboss.tutorial.packaging.bean

Session1Bean

public class Session1Bean extends Object implements Session1
Comment
author
Bill Burke
version
$Revision: 60233 $

Fields Summary
EntityManager
manager1
EntityManager
manager2
EntityManagerFactory
factory1
EntityManagerFactory
factory2
Constructors Summary
Methods Summary
public intcreate1FromFactory()

      Entity1 one = new Entity1();
      one.setString("oneFactory");
      EntityManager m = factory1.createEntityManager();
      m.persist(one);
      System.out.println(one.getId());
      return one.getId();
   
public intcreate1FromManager()

      Entity1 one = new Entity1();
      one.setString("oneManager");
      manager1.persist(one);
      return one.getId();
   
public intcreate2FromFactory()

      Entity2 two = new Entity2();
      two.setString("twoFactory");
      EntityManager m = factory2.createEntityManager();
      m.persist(two);
      return two.getId();
   
public intcreate2FromManager()

      Entity2 two = new Entity2();
      two.setString("twoManager");
      manager2.persist(two);
      return two.getId();