1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.ksb.server;
17
18 import org.apache.log4j.Logger;
19 import org.eclipse.jetty.server.Server;
20 import org.eclipse.jetty.webapp.WebAppContext;
21 import org.kuali.rice.core.api.config.property.ConfigContext;
22 import org.kuali.rice.ksb.BaseTestServer;
23
24 import java.net.URL;
25 import java.util.HashMap;
26 import java.util.Map;
27
28 public class TestClient2 extends BaseTestServer {
29
30 private static final Logger LOG = Logger.getLogger(TestClient2.class);
31
32 private static final String WEB_ROOT = "org/kuali/rice/ksb/testclient2";
33 private static final String CONTEXT = "/TestClient2";
34
35
36
37
38 public static final String CUSTOM_KEYSTORE = "CustomKeyStore";
39
40 private static Map<String, Object> environment = new HashMap<String, Object>();
41
42 @Override
43 protected Server createServer() {
44
45 Server server = new Server(new Integer(ConfigContext.getCurrentContextConfig().getProperty("ksb.client2.port")));
46 URL webRoot = getClass().getClassLoader().getResource(WEB_ROOT);
47 String location = webRoot.getPath();
48
49 LOG.debug("#####################################");
50 LOG.debug("#");
51 LOG.debug("# Starting Client2 using web root " + location);
52 LOG.debug("#");
53 LOG.debug("#####################################");
54
55 WebAppContext context = new WebAppContext(location, CONTEXT);
56 context.setThrowUnavailableOnStartupException(true);
57 server.setHandler(context);
58 return server;
59 }
60
61 public static Map<String, Object> getEnvironment() {
62 return environment;
63 }
64 }