<!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;">
    Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/ymaraner">Tim Haley</a> in <i>EJB3</i> - <a href="http://community.jboss.org/message/603781#603781">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I am having the same issue.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I see entries like this in my boot.log:</p><p>{noformat}</p><p>12:49:01,125 INFO&#160; [EjbDeployer] installing bean: ejb/xyz.jar#StationHealthAuditTimer,uid917142622</p><p>12:49:01,126 INFO&#160; [EjbDeployer]&#160;&#160; with dependencies:</p><p>12:49:01,128 INFO&#160; [EjbDeployer]&#160;&#160; and supplies:</p><p>12:49:01,129 INFO&#160; [EjbDeployer]&#160; jndi:foobar/StationHealthAuditTimer/com.company.system.xyz.StationHealthAuditTimer</p><p>12:49:01,130 INFO&#160; [EjbDeployer]&#160; jndi:foobar/StationHealthAuditTimer/com.company.system.xyz.StationHealthAuditTimerLocal</p><p>12:49:01,131 INFO&#160; [EjbDeployer]&#160; jndi:ejb/StationHealthAuditTimerHome</p><p>12:49:01,132 INFO&#160; [EjbDeployer]&#160; jndi:ejb/StationHealthAuditTimerLocalHome</p><p>{noformat}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Then my @Startup bean (Lifecycle) in invoked:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>{noformat}</p><p>10:44:42,361 WARN&#160; [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated<br/>10:44:42,981 INFO&#160; [SingletonContainerDeployer] Installing container for EJB Lifecycle<br/>10:44:42,981 INFO&#160; [SingletonContainerDeployer] with dependencies: <br/>10:44:42,982 INFO&#160; [SingletonContainerDeployer] with demands: <br/>10:44:42,984 INFO&#160; [SingletonContainerDeployer] with supplies: <br/>10:44:42,999 INFO&#160; [SingletonBeanJNDIBinderDeployer] Binding the following entries in JNDI for singleton bean: Lifecycle</p><p>10:44:43,181 INFO&#160; [SessionSpecContainer] Starting jboss.j2ee:ear=foobar.ear,jar=ejb3SEE.jar,name=Lifecycle,service=EJB3<br/>10:44:43,182 WARN&#160; [SessionSpecContainer] EJBTHREE-2126: container jboss.j2ee:ear=foobar.ear,jar=ejb3SEE.jar,name=Lifecycle,service=EJB3 does not verify the businessObjectFactory<br/>10:44:43,185 INFO&#160; [EJBContainer] STARTED EJB: com.company.system.ejbvendor.jboss.Lifecycle ejbName: Lifecycle<br/>10:44:43,196 WARN&#160; [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers<br/>10:44:44,030 INFO&#160; [STDOUT] Lifecycle.startup() executed</p><p>{noformat}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Eventually, my startup bean attempts to use a JNDI lookup (ejb/StationHealthAuditTimerHome) to access my 'StationHealthAuditTimer' bean, resulting in an error:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>{noformat}</p><p>10:44:45,078 INFO&#160; [STDOUT] javax.naming.NameNotFoundException: ejb not bound</p><p>10:44:45,079 INFO&#160; [STDOUT]&#160; at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)</p><p>10:44:45,080 INFO&#160; [STDOUT]&#160; at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)</p><p>10:44:45,081 INFO&#160; [STDOUT]&#160; at org.jnp.server.NamingServer.getObject(NamingServer.java:785)</p><p>10:44:45,083 INFO&#160; [STDOUT]&#160; at org.jnp.server.NamingServer.lookup(NamingServer.java:396)</p><p>10:44:45,084 INFO&#160; [STDOUT]&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)</p><p>10:44:45,085 INFO&#160; [STDOUT]&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)</p><p>10:44:45,086 INFO&#160; [STDOUT]&#160; at javax.naming.InitialContext.lookup(InitialContext.java:392)</p><p>{noformat}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>later in the log I see this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>{noformat}</p><p>10:44:51,188 INFO&#160; [BaseLocalProxyFactory] Bound EJB LocalHome 'StationHealthAuditTimer' to jndi 'ejb/StationHealthAuditTimerLocalHome'</p><p>10:44:51,196 INFO&#160; [ProxyFactory] Bound EJB Home 'StationHealthAuditTimer' to jndi 'ejb/StationHealthAuditTimerHome'</p><p>{noformat}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So, it looks like the 'StationHealthAuditTimer' bean is deployed and associated with the correct JNDI, but it is not actually bound to jndi until after my @Startup bean is invoked.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Did something happen to change the timing of the invocation for a @Startupbean in JBoss AS 6.1 SNAPSHOT?&#160; </p><p>This works correctly in JBoss AS 6.0.0 Final.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Tim</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/603781#603781">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB3 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>