fixed client

This commit is contained in:
2024-02-21 08:59:39 +08:00
parent b1297b3194
commit b1a7bcc9a8

View File

@@ -2,6 +2,7 @@ package net.woggioni.jpacrepo.client;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import net.woggioni.jpacrepo.api.service.FileSystemSynchronizer;
import net.woggioni.jpacrepo.api.service.PacmanServiceRemote;
import javax.naming.Context;
@@ -48,11 +49,12 @@ public class Main {
Context ctx = new InitialContext(prop);
traverseJndiNode("/", context);
// final PacmanService stateService = (PacmanService) ctx.lookup("/jpacrepo-1.0/remote/PacmanServiceEJB!service.PacmanService");
final PacmanServiceRemote service = (PacmanServiceRemote) ctx.lookup(
"/jpacrepo-2.0-SNAPSHOT/PacmanServiceEJB!net.woggioni.jpacrepo.api.service.PacmanServiceRemote"
final FileSystemSynchronizer service = (FileSystemSynchronizer) ctx.lookup(
"/jpacrepo/PackageSynchronizerEJB!net.woggioni.jpacrepo.api.service.FileSystemSynchronizer"
);
// List<PkgData> pkgs = service.searchPackage("google-earth", null, null, 1, 10);
// System.out.println(new XStream().toXML(pkgs));
service.syncDB();
service.syncDb();
}
}