[rules-users] BRMS - How to access rules packages driectly from the repository - Rule Base Deployment

Fernando Meyer fmcamargo at gmail.com
Thu Jun 7 14:24:08 EDT 2007


You MUST use the org.drools.util.BinaryRuleBaseLoader to load a  
precompiled binary package into your RE classes.

     public void testLoadAndExecBinary() throws Exception {
         Person p = new Person();
         BinaryRuleBaseLoader loader = new BinaryRuleBaseLoader();
         loader.addPackage( this.getClass().getResourceAsStream( "/ 
RepoBinPackage.pkg" ) );
         RuleBase rb = loader.getRuleBase();
         StatelessSession sess = rb.newStatelessSession();
         sess.execute( p );
         assertEquals(42, p.getAge());
     }

ps: im going to create a wiki entry for this.

Fernando Meyer
fmcamargo at gmail.com
GPG: 5A6D 3374 B055 A513 9A02  A03B 3DB3 7485 D804 DDFB


On Jun 7, 2007, at 2:48 PM, philokratis wrote:

>
>
>
> We need to load rule packages (snapshots) directly from the  
> repository, preferably from a jmx service in order
> build a rulebase and cache the rulebase in JNDI.
>
> How can we access a package snapshot directly from the repository ?
> Is there another way besides downloading the package through http  
> request?
>
>
> Michael, regarding the rulebase caching is the use of JNDI the  
> reccomended approach
> What are the plans for BRMS regarding this part?
>
>
> Thank you
>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list