Other persistence mechanisms
The KieStoreServices
interface can be implemented in any way for any type of persistence you can imagine. The JPA persistence is currently the most robust implementation available, but there is also another implementation available on top of Infinispan (http://infinispan.org). Also, any other KieStoreServices
implementation could be registered and used directly from the KieServices
helper class by just registering the actual implementation through the following code:
ServiceRegistryImpl.getInstance().registerLocator(KieStoreServices.class, new Callable<KieStoreServices>() { @Override public KieStoreServices call() throws Exception { return (KieStoreServices) Class.forName( "path.to.my.Impl").newInstance(); } });
Let's take a moment to review the Infinispan persistence usage with a small code example.
Infinispan persistence
Similar to the JPA persistence provided for jBPM6, there is another experimental implementation provided...