try
{
SpiCaseDatabase gcdb_clone=(SpiCaseDatabase)gcdb.clone();
gcdb_clone.setStore(store);
gcdb_clone.setCaseIdGenerator(new SpiCaseIdGeneratorImpl());
return new CaseDatabaseImpl(gcdb_clone);
}
catch (CloneNotSupportedException e)
{
throw new WorkflowException(e);