I think you need to set a custom jnditemplate. Personally i used jee namespace, thats easier Le 31 août 2012 22:22, "laredotornado" <laredotorn...@gmail.com> a écrit :
> Hi, > > I am using jee:lookup, at least I think so. We use a "jndiName" property > in > the Spring application context file. Here's the declaration in that file > ... > > > <?xml version="1.0" encoding="iso-8859-1"?> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" > "http://www.springframework.org/dtd/spring-beans.dtd"> > > ===================== Begin spring context snippet > =========================== > <beans> > … > <bean > > class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean" > lazy-init="true" singleton="true" id="standardManager"> > <property name="jndiName"> > <value>MyProjectStandardManager</value> > </property> > <property name="businessInterface"> > > <value>myprojectx.skills.MyProjectStandardManager_IF</value> > </property> > </bean> > <alias alias="MyProjectStandardManager" name="standardManager"/> > </beans> > ===================== End Spring context snippet > =========================== > > > And here's how we declare the bean in the ejb-jar.xml file. I have > verified > through debugging that OpenEJB is including this file in the classpath. So > I'm not sure what to troubleshoot next, other than the fact that maybe > OpenEJB is inserting things in a context that Spring isn't using: > > > ===================== Begin ejb-jar.xml file =========================== > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise > JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd" > ;> > > <ejb-jar id="ejb-jar_1"> > <description></description> > <display-name>Generated by XDoclet</display-name> > <enterprise-beans> > > > <session id="Session_MyProjectStandardManager"> > <description></description> > <ejb-name>MyProjectStandardManager</ejb-name> > <home>myprojectx.skills.MyProjectStandardManagerHome</home> > <remote>myprojectx.skills.MyProjectStandardManager</remote> > > > <local-home>myprojectx.skills.MyProjectStandardManagerLocalHome</local-home> > <local>myprojectx.skills.MyProjectStandardManagerLocal</local> > > <ejb-class>myprojectx.skills.MyProjectStandardManagerEJB</ejb-class> > <session-type>Stateless</session-type> > <transaction-type>Container</transaction-type> > </session> > … > </ejb-jar> > ===================== End ejb-jar.xml file =========================== > > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/Confusion-about-InitialContexts-with-my-Spring-JUnit-test-tp4657188p4657204.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >