{
ReadOnlyHelperHome rohh = (ReadOnlyHelperHome)getInitialContext().lookup("ReadOnlyHelper");
ReadOnlyHelper roHelper = rohh.create();
roHelper.setUp();
ReadOnlyHome roh = (ReadOnlyHome)getInitialContext().lookup("ReadOnly");
ReadOnly ro = roh.findByPrimaryKey(new Integer(1));
assertTrue("ReadOnly didn't get correct initial value", ro.getValue().equals(new Integer(1)));
try
{
ro.setValue(new Integer(2));
fail("Was able to set read-only field");
}
catch(RemoteException e)
{
getLog().debug("Failed to set read-only field as expected", e);