Book Image

jBPM6 Developer Guide

Book Image

jBPM6 Developer Guide

Overview of this book

Table of Contents (21 chapters)
jBPM6 Developer Guide
Credits
About the Author
Acknowledgments
About the Author
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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...