Package ch.inftec.ju.ee.test

Examples of ch.inftec.ju.ee.test.TestRemote


//    jndiProperties.put(Context.PROVIDER_URL, "remote://localhost:14447");
        jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
        final Context context = new InitialContext(jndiProperties);
   
        // Important: We need to use the 'ejb:' prefix...
    TestRemote testRemote = (TestRemote) context.lookup("ejb:ee-ear-ear/ee-ear-ejb/TestRemoteBean!" + TestRemote.class.getName());
    Assert.assertEquals("TestRemoteBean says hello to EjbClientApi", testRemote.getGreeting("EjbClientApi"));
  }
View Full Code Here


//    jndiProperties.put(Context.PROVIDER_URL, "remote://localhost:14447");
        jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
        final Context context = new InitialContext(jndiProperties);
   
        // Important: We need to use the 'ejb:' prefix...
    TestRemote testRemote = (TestRemote) context.lookup("ejb:ee-ear-ear/ee-ear-ejb/TestRemoteBean!" + TestRemote.class.getName());
    Assert.assertEquals("TestRemoteBean says hello to EjbClientApi", testRemote.getGreeting("EjbClientApi"));
  }
View Full Code Here

    jndiProps.put("remote.connection.default.port", "14447");
    // create a context passing these properties
    Context ctx = new InitialContext(jndiProps);

    // Important: We can either use 'java:' as prefix or none
    TestRemote testRemote = (TestRemote) ctx.lookup("ee-ear-ear/ee-ear-ejb/TestRemoteBean!" + TestRemote.class.getName());
    Assert.assertEquals("TestRemoteBean says hello to RemoteNamingWithoutPrefix", testRemote.getGreeting("RemoteNamingWithoutPrefix"));
   
    testRemote = (TestRemote) ctx.lookup("java:ee-ear-ear/ee-ear-ejb/TestRemoteBean!" + TestRemote.class.getName());
    Assert.assertEquals("TestRemoteBean says hello to RemoteNaming", testRemote.getGreeting("RemoteNaming"));
  }
View Full Code Here

      .remoteServer("localhost", 14447)
      .appName("ee-ear-ear")
      .moduleName("ee-ear-ejb")
      .createServiceLocator();
   
    TestRemote testRemote = loc.lookup(TestRemote.class);
    Assert.assertEquals("TestRemoteBean says hello to ServiceLocatorBuilder", testRemote.getGreeting("ServiceLocatorBuilder"));
  }
View Full Code Here

TOP

Related Classes of ch.inftec.ju.ee.test.TestRemote

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.