<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
EJB Local reference
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/spandit2">Sunil Pandit</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/636498#636498">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Folks ,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I am trying to deploy an ear containing two ejb's . Both the ejb's are stateless session .  Both the ejb's are in the same Jar file .</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Definition of First EJB is like this</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><ejb-name>SystemAccess</ejb-name></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>         <local-home>com.csc.fs.sa.ejb.SystemAccessLocalHome</local-home></p><p>         <local>com.csc.fs.sa.ejb.SystemAccessLocal</local></p><p>         <ejb-class>com.csc.fs.sa.ejb.SystemAccessSession</ejb-class></p><p>         <session-type>Stateless</session-type></p><p>         <transaction-type>Bean</transaction-type></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>When I start the server , the log message indicates that the JNDI binding is done .</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>16:08:35,001 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named SystemAccess in deployment unit subdeployment "accelEJB.jar" of deployment "formsMgmtAdminJB7EARa.ear" are as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    java:global/formsMgmtAdminJB7EARa/accelEJB/SystemAccess!com.csc.fs.SystemAccess</p><p>    java:app/accelEJB/SystemAccess!com.csc.fs.SystemAccess</p><p>    java:module/SystemAccess!com.csc.fs.SystemAccess</p><p>    java:global/formsMgmtAdminJB7EARa/accelEJB/SystemAccess</p><p>    java:app/accelEJB/SystemAccess</p><p>    java:module/SystemAccess</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>16:08:35,001 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named ServiceController in deployment unit subdeployment "accelEJB.jar" of deployment "formsMgmtAdminJB7EARa.ear" are as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    java:global/formsMgmtAdminJB7EARa/accelEJB/ServiceController!com.csc.fs.ejb.ServiceControllerSession</p><p>    java:app/accelEJB/ServiceController!com.csc.fs.ejb.ServiceControllerSession</p><p>    java:module/ServiceController!com.csc.fs.ejb.ServiceControllerSession</p><p>    java:global/formsMgmtAdminJB7EARa/accelEJB/ServiceController</p><p>    java:app/accelEJB/ServiceController</p><p>    java:module/ServiceController</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>However  the second EJB has ejb-local-ref to first ejb</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><ejb-local-ref id="EJBLocalRef_1"></p><p>            <ejb-ref-name>ejb/accelerator/comp/SystemAccess</ejb-ref-name></p><p>            <ejb-ref-type>Session</ejb-ref-type></p><p>            <local-home>com.csc.fs.sa.ejb.SystemAccessLocalHome</local-home></p><p>            <local>com.csc.fs.sa.ejb.SystemAccessLocal</local></p><p>            <span style="color: #3366ff;"><ejb-link>java:module/SystemAccess</ejb-link></span></p><p>         </ejb-local-ref></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Jboss throws an error saying </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: No component found for type 'com.csc.fs.sa.ejb.SystemAccessLocal' with name java:module/SystemAccess</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>What am I missing here . Is the local reference not supported ? </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Can some one shed some light please ? Is there any sample out there ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks</p><p>Sunil</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/636498#636498">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>