Existe algum problema dos DAO’s serem @ApplicationScoped?
Estou implantando o VRaptor em uma aplicação já existente, e surgiram alguns problemas, por exemplo:
[code]@ApplicationScoped
@Component
public class Singleton
{
public Singleton(Dao dao)
{
…
}
}
@Component
public class Dao
{
…
}[/code]
Aconteceu o seguinte erro:
[quote]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
[/quote]
Ou seja, minha classe Dao também precisa ser @ApplicationScoped. Vocês vêem algum problema nisso?