2 Replies Latest reply on Oct 7, 2008 5:41 AM by Nikolay Elenkov

    persistence.Filter should be serializable?

    Nikolay Elenkov Master

      When I install a Hibernate filter, configured via components.xml in a distributable webapp, I get a NotSerializableException: org.jboss.seam.persistence.Filter when session is replicated.


      Perhaps Filter should be Serializable?


      Environment: RHEL Linux, JBoss 4.2.2, Seam 2.0.3, two-node cluster.


      I have something like this:


      components.xml


      <component name="entityManager" auto-create="true" precedence="20"
          class="MyCustomPersistenceContext">
        <property name="persistenceUnitJndiName">java:/foobar/EntityManagerFactory</property>
        <property name="filters">
            <value>#{activeFoo}</value>
        </property
      </component>
        
      <persistence:filter name="activeFoo" auto-create="true">
        <persistence:name>activeFooFilter</persistence:name>
      </persistence:filter>





      My Entity:


      @Entity
      public class Bar implements Serializable {
      
       @OneToMany
       @Filter(name = "activeFooFilter", condition = "deleted = 0")
          public Set<Foo> getFoos() {
              return foos;
          }
      }