Something happened (!) and I finally got it to work. As expected, you guys were right in terms of using the "jee:jndi-lookup" bean to inject an EJB 3. As I mentioned before, I've already tried that and it didn't work for me. The only plausible explanation for the error involves the way my EAR was packaged: I used the MyEclipse default which put every dependent class in the EJB jar. The classpath in the manifest file also refered to some jars within the EAR which contained some overlapping classes which could have caused the "ClassCastException"-type exception.
However, there's one thing that I learned from this and suspect it to be true: the "jee:slsb-local" and "jee:slsb-remote" beans only work with EJB 2.x and not EJB 3. Is this correct ?
Now, everything seems to be working fine but I still have one question: if the WAR containing the Spring MVC controller which is injected with the stateless EJB3 is packaged and deployed on a physical server separate from the server where the EJB jar is deployed, would the "jee:jndi-lookup" bean still work fine to inject the remote EJB into the controller ?


Reply With Quote
Whenever there is a question regarding spring-ejb integration, there always will be 2 people in topic, "throw-away-ejb" guy and "throw-away-spring" guy. What about us, we are happy with both spring and ejb, having all needed features of JBoss server on our hosting (like clustering, JTA, transactional cache, load balancing and remote calls optimization), while having unbeleivable developers performance here, in the office - they are running lightweight Spring container with embedded Jetty directly from their IDEs and do not have to deal with endless "build-deploy-wait" cycle from the EJB world.