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

Entities using Extended PersistentContext are not managed

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      1. Create a Stateful bean with two service methods

      • One service method uses an Extended EntityManger to find an entity and caches it in the bean
      • In the second method, update the entity

      2. Have a servlet call both the service methods using @Inject bean

      Expected:
      Calling second method should automatically persist the data to DB

      Actual:
      The data is not persisted. Its the same issue even if you call em.flush() explicitly. Basically the Entity is not managed

      Show
      1. Create a Stateful bean with two service methods One service method uses an Extended EntityManger to find an entity and caches it in the bean In the second method, update the entity 2. Have a servlet call both the service methods using @Inject bean Expected: Calling second method should automatically persist the data to DB Actual: The data is not persisted. Its the same issue even if you call em.flush() explicitly. Basically the Entity is not managed

      Description

      Entities using Extended PersistentContext are not managed in a Stateful bean.

      Attached are the bean class and the client servlet class

        Attachments

        1. AtInjectedStatefulEjbClient.java
          1 kB
        2. CdiStatefulEmployeeBean.java
          1.0 kB
        3. StatefulEjb.java
          1 kB
        4. StatefulEjbClient.java
          1 kB
        5. WFLY-6383.zip
          7 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rakcheru Rakesh Cherukuri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: