String rToken = (String)args[2];
DBCreationProperties creationProps = (DBCreationProperties)args[3];
try
{
RepositoryEntry rEntry =
(RepositoryEntry)(getObject(RepositoryEntry.class,
stringRepositoryEntry.getBytes(Constants.DEFAULT_ENCODING)));
createRepositoryLocally(backupId, rEntry, rToken, creationProps);
return null;
}
finally
{
// release tokens
pendingRepositories.remove(rToken);
}
}
});
startRepository = rpcService.registerCommand(new RemoteCommand()
{
public String getId()
{
return "org.exoplatform.services.jcr.ext.repository.creation.RepositoryCreationServiceImpl-startRepository";
}
public Serializable execute(Serializable[] args) throws Throwable
{
// must not be executed on coordinator node, since coordinator node already created the repository
if (!rpcService.isCoordinator())
{
//RepositoryEntry (as String) rEntry
String stringRepositoryEntry = (String)args[0];
RepositoryEntry rEntry =
(RepositoryEntry)(getObject(RepositoryEntry.class,
stringRepositoryEntry.getBytes(Constants.DEFAULT_ENCODING)));
DBCreationProperties creationProps = (DBCreationProperties)args[1];