I am trying to call localhome of EJB2.1 from EJB 3.0.
But it retuns home interface while lookup, instead of localhome.
Anybody can help how to get localhome while calling from EJB3.0.
Code is loke this -
EJBLocalHome home = (EJBLocalHome) context.lookup(name);
It returns EJBHome instead of EJBLocalHome and throws classcastexeption.
I am using java:comp/env/ejb/AnalysisService JNDI name and JBOSS 4.2.3 server.
Code works fine if call is made from EJB2.1 to EJB2.1. I am using both EJB2.1 and EJB3.0 in project.
Problem is only when making call from EJB3.0 to EJB2.1.
Is there different way of lookup for getting Local home while calling from EJB3.0?