try {
final EjbObjectProxyHandler handler;
switch (di.getComponentType()) {
case STATEFUL: {
handler = new StatefulEjbObjectHandler(di, threadContext.getPrimaryKey(), interfaceType, new ArrayList<Class>(), interfce);
break;
}
case STATELESS: {
handler = new StatelessEjbObjectHandler(di, threadContext.getPrimaryKey(), interfaceType, new ArrayList<Class>(), interfce);
break;