/*
* Created on 2004-5-4
*
* To change the template for this generated file go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
package workflow.test;
import org.huihoo.workflow.WorkflowException;
import org.huihoo.workflow.store.SchemaContext;
import org.huihoo.workflow.store.spi.SpiUserDatabase;
import com.zosatapo.commons.store.Store;
import org.huihoo.workflow.impl.store.DatabaseRegistry;
/**
* @author zosatapo
*
* To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public class UserDBTest
{
public static void main(String[] args)
{
try
{
SchemaContext schemaContext=new SchemaContext("D:\\project\\org.huihoo.workflow\\conf\\org.huihoo.workflow-schema.properties");
Store storeConfig=new Store("DriverManager","dbc:oracle:thin:@zosatapo:1521:org.huihoo.workflow","org.huihoo.workflow","org.huihoo.workflow","oracle.jdbc.driver.OracleDriver");
//SpiUserDatabaseImpl userDatabase=new SpiUserDatabaseImpl(schemaContext,storeConfig);
SpiUserDatabase userDatabase=DatabaseRegistry.getUserDatabase(storeConfig.getDriverClass());
userDatabase.setSchemaContext(schemaContext);
userDatabase.setStore(storeConfig);
userDatabase.start();
//System.err.println(userDatabase);
System.err.println(userDatabase.findParticipant("zosatapo"));
}
catch(WorkflowException ex)
{
ex.printStackTrace();
}
}
}