Also, my client app:
|
| package com.test.ejbtest;
|
| import java.util.Hashtable;
|
| import javax.naming.Context;
| import javax.naming.InitialContext;
|
| /**
| *
| *
| * TODO To change the template for this generated type comment go to
| * Window - Preferences - Java - Code Style - Code Templates
| */
| public class TestClient {
|
| public static void main(String[] args) {
|
|
| Hashtable env = new Hashtable();
| env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
| env.put(Context.PROVIDER_URL, "marge.ndindustries.com:1099");
| env.put("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
|
| System.out.println("Attempting connection to server...");
|
| try
| {
|
| System.out.println("A");
|
| Context ctx = new InitialContext(env);
|
| System.out.println("B");
|
| Object obj = ctx.lookup("TestEJB");
|
| System.out.println("C");
|
| TestEJBHome home =
(TestEJBHome)javax.rmi.PortableRemoteObject.narrow(obj, TestEJBHome.class);
|
| TestEJB testejb = home.create();
|
| System.out.println("The server said" + testejb.test());
|
| testejb.remove();
|
| }
|
| catch (Exception e) {
|
| e.printStackTrace();
| System.out.println( "Exception: " + e.getMessage() );
|
| }
|
| }
| }
|
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844820#3844820
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844820
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user