2 Replies Latest reply on Feb 23, 2007 2:04 AM by Carsten Hoehne

    How to configure persistenceContextName?

    Carsten Hoehne Master

      Hello
      i have created a feature request http://jira.jboss.com/jira/browse/JBSEAM-902
      This request was rejected with comment RTM
      I have not found a way to configure the persistenceContextName in the docs. All i found is to configure the entityManger or the HibernateSession for each and every (Hibernate)Entity(Home/Query) Object.

      If it is really possible to configure the default PersistenceContextName, i appreciate any pointer to the correct chapter in the docs.

      If gavin missunderstood me, is this functionalty implementable?

        • 1. Re: How to configure persistenceContextName?
          Gavin King Master

          You can config any persistence context you like for a home, using entity-manager="#{mine}".

          Or, if you dont like that, you can alias any name you have to "entityManager", using .

          Or, you can extend EntityHome, and override getPersistenceContextName() or even getPersistenceContext().

          And you are asking me for yet another way to confuse users with extra switches and options? No way! :-)

          • 2. Re: How to configure persistenceContextName?
            Carsten Hoehne Master

            Seam is wonderful i like it more and more
            but one have to take the blinkers off:-)

            The configuration is as easy as putting

            <factory name="session" value="#{bazDatabase}"/>
            OR
            <factory name="entityManager" value="#{bazDatabase}"/>
            
            

            in components.xml. This is described in chapter 4.2
            I can't say why i had the position that this is not applicable in my context:-(
            I had to repeat to myself: Seam is easy and consistent.

            Perhaps some repetition in the docs in chapter 10( framework) with a concret example of this is a good idea.