package mypackage;

import javax.ejb.Stateless;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

@Stateless
public class CallerServiceBean implements CallerService {

	@Override
	public void call() {
		Context context = null;
		try {
			context = new InitialContext();
			UserService service = (UserService) context.lookup("ejb:AppA/EJBA/UserServiceBean!mypackage.UserService");
			System.out.println("UserService is found : " + service.toString());
		} catch (NamingException ne) {
			ne.printStackTrace();
		}
	}

}
