tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lamle <la...@wapice.com>
Subject how to get local/remote ejb stored in spring from a servlet - openejb spring integration
Date Wed, 06 Jul 2011 07:08:33 GMT
Hi all,
I am having problem with OpenEJB Spring integration and hopefully i can get
some help from here.
I download the \spring-integration project from svn and run it in
tomcat/openejb server and test with junit then it worked fine.
However, when i call the below method from a servlet then it does not work:

ClassPathXmlApplicationContext context = new
ClassPathXmlApplicationContext("movies.xml");
        // Can I lookup the Cineplex EJB via the Spring ApplicationContext
        Cineplex cineplex = (Cineplex) context.getBean("CineplexImplLocal");

or:

InitialContext initialContext = new InitialContext(properties);
CineplexLocal s = (CineplexLocal)initialContext.lookup("CineplexImplLocal");

It said bean  CineplexImplLocal cannot be found but in junit it worked. So
what is the problem and how to fix this?
Thanks. 

--
View this message in context: http://openejb.979440.n4.nabble.com/how-to-get-local-remote-ejb-stored-in-spring-from-a-servlet-openejb-spring-integration-tp3647869p3647869.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message