introduced multithreading in initial database creation

This commit is contained in:
2015-04-12 11:46:24 +02:00
parent 8a867831fb
commit db786b73c9
10 changed files with 171 additions and 90 deletions

View File

@@ -35,7 +35,7 @@ public class ParseTest
}
@Test
public void invokeStatelessBean() throws NamingException, IOException
public void invokeStatelessBean() throws Exception
{
// Let's lookup the remote stateless calculator
@@ -45,7 +45,8 @@ public class ParseTest
prop.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
prop.put(Context.PROVIDER_URL, "http-remoting://odroid-u3:8080");
prop.put(Context.PROVIDER_URL, "http-remoting://localhost:8080");
// prop.put(Context.PROVIDER_URL, "http-remoting://odroid-u3:8080");
// prop.put(Context.PROVIDER_URL, "remote://odroid-u3:4447");
prop.put(Context.SECURITY_PRINCIPAL, "jpacrepo");
prop.put(Context.SECURITY_CREDENTIALS, "password01.");
@@ -54,8 +55,8 @@ public class ParseTest
Context ctx = new InitialContext(prop);
traverseJndiNode("/", context);
// final PacmanService stateService = (PacmanService) ctx.lookup("/jpacrepo-1.0/remote/PacmanServiceEJB!service.PacmanService");
final PacmanService stateService = (PacmanService) ctx.lookup("/jpacrepo-1.0/PacmanServiceEJB!service.PacmanService");
stateService.syncDB();
final PacmanService stateService = (PacmanService) ctx.lookup("/jpacrepo-1.0/PacmanServiceEJB!org.jpacrepo.service.PacmanService");
stateService.deletePackage("linux-3.19.3-3-x86_64.pkg.tar.xz");
}
private static void traverseJndiNode(String nodeName, Context context) {