You need to change your lookup code accordingly. Now the EJB component and the client resides in a single VM. When you change the client to a remote JVM (in a remote machine )you need to give the IP of the the server machine in the lookup code instead of the localhost. Normally that would be the only change you need to make.
That's a very big dog. I think I want to go home now and hug this tiny ad: