KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > itest > naming > client > App


1 package org.apache.geronimo.itest.naming.client;
2
3 import java.sql.Connection JavaDoc;
4 import java.lang.reflect.Method JavaDoc;
5 import java.lang.reflect.InvocationTargetException JavaDoc;
6 import javax.naming.InitialContext JavaDoc;
7 import javax.naming.Name JavaDoc;
8 import javax.naming.NamingException JavaDoc;
9 import javax.sql.DataSource JavaDoc;
10 import javax.jms.ConnectionFactory JavaDoc;
11 import javax.jms.Queue JavaDoc;
12 import javax.jms.Topic JavaDoc;
13
14 import org.apache.geronimo.naming.java.javaURLContextFactory;
15 import org.apache.geronimo.naming.java.RootContext;
16 import org.apache.geronimo.kernel.Kernel;
17 import org.apache.notgeronimo.itests.naming.common.Test;
18
19
20 public class App {
21     public static void main(String JavaDoc[] args) throws Exception JavaDoc {
22
23         String JavaDoc methodName = args[0];
24         Method JavaDoc m = App.class.getMethod(methodName, new Class JavaDoc[] {});
25
26         App app = new App();
27         try {
28             m.invoke(app, new Object JavaDoc[] {});
29             System.out.println(methodName + " OK");
30         } catch (Throwable JavaDoc e) {
31             e.printStackTrace(System.out);
32         }
33     }
34
35     public void testWebService() throws Exception JavaDoc {
36         Test test = new Test();
37         test.testWebServiceLookup();
38
39     }
40
41     public void testResourceRefLookup() throws Exception JavaDoc {
42         Test test = new Test();
43         test.testResourceRefLookup();
44     }
45
46 }
47
Popular Tags