Just started with Ejb3 and created a a web-app that uses a ejb3 bean to do some validation on data. Its all local and running on the same server. I encounter a problem with the simpel lookup of the bean, instead of returning a reference to a object of the class it returns a proxy class (which contains seemingly correct info about the class i realy want).
String name = OutlierBean.class.getSimpleName() + "/local"; obj = context.lookup(name); OutlierBean bean = (OutlierBean)obj;
You need to cast to the interface, not to the bean class.