FileDocCategorySizeDatePackage
ExtendedPersistenceContextInjector.javaAPI DocJBoss 4.2.12395Fri Jul 13 20:53:46 BST 2007org.jboss.injection

ExtendedPersistenceContextInjector

public class ExtendedPersistenceContextInjector extends Object implements Injector, PojoInjector
Comment
author
Bill Burke
version
$Revision: 60233 $

Fields Summary
protected static final Logger
log
protected org.jboss.ejb3.entity.ManagedEntityManagerFactory
factory
Constructors Summary
protected ExtendedPersistenceContextInjector(org.jboss.ejb3.entity.ManagedEntityManagerFactory factory)


     
   
      this.factory = factory;
   
Methods Summary
public java.lang.ClassgetInjectionClass()

      return null;
   
public voidinject(org.jboss.ejb3.BeanContext ctx)

      inject(ctx, ctx.getInstance());
   
public voidinject(org.jboss.ejb3.BeanContext beanContext, java.lang.Object instance)

      StatefulBeanContext ctx = (StatefulBeanContext)beanContext;
      EntityManager pc = ctx.getExtendedPersistenceContext(factory.getKernelName());
      if (pc == null)
      {
         pc = factory.createEntityManager();
         ctx.addExtendedPersistenceContext(factory.getKernelName(), pc);
      }
   
public voidinject(java.lang.Object instance)

      throw new RuntimeException("Illegal operation");