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

Gavin King gavin.king at jboss.com
Sat Oct 14 14:27:35 EDT 2006


  User: gavin   
  Date: 06/10/14 14:27:35

  Modified:    src/main/org/jboss/seam/drools  ManagedWorkingMemory.java
  Log:
  JBSEAM-411 JPA outside Java EE 5 / EJB3
  give ManagedXXX components a soft reference to their factories
  let Hibernate look up its factory as a seam component, instead of via JNDI
  JBSEAM-63 multiple sessionfactories
  
  Revision  Changes    Path
  1.6       +8 -5      jboss-seam/src/main/org/jboss/seam/drools/ManagedWorkingMemory.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ManagedWorkingMemory.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/drools/ManagedWorkingMemory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- ManagedWorkingMemory.java	10 Oct 2006 19:37:38 -0000	1.5
  +++ ManagedWorkingMemory.java	14 Oct 2006 18:27:35 -0000	1.6
  @@ -2,6 +2,8 @@
   
   import static org.jboss.seam.InterceptionType.NEVER;
   
  +import java.io.Serializable;
  +
   import org.drools.RuleBase;
   import org.drools.WorkingMemory;
   import org.jboss.seam.Component;
  @@ -11,6 +13,7 @@
   import org.jboss.seam.annotations.Scope;
   import org.jboss.seam.annotations.Unwrap;
   import org.jboss.seam.core.Mutable;
  +import org.jboss.seam.core.Expressions.ValueBinding;
   
   /**
    * A conversation-scoped Drools WorkingMemory for a named RuleBase
  @@ -20,12 +23,12 @@
    */
   @Scope(ScopeType.CONVERSATION)
   @Intercept(NEVER)
  -public class ManagedWorkingMemory implements Mutable
  +public class ManagedWorkingMemory implements Mutable, Serializable
   {
      
      private String ruleBaseName;
      private WorkingMemory workingMemory;
  -   private RuleBase ruleBase;
  +   private ValueBinding<RuleBase> ruleBase;
   
      public boolean clearDirty()
      {
  @@ -62,7 +65,7 @@
            RuleBase ruleBase;
            if (this.ruleBase!=null)
            {
  -            ruleBase = this.ruleBase;
  +            ruleBase = this.ruleBase.getValue();
            }
            else if (ruleBaseName!=null)
            {
  @@ -88,12 +91,12 @@
         workingMemory.dispose();
      }
   
  -   public RuleBase getRuleBase()
  +   public ValueBinding<RuleBase> getRuleBase()
      {
         return ruleBase;
      }
   
  -   public void setRuleBase(RuleBase ruleBase)
  +   public void setRuleBase(ValueBinding<RuleBase> ruleBase)
      {
         this.ruleBase = ruleBase;
      }
  
  
  



More information about the jboss-cvs-commits mailing list