Changed data in the database is not displayed in the PrimeFaces DataTable

5

I'm trying to disable the JPA cache (EclipseLink 2.5.2) through "persistence.xml", but it is not working.

Changes made to tables, externally to the application, are not displayed in the PrimeFaces 5.0 DataTable with JSF 2.2.

Environment: Netbeans 8.0.2 + GlassFish 4.1 (with Connection Pool)

What might be missing?

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="br.com.empresa_Teste_war_1.0-SNAPSHOTPU" transaction-type="JTA">
    <jta-data-source>jdbc/teste</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
        <property name="eclipselink.cache.shared.default" value="false"/>
        <property name="eclipselink.query-results-cache" value="false"/>
        <property name="eclipselink.refresh" value="true"/>
    </properties>
  </persistence-unit>
</persistence>
    
asked by anonymous 13.04.2015 / 19:08

1 answer

0

In the project I'm testing, classes were automatically generated by NetBeans. I had already tested the different types of scope, but I did not realize that the generator does not create the @ManagedBean annotation in the MB class. Adding this annotation and passing the scope to @ViewScoped worked as I wished.

    
15.04.2015 / 13:25