1 Reply Latest reply on Nov 30, 2011 4:15 AM by Ajay Nair

    Seam managed Hibernate Session factories

    Ajay Nair Newbie
      We are using a seam managed hibernate session factory defined in components.xml.

      Now seam tries to bootstrap these session factories on server startup. What I am looking for is a way by which JBOSS does not do it for a specific session factory defined. I should be able to retrieve the session factory only when a piece of code trying to inject this seam component is run.

      components.xml

      <core:hibernate-session factory> </core:hibernate-session factory> apparently does not have the startup attribute.

      Any solution?
        • 1. Re: Seam managed Hibernate Session factories
          Ajay Nair Newbie

          Ajay Nair wrote on Nov 30, 2011 04:08:


          We are using a seam managed hibernate session factory defined in components.xml.

          Scenario: We have a feature where we require a different database connection, defined in components.xml as a seperate session factory. Not every one needs this connection and feature. But components.xml is shared

          Now seam tries to bootstrap these session factories on server startup.And for people who do not have the datasource setup on their JBOSS server, for this new session factory, the server does not start.

          What I am looking for is a way by which JBOSS does not bootstrap a specific session factory . I should be able to retrieve the session factory only when a piece of code trying to inject this seam component is run.

          the tag for the managed hibernate session factory apparently does not have the startup attribute.

          Any solution?


          Click HELP for text formatting instructions. Then edit this text and check the preview.