Hai Prem
Thanks for the solution, i know if i can directly put my class name as an argument it would work, the problem is my application design prevents me from having the myhome.class in the same package as in the service locator, because if i have 1000 EJBs then i have to have 1000 Home interface classes in my service locator package that would blow up my main idea of using a service locator
the main idea is
the developer who is gonna use my service locator will use the following method
MyHome home = ServiceLocator.getHome(jndiName)
so inside the Servicelocator's getHome method i would find the home object of the
ejb with the corresponding JNDi name and use the narrow method and send it back to the developer
so what would be the solution for this problem
so i thought of using this kinda shortcuts