How to use <ejb-local-ref> in a separate WAR when EJB jar is deployed separately

Solution Verified - Updated -

Issue

  • Deployed an EAR application which contains EJB Jar and looking to refer to the EJB from separately deployed WAR which is deployed on the same JBoss EAP instance. We need a mechanism so that the WAR can access the classes available in the EJB Jars.
    Following is the "WEB-INF/web.xml" contents
<web-app>
 <ejb-local-ref>              
    <ejb-ref-name>ejb3/SomeService/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>ejb3.CalculatorLocal</local>               
 </ejb-local-ref>
</web-app>

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content