Hi All!

I can deploy successfully the EJB JAR that defines remote stateful session bean.
But I have a problem while deploying WAR application that needs to retrieve this remote session bean.

In my EJB JAR I have defined two files: META-INF/ejb-jar.xml and META-INF/openejb-jar.xml

ejb-jar.xml extract follows:
<enterprise-beans>
<session>
            <display-name>ModuleFactory</display-name>
            <ejb-name>ModuleFactory</ejb-name>
            <home>org.xh.dataweaver.common.ejb.ModuleFactoryHome</home>
            <remote>org.xh.dataweaver.common.ejb.ModuleFactory</remote>
            <ejb-class>org.xh.dataweaver.enterprise.core.ejb.ModuleFactoryBean</ejb-class>
            <session-type>Stateful</session-type>
            <transaction-type>Container</transaction-type>
</session>
</enterprise-beans>

openejb-jar.xml extract follows:
<enterprise-beans>
    <session>
    <ejb-name>ModuleFactory</ejb-name>
    <ejb-ref>
        <ref-name>ejb/ModuleFactory</ref-name>
        <ejb-link>ModuleFactory</ejb-link>
    </ejb-ref>
    </session>
</enterprise-beans>


After successful deployment of EJB JAR I tried to create proper web.xml file for my WAR application.

In WEB-INF/web.xml I wrote:
<ejb-ref>
    <ejb-ref-name>ejb/ModuleFactory</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>org.xh.dataweaver.common.ejb.ModuleFactoryHome</home>
    <remote>org.xh.dataweaver.common.ejb.ModuleFactory</remote>
    <ejb-link>ModuleFactory</ejb-link>
</ejb-ref>

But when I'm deploying WAR I receive:

Could not find an EJB for reference ejb/ModuleFactory to a remote session bean that has the home interface org.xh.dataweaver.common.ejb.ModuleFactoryHome and the remote interface org.xh.dataweaver.common.ejb.ModuleFactory

what am I doing wrong?
I read http://cwiki.apache.org/GMOxDOC11/ejb-sample-application.html and
http://cwiki.apache.org/GMOxDOC11/very-simple-session-ejb-example.html
but I still don't see the error in my descriptors...

thanks in advance for help
best regards
Lukasz


Yahoo! Answers - Get better answers from someone who knows. Try it now.