Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Tim Ward
The best place to start when looking for OSGi R7 examples is the enRoute Project. It contains Maven Archetypes, examples and worked tutorials for building applications using R7 specifications. https://enroute.osgi.org Most of the projects in use are just new versions of long established OSGi

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Jean-Baptiste Onofré
Hi Alex, I fully agree, and we know it's an area where we have to improve. That's why we started a fully set of examples that will be: 1. part of the Karaf distribution 2. used in the itests to verify the behavior is correct. You can find the WIP on the example here:

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Jean-Baptiste Onofré
Hi Alex, I fully agree, and we know it's an area where we have to improve. That's why we started a fully set of examples that will be: 1. part of the Karaf distribution 2. used in the itests to verify the behavior is correct. You can find the WIP on the example here:

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Tim Ward
The structure of the JNDI name is defined by the JNDI service specification. osgi:service/[/] So in this case both of your services should be DataSource instances, but they should have different filters. The important thing is to make sure you have an JTA enlisting DataSource registered as

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Alex Soto
I am calling flush on purpose, to be able to test, to force the data to be written to the database (not committed). Anyway, I changed my method to this: @Transactional(REQUIRES_NEW) public void addUser(User user) { List users = em.createQuery("Select u From User

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Tim Ward
Just looking quickly. You have the same JNDI name for both JTA and non JTA DataSources. This is clearly wrong as the DataSource cannot simultaneously be enlisted in the Transaction and not enlisted. The comments also indicate a misunderstanding of the purpose of the non-jta-datasource, which

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Jean-Baptiste Onofré
Are you sure about your code ? Flush looks weird to me and it seems you don't use container managed transaction. Regards JB On 16/05/2018 21:08, Alex Soto wrote: Yes, same result.  I even tried with Narayana Transaction Manager, and same result. Best regards, Alex soto On May 16, 2018,

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Alex Soto
Yes, same result. I even tried with Narayana Transaction Manager, and same result. Best regards, Alex soto > On May 16, 2018, at 2:56 PM, Jean-Baptiste Onofré wrote: > > Same behavior with RequiresNew ? > > Regards > JB > > On 16/05/2018 19:44, Alex Soto wrote: >>

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Jean-Baptiste Onofré
Same behavior with RequiresNew ? Regards JB On 16/05/2018 19:44, Alex Soto wrote: With Karaf version 4.2.0, Rollback is not working with MariaDB and InnoDB tables. I deployed these features (from Karaf’s enterprise  repository): aries-blueprint transaction jndi jdbc jpa pax-jdbc-mariadb    

MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Alex Soto
With Karaf version 4.2.0, Rollback is not working with MariaDB and InnoDB tables. I deployed these features (from Karaf’s enterprise repository): aries-blueprint transaction jndi jdbc jpa

Re: karaf-maven-plugin 4.2.0 "FAT" kar?

2018-05-16 Thread nino martinez wael
Did you get a chance to look at this? On 3 May 2018 20:23, "Jean-Baptiste Onofré" wrote: Hi Nino, As I'm now back from vacation, I gonna take a look. Sorry for the delay. Regards JB On 05/03/2018 08:19 PM, nino martinez wael wrote: > Any chance someone has an idea? > >