sample code for JActor