Package org.jboss.test.testbyvalue.interfaces

Examples of org.jboss.test.testbyvalue.interfaces.ByValueEntity


        Context ctx = new InitialContext();
        Object objhome =
                ctx.lookup("java:comp/env/ejb/TestByValueEntity");

        ByValueEntityHome home = (ByValueEntityHome) PortableRemoteObject.narrow(objhome, ByValueEntityHome.class);
        ByValueEntity entity = home.create();

        ClassWithProperty property = new ClassWithProperty();

        property.setX(1000);

        long initTime = System.currentTimeMillis();


        for (int i=0;i<iterations;i++)
        {
            entity.doByValueTest(property);

            if (property.getX()!=1000)
            {
                throw new RuntimeException("Property was changed in a call-by-value operation");
            }
View Full Code Here


        Context ctx = new InitialContext();
        Object objhome =
                ctx.lookup("java:comp/env/ejb/TestByReferenceEntity");

        ByValueEntityHome home = (ByValueEntityHome) PortableRemoteObject.narrow(objhome, ByValueEntityHome.class);
        ByValueEntity entity = home.create();

        ClassWithProperty property = new ClassWithProperty();

        property.setX(1000);

        long initTime = System.currentTimeMillis();


        for (int i=0;i<iterations;i++)
        {
            entity.doByValueTest(property);

            if (property.getX()==1000)
            {
                throw new RuntimeException("Property was not changed in a call-by-reference operation");
            }
View Full Code Here

TOP

Related Classes of org.jboss.test.testbyvalue.interfaces.ByValueEntity

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.