Session sess = jcrm.newRepositorySession();
fail("Should not be able to create new repository session with no user/pass");
} catch (RepositoryException re) {
}
PropertyManager mpm = ModulePropertyManager.getPropertyManager(ModulePropertyManager.DBSTORE_MODULE);
mpm.setProperty(Environment.MSG_STORE_JCR_USERNAME, "joe");
mpm.setProperty(Environment.MSG_STORE_JCR_PASSWORD, "shmoe");
mpm.setProperty(Environment.MSG_STORE_DB_DATASOURCE_NAME, "datasource");
mpm.setProperty(Environment.MSG_STORE_JCR_JNDI_PATH, "path");
PropertyManager core = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE);
core.setProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY, "org.mockejb.jndi.MockContextFactory");
core.setProperty(Environment.JNDI_SERVER_PKG_PREFIX, "org.mockejb.jndi");
Repository repository = null;
try {
repository = new TransientRepository();
} catch (IOException e1) {
// TODO Auto-generated catch block