title: Regenerate Drools KnowledgeBase. Strore drools rules into database
body: <p>I develop web application using Drools. All my drools files store into the database. After modifying some rule I must create new KnowledgeBase and add packages which I create from rules. How I can update only those packages in KnowledgeBase that I need, because regenerate all KnowledgeBase very expensive of time; For example I make next step;</p>
  
  <p>User edit rule and push apply button.
  After that I do something that:</p>
  
  <p>KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
  kbuilder.add( ResourceFactory.newReaderResource( Reader, getClass() ),ResourceType.DRL );
  KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
  kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );</p>
  
  <p>I store rule script how text in database and use Reader to add package in KnowledgeBuilder..  I take rule database format from here 
  <a href="http://docs.codehaus.org/display/DROOLS/Loading+and+managing+rules+dynamically+from+a+database" rel="nofollow">http://docs.codehaus.org/display/DROOLS/Loading+and+managing+rules+dynamically+from+a+database</a></p>
  
  <p>I tried to remove package by name from Knowledge Base and add again but not successful. What I must to do for update my Knowledge Base. I can't create new Knowledge Base every time when user edit and save rule, I must do something actions for update some part of Knowledge Base, let me put it this way.</p>
  
  <p>Please, help.</p>