
com.oneandone.ejbcdiunit.SessionContextFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ejb-cdi-unit Show documentation
Show all versions of ejb-cdi-unit Show documentation
A module that can be used together with cdiunit to build en ejb-test-environment.
The newest version!
package com.oneandone.ejbcdiunit;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Inject;
import com.oneandone.ejbcdiunit.resourcesimulators.SessionContextSimulation;
/**
* @author aschoerk
*/
@SupportEjbExtended
public class SessionContextFactory {
@Inject
BeanManager beanManager;
@Produces
SessionContextSimulation createSessionContext(InjectionPoint ip) {
SessionContextSimulation injectedBean = new SessionContextSimulation("dummy");
injectedBean.setContainer(ip.getBean(), beanManager);
return injectedBean;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy