0 Replies Latest reply on Sep 15, 2011 4:08 PM by stupserich.rudi.strasser.gmail.com

    Simple Working Example with SeamManagedPersistenceContext

    stupserich.rudi.strasser.gmail.com
      Hi,

      I'm scratching my head since weeks over getting the simplest configuration working with a SeamManagedPersistenceContext. So far I've failed badly.

      When I define the context as defined in the Reference Guide as follows

      public class PersistenceProvider {
          @Produces
          @ExtensionManaged
          @ConversationScoped
          @PersistenceUnit
          private EntityManagerFactory primary;
      }

      I get the following error message:

      WELD-001502 Resource producer field [Resource Producer Field [EntityManagerFactory] with qualifiers [@Any @Default] declared as [[field] @ConversationScoped @ExtensionManaged @PersistenceUnit @Produces private mydomain.data.PersistenceProvider.primary]] must be @Dependent scoped

      and I do not have a clue what that's supposed to mean.

      What I really wish to have (I know it's still way to go until X-max, but one can still dream) is a stripped down example of the usage of a SeamManagedPersistenceContext where a JPA entity is

      1) retrieved from a database
      2) handed over to a JSF page, edited (updated) there,
      3) and finally updated in the database

      I know it might sound awfully trivial to all you experts out there, but even with a lot of energy I was not able to pull it off for quite a while now.

      Is anyone out there who is using a SeamManagedPersistenceContext and what's the Configuration (JBOSS, Seam, Weld, Mojarra, etc.) which is required to make it work.

      Any help is appreciated....