Examples of Session30RemoteBusiness


Examples of org.jboss.as.test.integration.ejb.ejb2.reference.global.Session30RemoteBusiness

    @Test
    public void testSessionHome30() throws Exception {
        InitialContext jndiContext = new InitialContext();

        Session30RemoteBusiness session = (Session30RemoteBusiness) jndiContext.lookup("java:module/Session30!" + Session30RemoteBusiness.class.getName());
        Assert.assertNotNull(session);
        String access = session.access();
        Assert.assertEquals("Session30", access);

        Session30Home home = (Session30Home) jndiContext.lookup("java:module/Session30!" + Session30Home.class.getName());
        Assert.assertNotNull(home);
        Session30 sessionRemote = (Session30) home.create();
View Full Code Here

Examples of org.jboss.as.test.integration.ejb.ejb2.reference.global.Session30RemoteBusiness

        StatefulSession30RemoteBusiness statefulSession = (StatefulSession30RemoteBusiness) jndiContext.lookup("java:module/StatefulSession30!" + StatefulSession30RemoteBusiness.class.getName());
        Assert.assertNotNull(statefulSession);
        String access = statefulSession.accessLocalStateless();
        Assert.assertEquals("Session30", access);

        Session30RemoteBusiness session = (Session30RemoteBusiness) jndiContext.lookup("java:module/Session30!" + Session30RemoteBusiness.class.getName());
        Assert.assertNotNull(session);
        access = session.accessLocalStateful();
        Assert.assertEquals("default", access);

        access = session.accessLocalStateful("testing");
        Assert.assertEquals("testing", access);

        access = session.accessLocalStateful("testing", new Integer(123));
        Assert.assertEquals("testing123", access);
    }
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.