[jboss-cvs] jboss-seam/src/main/org/jboss/seam/init ...

Gavin King gavin.king at jboss.com
Thu Oct 12 04:32:38 EDT 2006


  User: gavin   
  Date: 06/10/12 04:32:38

  Modified:    src/main/org/jboss/seam/init  Initialization.java
  Log:
  pluggable peristence provider strategies
  
  Revision  Changes    Path
  1.95      +17 -1     jboss-seam/src/main/org/jboss/seam/init/Initialization.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Initialization.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/init/Initialization.java,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -b -r1.94 -r1.95
  --- Initialization.java	10 Oct 2006 22:30:39 -0000	1.94
  +++ Initialization.java	12 Oct 2006 08:32:38 -0000	1.95
  @@ -55,6 +55,7 @@
   import org.jboss.seam.core.Locale;
   import org.jboss.seam.core.LocaleSelector;
   import org.jboss.seam.core.ManagedJbpmContext;
  +import org.jboss.seam.core.ManagedPersistenceContext;
   import org.jboss.seam.core.Manager;
   import org.jboss.seam.core.Messages;
   import org.jboss.seam.core.PageContext;
  @@ -88,6 +89,8 @@
   import org.jboss.seam.jms.QueueSession;
   import org.jboss.seam.jms.TopicConnection;
   import org.jboss.seam.jms.TopicSession;
  +import org.jboss.seam.persistence.HibernatePersistenceProvider;
  +import org.jboss.seam.persistence.PersistenceProvider;
   import org.jboss.seam.remoting.RemotingConfig;
   import org.jboss.seam.remoting.messaging.SubscriptionRegistry;
   import org.jboss.seam.theme.Theme;
  @@ -101,7 +104,7 @@
   /**
    * @author Gavin King
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.94 $
  + * @version $Revision: 1.95 $
    */
   public class Initialization
   {
  @@ -407,6 +410,19 @@
         }
         catch (NoClassDefFoundError ncdfe) {} //swallow
   
  +      if ( installedComponents.contains(ManagedPersistenceContext.class) )
  +      {
  +         try
  +         {
  +            Reflections.classForName("org.hibernate.Session");
  +            addComponent( HibernatePersistenceProvider.class, context );
  +         }
  +         catch (ClassNotFoundException cnfe)
  +         {
  +            addComponent( PersistenceProvider.class, context );
  +         }
  +      }
  +
         if ( installedComponents.contains(Jbpm.class) )
         {
            init.setJbpmInstalled(true);
  
  
  



More information about the jboss-cvs-commits mailing list