Examples of sayHelloWorld()


Examples of org.jboss.as.test.integration.security.common.ejb3.Hello.sayHelloWorld()

    @Test
    public void testAuthorizedClient() throws Exception {
        final Properties env = configureEjbClient(CLIENT_AUTHORIZED_NAME);
        InitialContext ctx = new InitialContext(env);
        final Hello helloBean = (Hello) ctx.lookup(HELLOBEAN_LOOKUP_NAME);
        assertEquals(HelloBean.HELLO_WORLD, helloBean.sayHelloWorld());
        ctx.close();
    }

    /**
     * Tests if role check is done correctly for authenticated user.
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.ejb3.Hello.sayHelloWorld()

    public void testNotAuthorizedClient() throws Exception {
        final Properties env = configureEjbClient(CLIENT_NOT_AUTHORIZED_NAME);
        InitialContext ctx = new InitialContext(env);
        final Hello helloBean = (Hello) ctx.lookup(HELLOBEAN_LOOKUP_NAME);
        try {
            helloBean.sayHelloWorld();
            fail("The EJB call should fail for unauthorized client.");
        } catch (EJBAccessException e) {
            //OK
        }
        ctx.close();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.