Announcement Announcement Module
Collapse
No announcement yet.
call ejb from another ejb Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 06:12 AM.

  • #2
    Try setting "lookupHomeOnStartup" property to "false" on your SimpleRemoteStatelessSessionBeanProxyFactoryBean.

    Hope this helps,
    Andreas

    Comment

    Working...
    X