Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Injecting DAO/Repository into domain entity object

I don't known what's the error, but what you are trying to do is not supported out the box by Spring (or any other depency injection framework). This is because the domain instance is managed by the JPA implementation not Spring. So If you want to inject something in the loaded domain entity you have to use an AOP and Load Time Weaving.
Look my post in the Spring forum
Besides the keywordDao need to be @Transient

On 01-10-2008, at 6:38, Jan Vissers wrote:


Using spring annotation configuration I've tried to inject a DAO into a
domain entity object like so

private transient KeywordDAO keywordDao;

However when I run the JUnit test for the container DAO I immediately
run into strange errors like:


Is what I'm trying to do not support or just plain stupid?


eclipselink-users mailing list

Back to the top