KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > interceptor > client > Client


1 /*
2  * JBoss, the OpenSource EJB server
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.tutorial.interceptor.client;
8
9 import org.jboss.tutorial.interceptor.bean.EmailSystem;
10 import org.jboss.tutorial.interceptor.bean.EmailSystem;
11
12 import javax.jms.Queue JavaDoc;
13 import javax.jms.QueueConnection JavaDoc;
14 import javax.jms.QueueConnectionFactory JavaDoc;
15 import javax.jms.QueueSender JavaDoc;
16 import javax.jms.QueueSession JavaDoc;
17 import javax.jms.TextMessage JavaDoc;
18 import javax.naming.InitialContext JavaDoc;
19
20 public class Client
21 {
22    public static void main(String JavaDoc[] args) throws Exception JavaDoc
23    {
24       System.out.println("Starting");
25       InitialContext JavaDoc ctx = new InitialContext JavaDoc();
26       EmailSystem emailSystem = (EmailSystem)ctx.lookup(EmailSystem.class.getName());
27       emailSystem.emailLostPassword("whatever");
28       System.out.println("Done");
29    }
30 }
31
Popular Tags