import javax.annotation.PostConstruct;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import mypackage.UserService;

@Startup
@Singleton
public class InitializerBean {
	
	@PostConstruct
	public void init() {
		Context context = null;
		try {
			context = new InitialContext();
		} catch (NamingException ne) {
			ne.printStackTrace();
		}
		UserService service = (UserService) context.lookup("ejb:AppA/EJBA/UserServiceBean!mypackage.UserService");
	}

}
