[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[virgo-dev] org.springframework.context does not import javax.persistence

Hi all, loving the progress being made on 3.7.0. Thanks for your hard work on Virgo.

I'm doing a trial upgrade to 3.7.0.M04, and am not sure if I'm running into a bug or not.

In 3.6.4, I could get @PersistenceContext annotations without too much hassle. It fell under "Spring annotation magic". However, that annotation isn't being processed for me in 3.7.0.

I did some digging, and it looks like the problem is that in org.springframework.context.annotation.AnnotationConfigUtils, "jpaPresent" is false because it checks for the existence of javax.persistence.EntityManagerFactory and org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor. Whereas the spring-context bundle has an import (resolution=optional) for the latter, there is no import I can see for javax.persistence. In the bundle included with Virgo 3.6.4, there was an import for javax.persistence.

Is this a bug? My workaround right now seems to be having to copy the javax.persistence...jar file from repository/ext into the /lib directory so it's available to all bundles regardless of imports. Is there a better way I should be doing this?

Thanks,
-Mark