getBean from within a proxied bean
Hi i'm having the following problem
Given the following classes:
- StudentDao -> target of TransactionProxyFactoryBean
- SequenceDao -> idem StudentDao
SequenceDao is used from StudentDao to obtain the next value in a sequece for autoincremental primary key value. The problem is that when i call getBean from the ApplicationContext i get a Proxy object that can't be casted to SequenceDao because a ClassCastException is thrown. Can somebody tell me what's wrong?
When obtained with getBean from outside StudentDao, the SequenceDao proxy can be casted without exceptions being thrown