Results 1 to 2 of 2

Thread: call ejb from another ejb

  1. #1
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    4

    Default call ejb from another ejb

    Hi,

    i try to call a session bean from another session bean by local interfaces in JBOSS 3.2.3
    I configure in right way the xml descriptor.
    example:

    <bean id="ejb" class="org.springframework.ejb.access.LocalStatele ssSessionProxyFactoryBean" >
    <property name="jndiName">
    <value>TestEjbStateless</value>
    </property>
    <property name="resourceRef">
    <value>true</value>
    </property>
    <property name="businessInterface">
    <value>com.dp2k.study.test.stateless.TestEjbStatel essLocal</value>
    </property>
    </bean>

    I get the spring context with:

    -->BeanFactoryLocator beanFactoryLocator = ContextSingletonBeanFactoryLocator.getInstance("ME TA-INF/beanRefContext.xml");

    and then the fBeanFactory from beanFactoryLocator:

    --> BeanFactoryReference br = beanFactoryLocator.useBeanFactory("SpringCtxTest") ;

    --> logger.debug("Ottenuto beanFactoryReference");

    --> BeanFactory beanFactory = br.getFactory();


    and i get the ejb reference from beanFactory:

    -->TestEjbStatelessLocal testLocal = (TestEjbStatelessLocal) factory.getBean("ejb");

    the problem is :

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'ejb' defined in class path resource [META-INF/applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: TestEjbStateless not bound[/B][/I]

    the ejb session object is deployed successfully .
    If i try to get ejb reference via traditional Locator (jndi loockup) i get the right reference.

    any suggestion for this issue?

    thanks
    Last edited by maurix; Feb 24th, 2006 at 05:12 AM.

  2. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    Try setting "lookupHomeOnStartup" property to "false" on your SimpleRemoteStatelessSessionBeanProxyFactoryBean.

    Hope this helps,
    Andreas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •