Pardeep,
The JPA persistence solution is only storing runtime state. The
knowledge base and environment are not stored. Basically, that is
because they don't need to, as they can easily be recreated. For
example, your knowledge base is usually loaded from Guvnor or file
system, so you can simply reload that. The environment links your
engine to the surroundings and can usually be recreated as well (and
should be, as the references need to be updated).
Kris
Quoting Pardeep.Ruhil(a)lntinfotech.com:
Hi,
I have a query regarding Drools Persistence.
I have a scenario in which I want to know whether drool persistence
will
work or not.
Lets say I am in between a workflow and suddenly my server creashes.
Suppose my workFlow was completed upto 3 steps with lets say 2 more
steps
to go.
As I am using drools-persistence Api methods so my data regarding the
session , variable and process will go into the database specified by
me
in the tables 'SessionInfo', VaraibleInstanceInfo', and
ProcessInstanceInfo and 'WorkItemInfo' tables of the database.
Now as my server crashed and I restarted my application.
So now I will restore the session object as my application got
crashed
from the database using the below code.
this.ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(id,
kbase
, null, env);
Now as I have restarted the server, KnowledgeBase object i.e. 'kbase'
will
become null and so as Environment Class object 'env'.
Are KnowledgeBase object are stored as well in the database ???
or I have to create a new KnowledgeBase to load the previous
StatefulKnowledgeSession object.
So in short how can I restore the previous session or If I cann't
restore
it can I do that by storing the Knowledgebase object and Environment
Object in the database as well.
Please help me how can this be achieved.
Thanks & Regards
Pardeep Ruhil
______________________________________________________________________
Disclaimer:
http://www.kuleuven.be/cwis/email_disclaimer.htm