I will have a look on what you propose and test it in SMX4.x.

I have made tests without using @Transactional and configuring spring
with org.springframework.transaction.interceptor.TransactionProxyFactoryBean
but insert does not occur too in DB. I have no idea why the commit is
not done on the transaction.

Best regards,

Charles Moulliard

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

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



On Mon, May 10, 2010 at 1:44 PM, iocanel <[email protected]> wrote:
>
>
> cmoulliard wrote:
>>
>> Thxs for the info. We have the same issue with Hibernate JPA. So
>> definitively, this is related to aop spring proxies.
>>
>> Can you provide us more info about what you have done and which
>> bundles you have deployed ?
>>
>> Kind regards,
>>
>> Charles Moulliard
>>
>
> I am using servicemix 3.3.x so there are not much I can tell you about the
> bundles :-(
>
> I will try to give you as much information I can regarding the problem and
> our configuration.
>
> Our problem was that whenever spring was creating CGLIB proxies (dynamic
> proxies didn't work for at all) both camel and servicemix igonred the other
> annotations. This resulted in various exceptions.
>
> Example Having a servicemix bean proxied by CGLIB prevented the injection of
> Delivery Channel (which was annotated with the Resource annotation) causing
> a NPE during execution.
>
> So we had to get rid of CGLIB proxies:
>
> Solution 1: Do not use mix servicemix/camel with @Transactional annotations.
> In your example this would be as simple as to remove the @Transactional
> annotation from PersistenceImpl and put it inside the sap document dao (or
> any other bean that wouldn't contain both types of annotations).
>
> Solution 2: Totally remove CGLIB proxies and weave the @Transactional
> behavior on compile time. This was the solution I prefered and we did it
> like this:
>
> <!-- Inside the Spring Context we set annotation-driven mode to aspectj.
> This mode doesn't use proxies -->
> <tx:annotation-driven mode="aspectj"
> transaction-manager="transactionManager"/>
>
> <!-- Inside the pom.xml, we use aspectj plugin to weave spring-aspects. This
> will weave the @Transaction on compile time -->
>           <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>aspectj-maven-plugin</artifactId>
>               <version>1.3</version>
>                <executions>
>                    <execution>
>                        <goals>
>                            <goal>compile</goal>
>                            <goal>test-compile</goal>
>                        </goals>
>                    </execution>
>                </executions>
>                <configuration>
>                    <outxml>true</outxml>
>                    <aspectLibraries>
>                        <aspectLibrary>
>                            <groupId>org.springframework</groupId>
>                            <artifactId>spring-aspects</artifactId>
>                        </aspectLibrary>
>                    </aspectLibraries>
>                    <source>1.5</source>
>                    <target>1.5</target>
>                </configuration>
>            </plugin>
>
>
> I hope that this helps. Let me know if you wish additional details.
>
>
>
>
>
>
> -----
> Ioannis Canellos
> --
> 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-tp28475358p28510533.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Reply via email to