home *** CD-ROM | disk | FTP | other *** search
- <%@ page
- language="java"
- import="
- java.util.*,
- javax.naming.*,
- com.jproxy.proxy.*,
- com.jproxy.samples.ejb.test.*,
- com.jproxy.samples.interfaces.*
- "
- %>
-
- <%
- Properties env = new Properties();
- env.put(Context.INITIAL_CONTEXT_FACTORY, "com.jproxy.proxy.NamingContextFactory");
- env.put(Context.PROVIDER_URL, "localhost:"+request.getServerPort());
- Context context = new InitialContext(env);
- ISessionHome sessionHome = (ISessionHome)context.lookup("TestSessionBean");
- ISession ses = sessionHome.create();
- long t = ses.getServerTime();
-
- /*
- SessionClient client = new SessionClient();
- client.isStandalone = true;
- String hostUrl = "localhost:"+request.getServerPort();
- client.hostUrl = hostUrl;
- client.init();
- long t = client.session.getServerTime();
- client.destroy();
- */
- // long t = System.currentTimeMillis();
- String time = "Time: "+(new Date(t));
- %>
- <html>
- <head>
- <title>HTTP-Tunnel ORB Proxy Solution</title>
- <link rel="stylesheet" href="main.css" type="text/css">
- </head>
- <body>
- <table border=0 width="100%">
- <tr>
- <td width="100%" valign="top">
- <div align="center">TEST RESULT</div>
- <p><%=time%></p>
- </td>
- </tr>
- </table>
- </body>
- </html>
-