Existe algum problema dos DAO's serem @ApplicationScoped?
Estou implantando o VRaptor em uma aplicação já existente, e surgiram alguns problemas, por exemplo:
@ApplicationScoped
@Component
public class Singleton
{
public Singleton(Dao dao)
{
....
}
}
@Component
public class Dao
{
....
}
Aconteceu o seguinte erro:
Scope 'request' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No
Ou seja, minha classe Dao também precisa ser @ApplicationScoped. Vocês vêem algum problema nisso?