<!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;">
Does @Singleton work ?
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/pewal">Paolo Proni</a> in <i>EJB3</i> - <a href="http://community.jboss.org/message/610545#610545">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hello everybody, I am using JBoss 6 stable and I try to deploy this simple example class:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px;"><span style="color: #901a66;"><strong>package</strong></span> org.byteliberi.comanchero.ejb;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px;"><span style="color: #901a66;"><strong>import</strong></span> javax.annotation.PostConstruct;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;"><span style="color: #901a66;"><strong>import</strong></span> javax.ejb.Singleton;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;"><span style="color: #901a66;"><strong>import</strong></span> javax.ejb.Startup;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px; color: #777777;">@Startup</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; color: #777777;">@Singleton</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;"><span style="color: #901a66;"><strong>public</strong></span> <span style="color: #901a66;"><strong>class</strong></span> StatusBean {</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">  <span style="color: #901a66;"><strong>private</strong></span> String <span style="text-decoration: underline; color: #172cc6;">status</span>;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px; color: #777777;"><span style="color: #000000;">  </span>@PostConstruct</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">  <span style="color: #901a66;"><strong>void</strong></span> init() {</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">    <span style="color: #172cc6;">status</span> = <span style="color: #413af9;">"Ready"</span>;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">  }</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">  </p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">When I deploy I get:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">13:18:47,797 WARN  [org.jboss.profileservice.deployment.hotdeploy.HDScanner] Scan failed: <span style="text-decoration: underline; color: #0d1d8f;">org.jboss.deployers.client.spi.IncompleteDeploymentException</span>: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">DEPLOYMENTS MISSING DEPENDENCIES:</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">  Deployment "jboss.j2ee:ear=ComancheroBiz.ear,jar=ComancheroBizEJB.jar,name=StatusBean,service=EJB3_endpoint" is missing the following dependencies:</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">    Dependency "jboss.j2ee:ear=ComancheroBiz.ear,jar=ComancheroBizEJB.jar,name=StatusBean,service=EJB3" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.j2ee:ear=ComancheroBiz.ear,jar=ComancheroBizEJB.jar,name=StatusBean,service=EJB3' **")</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">DEPLOYMENTS IN ERROR:</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">  Deployment "jboss.j2ee:ear=ComancheroBiz.ear,jar=ComancheroBizEJB.jar,name=StatusBean,service=EJB3" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.j2ee:ear=ComancheroBiz.ear,jar=ComancheroBizEJB.jar,name=StatusBean,service=EJB3' **</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(<span style="text-decoration: underline; color: #0d1d8f;">DeployersImpl.java:1370</span>) [:2.2.0.GA]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(<span style="text-decoration: underline; color: #0d1d8f;">DeployersImpl.java:1316</span>) [:2.2.0.GA]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(<span style="text-decoration: underline; color: #0d1d8f;">MainDeployerImpl.java:968</span>) [:2.2.0.GA]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(<span style="text-decoration: underline; color: #0d1d8f;">MainDeployerPlugin.java:82</span>) [:6.0.0.Final]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(<span style="text-decoration: underline; color: #0d1d8f;">ProfileControllerContext.java:138</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(<span style="text-decoration: underline; color: #0d1d8f;">HDScanner.java:246</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(<span style="text-decoration: underline; color: #0d1d8f;">HDScanner.java:192</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(<span style="text-decoration: underline; color: #0d1d8f;">TwoPCActionWrapper.java:57</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(<span style="text-decoration: underline; color: #0d1d8f;">AbstractTwoPhaseModificationAction.java:74</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(<span style="text-decoration: underline; color: #0d1d8f;">AbstractTwoPhaseModificationAction.java:95</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.management.ModificationSession.prepare(<span style="text-decoration: underline; color: #0d1d8f;">ModificationSession.java:87</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.management.AbstractActionController.internalPerfom(<span style="text-decoration: underline; color: #0d1d8f;">AbstractActionController.java:234</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.management.AbstractActionController.performWrite(<span style="text-decoration: underline; color: #0d1d8f;">AbstractActionController.java:213</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.management.AbstractActionController.perform(<span style="text-decoration: underline; color: #0d1d8f;">AbstractActionController.java:150</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.management.AbstractActionController.perform(<span style="text-decoration: underline; color: #0d1d8f;">AbstractActionController.java:135</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(<span style="text-decoration: underline; color: #0d1d8f;">HDScanner.java:146</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(<span style="text-decoration: underline; color: #0d1d8f;">HDScanner.java:90</span>) [:0.2.2]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at java.util.concurrent.Executors$RunnableAdapter.call(<span style="text-decoration: underline; color: #0d1d8f;">Executors.java:441</span>) [:1.6.0_24]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(<span style="text-decoration: underline; color: #0d1d8f;">FutureTask.java:317</span>) [:1.6.0_24]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at java.util.concurrent.FutureTask.runAndReset(<span style="text-decoration: underline; color: #0d1d8f;">FutureTask.java:150</span>) [:1.6.0_24]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(<span style="text-decoration: underline; color: #0d1d8f;">ScheduledThreadPoolExecutor.java:98</span>) [:1.6.0_24]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(<span style="text-decoration: underline; color: #0d1d8f;">ScheduledThreadPoolExecutor.java:180</span>) [:1.6.0_24]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(<span style="text-decoration: underline; color: #0d1d8f;">ScheduledThreadPoolExecutor.java:204</span>) [:1.6.0_24]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(<span style="text-decoration: underline; color: #0d1d8f;">ThreadPoolExecutor.java:886</span>) [:1.6.0_24]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at java.util.concurrent.ThreadPoolExecutor$Worker.run(<span style="text-decoration: underline; color: #0d1d8f;">ThreadPoolExecutor.java:908</span>) [:1.6.0_24]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px;">          at java.lang.Thread.run(<span style="text-decoration: underline; color: #0d1d8f;">Thread.java:680</span>) [:1.6.0_24]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>What can I do ?</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/610545#610545">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>