我有一个Web应用程序,我在我的ejb类(@Stateless
)中注入了一个dao类,它工作正常,但我需要迁移此Web应用程序以用于企业应用程序,并且@Inject
没有工作更多:将Web应用程序迁移到企业应用程序
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [AsteriskDAO] with qualifiers [@Default] at injection point [[field] @Inject private br.com.vsdialer.facade.AsteriskFacade.asteriskDao]
代码:
@Stateless
public class AsteriskFacade extends GenericFacade<Asterisk> implements AsteriskFacadeLocal, AsteriskFacadeRemote{
@Inject
private AsteriskDAO asteriskDao;
@Override
@PostConstruct
protected void inicializar() {
setDao(asteriskDao);
}
}
public class AsteriskDAO extends GenericDAO<Asterisk>{
}
What Jee version ??? – meyquel
我正在使用jee 6,jboss eap 6.1 –
Web应用程序中的EJB与JEE应用程序中的EJB并不相同,因此JEE行为中的EJB是不同的。 – meyquel