I have a problem with a CDI Named Bean which is @Transactional.
I use the WildFly 11.1.0.Final.
Here the Code: https://gist.github.com/stefanwendelmann/7a1f8352900067d5a59826d6ee205044
This is the persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1"
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="QuoLoco" transaction-type="JTA">
<description>Verbindung zur QuoLoco Datenbank</description>
<jta-data-source>java:/QUOLOCO_NORM</jta-data-source>
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="hibernate.format_sql" value="false"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
<property name="hibernate.id.new_generator_mappings" value="false"/>
</properties>
</persistence-unit>
</persistence>
When I call the method "doChange" and only edited Empfangseinheittypenparameter, the em.remove and em.persist doesn't trigger a flush.
When I call the method "doChange" and edited some of the main Empfangseinheittypen empfangseinheittyp, I make a find on the Empfangseinheittypenparameter don't need a flush
What am a doing wrong?
Both methods are public.
Please see a picture of the Application attached
Thanks in advance for your help