Eclipselink / RCP / Gemini with @Transactional ala Spring? [message #1132928] |
Fri, 11 October 2013 09:39 |
Eclipse User |
|
|
|
Hi @all,
I implement a client using Gemini JPA(EclipseLink), Eclipse RCP e4 with DI and the JPA 2.0 annotations to define/access the JPA Models / EntityManager etc.
I did a lot of stuff with Spring in my past - so my Question is - is there a possibility to use a @Transactional annotation with Gemini JPA(EclipseLink) as it is possible in Spring.
I want not to use Spring! Instead I want to use the new Eclipse DI framework.
The current way to implement the transaction is:
private void myTransactionMethod() {
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
...
em.getTransaction().commit();
em.close();
}
to implement it like this...is a step backwards when we think in Dependency Injection manner 
that's the reason for my question.
best regards
jk
|
|
|
Powered by
FUDForum. Page generated in 0.05924 seconds