Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15312

Transaction isolation not working as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 24.0.1.Final
    • Transactions
    • None
    • Hide

      We are using hibernate JPA with Wildfly. After moving from WF 23 to WF 24 we see this behaviour:
      We have an entity WfData that has a list of entity WfParameter which is mapped as OneToMany with CascadeType.ALL:

      @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
      public List<WfParameter> getParameters()
      {
      	return parameters;
      }
      

      The entity WfParameter includes a Lob-field in which serialized java objects get stored:

      @Lob
      @Column(length = 16777215)
      public Serializable getValue()
      {
      	return value;
      }
      
      

      The entity WfData with its list of WfParameters is persisted within the method of a stateless bean. When an instance of WfData with a list of its parameters is persisted and another, parallel running thread loads it using a query, sometimes the instance is returned by the query but the list of parameters is empty. We would expect that the entity is only visible for the second transaction when the writing to database has been completed, including the dependent WfParameter-entities written by cascade. This behaviour did not occur with WF 23. The database is MSSQL, transaction isolation level is the database's default, read committed snapshot.

      Show
      We are using hibernate JPA with Wildfly. After moving from WF 23 to WF 24 we see this behaviour: We have an entity WfData that has a list of entity WfParameter which is mapped as OneToMany with CascadeType.ALL: @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) public List<WfParameter> getParameters() { return parameters; } The entity WfParameter includes a Lob-field in which serialized java objects get stored: @Lob @Column(length = 16777215) public Serializable getValue() { return value; } The entity WfData with its list of WfParameters is persisted within the method of a stateless bean. When an instance of WfData with a list of its parameters is persisted and another, parallel running thread loads it using a query, sometimes the instance is returned by the query but the list of parameters is empty. We would expect that the entity is only visible for the second transaction when the writing to database has been completed, including the dependent WfParameter-entities written by cascade. This behaviour did not occur with WF 23. The database is MSSQL, transaction isolation level is the database's default, read committed snapshot.

    Description

      We are using hibernate JPA with Wildfly. After moving from WF 23 to WF 24 we see this behaviour:
      We have an entity WfData that has a list of entity WfParameter which is mapped as OneToMany with CascadeType.ALL:

      Attachments

        Activity

          People

            Unassigned Unassigned
            as_bi1 Anna Schricker (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: