You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by iocanel <ca...@upstreamsystems.com> on 2010/06/06 21:15:19 UTC

Re: Data not inserted into DB (Camel Bean / EclipseLink / Spring DM / SMX 4.2) !!


cmoulliard wrote:
> 
> I progress in my understanding of the issue. In fact, the commit does
> not occur if the annotation @Transactional is defined in the Service
> bundle instead of the DAO bundle. I think that there is an issue when
> the service layer access the JPATransactionManager of Spring through
> OSGI service and commit does not occur.
> 

Hi Charles,

I haven't heard from you on this issue and I was curious on how your
research is going.
I did some research on it myself, since I had similar issues in the past. I
can't tell if the root cause in your case and mine is the same. For my case
I came up to the conclusion that the issue is that "sometimes reflection
does not work on cglib proxies". I also blogged about it. You can have a
look at 
http://iocanel.blogspot.com/2010/06/spring-aop-and-reflection-pitfalls.html
Spring AOP & Reflection issues 

-----
Ioannis Canellos
http://iocanel.blogspot.com/ http://iocanel.blogspot.com/ 
-- 
View this message in context: http://old.nabble.com/Data-not-inserted-into-DB-%28Camel-Bean---EclipseLink---Spring-DM---SMX--4.2%29-%21%21-tp28475358p28793182.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Data not inserted into DB (Camel Bean / EclipseLink / Spring DM / SMX 4.2) !!

Posted by Charles Moulliard <cm...@gmail.com>.
Hi,

For the moment, I continue to use @Transaction annotation in the DAO
layer instead of the service layer. That means that I deploy two
bundles but keeping @Transaction in one to avoid this issue.

This is also how spring use this annotation in their Spring DM
examples (see GreenPage example) !! So they are aware that there is an
issue.

Kind regards,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel/ServiceMix Committer

*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard



On Sun, Jun 6, 2010 at 9:15 PM, iocanel <ca...@upstreamsystems.com> wrote:
>
>
> cmoulliard wrote:
>>
>> I progress in my understanding of the issue. In fact, the commit does
>> not occur if the annotation @Transactional is defined in the Service
>> bundle instead of the DAO bundle. I think that there is an issue when
>> the service layer access the JPATransactionManager of Spring through
>> OSGI service and commit does not occur.
>>
>
> Hi Charles,
>
> I haven't heard from you on this issue and I was curious on how your
> research is going.
> I did some research on it myself, since I had similar issues in the past. I
> can't tell if the root cause in your case and mine is the same. For my case
> I came up to the conclusion that the issue is that "sometimes reflection
> does not work on cglib proxies". I also blogged about it. You can have a
> look at
> http://iocanel.blogspot.com/2010/06/spring-aop-and-reflection-pitfalls.html
> Spring AOP & Reflection issues
>
> -----
> Ioannis Canellos
> http://iocanel.blogspot.com/ http://iocanel.blogspot.com/
> --
> View this message in context: http://old.nabble.com/Data-not-inserted-into-DB-%28Camel-Bean---EclipseLink---Spring-DM---SMX--4.2%29-%21%21-tp28475358p28793182.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>