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

UserTransactionPropertyInjector

public class UserTransactionPropertyInjector extends AbstractPropertyInjector
Injects a user transaction into a bean property.
author
Bill Burke
author
Carlo de Wolf
version
$Revision: $

Fields Summary
Constructors Summary
public UserTransactionPropertyInjector(org.jboss.injection.lang.reflect.BeanProperty property, InjectionContainer container)

      super(property);
      
      if (container instanceof Container)
      {
         TransactionManagementType type = TxUtil.getTransactionManagementType(((Advisor) container));
         if (type != TransactionManagementType.BEAN)
            throw new IllegalStateException("Container " + ((Container) container).getEjbName() + ": it is illegal to inject UserTransaction into a CMT bean");
      }
   
Methods Summary
public voidinject(java.lang.Object instance)

      UserTransaction ut = new UserTransactionImpl();
      property.set(instance, ut);