<style>
/* Changing the layout to use less space for mobiles */
@media screen and (max-device-width: 480px), screen and (-webkit-min-device-pixel-ratio: 2) {
    #email-body { min-width: 30em !important; }
    #email-page { padding: 8px !important; }
    #email-banner { padding: 8px 8px 0 8px !important; }
    #email-avatar { margin: 1px 8px 8px 0 !important; padding: 0 !important; }
    #email-fields { padding: 0 8px 8px 8px !important; }
    #email-gutter { width: 0 !important; }
}
</style>
<div id="email-body">
<table id="email-wrap" align="center" border="0" cellpadding="0" cellspacing="0" style="background-color:#f0f0f0;color:#000000;width:100%;">
    <tr valign="top">
        <td id="email-page" style="padding:16px !important;">
            <table align="center" border="0" cellpadding="0" cellspacing="0" style="background-color:#ffffff;border:1px solid #bbbbbb;color:#000000;width:100%;">
                <tr valign="top">
                    <td bgcolor="#3b4d64" style="background-color:#3b4d64;color:#ffffff;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;line-height:1;"><img src="https://issues.jboss.org/s/en_US-x52yjt-1988229788/6109/58/_/jira-logo-scaled.png" alt="" style="vertical-align:top;" /></td>
                </tr><tr valign="top">
    <td id="email-banner" style="padding:32px 32px 0 32px;">

                
        
        
            <table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="width:100%;">
    <tr valign="top">
        <td style="color:#505050;font-family:Arial,FreeSans,Helvetica,sans-serif;padding:0;">
                                        <img id="email-avatar" src="https://community.jboss.org/people/nuno.godinhomatos/avatar/16.png" alt="" height="48" width="48" border="0" align="left" style="padding:0;margin: 0 16px 16px 0;" />
                        <div id="email-action" style="padding: 0 0 8px 0;font-size:12px;line-height:18px;">
                                    <a class="user-hover" rel="nuno.godinhomatos" id="email_nuno.godinhomatos" href="https://issues.jboss.org/secure/ViewProfile.jspa?name=nuno.godinhomatos" style="color:#3b73af;">Nuno Godinho de Matos</a>
     updated <img src="https://issues.jboss.org/images/icons/issuetypes/bug.png" height="16" width="16" border="0" align="absmiddle" alt="Bug"> <a style='color:#3b73af;text-decoration:none;' href='https://issues.jboss.org/browse/WELD-1619'>WELD-1619</a>
            </div>
                        <div id="email-summary" style="font-size:16px;line-height:20px;padding:2px 0 16px 0;">
                <a style='color:#3b73af;text-decoration:none;' href='https://issues.jboss.org/browse/WELD-1619'><strong>Java SE (weld-se) With surefire threaded perl class fails after the first thread call to weld.shutdown</strong></a>
            </div>
                    </td>
    </tr>
</table>
        
    </td>
</tr>
<tr valign="top">
    <td id="email-fields" style="padding:0 32px 32px 32px;">
        <table border="0" cellpadding="0" cellspacing="0" style="padding:0;text-align:left;width:100%;" width="100%">
            <tr valign="top">
                <td id="email-gutter" style="width:64px;white-space:nowrap;"></td>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                    <tr valign="top">
        <td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
            <strong style="font-weight:normal;color:#505050;">Change By:</strong>
        </td>
        <td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
                                                <a class="user-hover" rel="nuno.godinhomatos" id="email_nuno.godinhomatos" href="https://issues.jboss.org/secure/ViewProfile.jspa?name=nuno.godinhomatos" style="color:#3b73af;">Nuno Godinho de Matos</a>
                            (13/Mar/14 9:55 AM)
        </td>
    </tr>
            <tr valign="top">
        <td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
            <strong style="font-weight:normal;color:#505050;">Description:</strong>
        </td>
        <td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
                                    <span class="diffaddedchars" style="background-color:#ddfade;"><br>Project&nbsp;that&nbsp;tries&nbsp;to&nbsp;illustrate&nbsp;error:<br>https://drive.google.com/file/d/0B_dEiNBGUsxqaG5tdTVuT2RqT00/edit?usp=sharing<br><br>Summary:<br>-&nbsp;surefire&nbsp;threaded&nbsp;option<br>-&nbsp;test&nbsp;thread&nbsp;calls&nbsp;weld.shutdown()<br>-&nbsp;all&nbsp;other&nbsp;threads&nbsp;still&nbsp;working&nbsp;will&nbsp;have&nbsp;random&nbsp;problems&nbsp;using&nbsp;their&nbsp;own&nbsp;non&nbsp;shared&nbsp;weld&nbsp;containers<br><br><br>Context:<br></span>
<span class="diffcontext">I&nbsp;am&nbsp;creating&nbsp;some&nbsp;UI&nbsp;Tests&nbsp;based&nbsp;on&nbsp;selenium.&nbsp;UI&nbsp;testing&nbsp;is&nbsp;overall&nbsp;a&nbsp;slow&nbsp;process&nbsp;with&nbsp;the&nbsp;opening&nbsp;of&nbsp;the&nbsp;browser&nbsp;and&nbsp;all&nbsp;the&nbsp;orchestration,&nbsp;so&nbsp;multi-threading&nbsp;the&nbsp;tests&nbsp;is&nbsp;a&nbsp;must.<br><br></span>
<span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">Intially</span>
<span class="diffaddedchars" style="background-color:#ddfade;">Initially</span>
<span class="diffcontext">&nbsp;I&nbsp;was&nbsp;using&nbsp;Google&nbsp;Guice&nbsp;for&nbsp;IoC,&nbsp;but&nbsp;I&nbsp;have&nbsp;switched&nbsp;to&nbsp;weld.&nbsp;<br>The&nbsp;UI&nbsp;tests&nbsp;used&nbsp;to&nbsp;be&nbsp;successful&nbsp;in&nbsp;Guice&nbsp;using&nbsp;surefire&nbsp;&lt;threadCound&gt;&lt;/threadCoun&gt;&nbsp;configuration&nbsp;property.<br>When&nbsp;I&nbsp;switched&nbsp;to&nbsp;Weld,&nbsp;this&nbsp;stopped&nbsp;being&nbsp;the&nbsp;case.<br>The&nbsp;tests&nbsp;consistently&nbsp;break&nbsp;with&nbsp;several&nbsp;different&nbsp;exceptions&nbsp;at&nbsp;several&nbsp;different&nbsp;points&nbsp;of&nbsp;the&nbsp;life&nbsp;cycle&nbsp;of&nbsp;the&nbsp;test.<br><br>Summary&nbsp;of&nbsp;test&nbsp;policy:<br>Each&nbsp;test&nbsp;class&nbsp;contains&nbsp;a&nbsp;Weld&nbsp;and&nbsp;WeldContainer&nbsp;object&nbsp;that&nbsp;is&nbsp;unique&nbsp;to&nbsp;itself&nbsp;and&nbsp;not&nbsp;shared&nbsp;in&nbsp;any&nbsp;way.&nbsp;There&nbsp;are&nbsp;no&nbsp;race&nbsp;conditions&nbsp;on&nbsp;&nbsp;these&nbsp;objects,&nbsp;since&nbsp;each&nbsp;test&nbsp;class&nbsp;contains&nbsp;a&nbsp;single&nbsp;test,&nbsp;and&nbsp;each&nbsp;test&nbsp;is&nbsp;given&nbsp;a&nbsp;single&nbsp;thread&nbsp;by&nbsp;the&nbsp;surefire&nbsp;plugin.<br><br>What&nbsp;seems&nbsp;to&nbsp;be&nbsp;happening&nbsp;here&nbsp;is&nbsp;that&nbsp;the&nbsp;<br>weld.shutdown();<br><br>call&nbsp;seems&nbsp;to&nbsp;have&nbsp;a&nbsp;cross&nbsp;cutting&nbsp;power&nbsp;across&nbsp;all&nbsp;the&nbsp;running&nbsp;threads.<br>That&nbsp;is,&nbsp;even&nbsp;though&nbsp;each&nbsp;test&nbsp;class&nbsp;has&nbsp;its&nbsp;own&nbsp;weld&nbsp;object&nbsp;that&nbsp;it&nbsp;uses&nbsp;to&nbsp;create&nbsp;a&nbsp;weld&nbsp;container.<br>As&nbsp;soon&nbsp;as&nbsp;the&nbsp;first&nbsp;test&nbsp;thread&nbsp;concludes&nbsp;the&nbsp;test&nbsp;and&nbsp;reaches&nbsp;the&nbsp;tearDown()&nbsp;moment,&nbsp;and&nbsp;invokes&nbsp;weld.shutdown(),&nbsp;from&nbsp;this&nbsp;point&nbsp;onward&nbsp;the&nbsp;ramaining&nbsp;tests&nbsp;seem&nbsp;to&nbsp;start&nbsp;dieing&nbsp;with&nbsp;arbitrary&nbsp;exceptions.<br><br>For&nbsp;example,&nbsp;I&nbsp;have&nbsp;head&nbsp;tests&nbsp;where&nbsp;the&nbsp;container.initilize()&nbsp;appears&nbsp;to&nbsp;be&nbsp;very&nbsp;successful,&nbsp;but&nbsp;after&nbsp;that&nbsp;trying&nbsp;to&nbsp;get&nbsp;a&nbsp;bean&nbsp;from&nbsp;the&nbsp;container&nbsp;will&nbsp;result&nbsp;in&nbsp;a:<br>WELD-001308&nbsp;Unable&nbsp;to&nbsp;resolve&nbsp;any&nbsp;beans&nbsp;for&nbsp;Types:&nbsp;<br><br>Other&nbsp;tests&nbsp;that&nbsp;seem&nbsp;to&nbsp;have&nbsp;passe&nbsp;the&nbsp;@Test()&nbsp;point&nbsp;ad&nbsp;have&nbsp;reached&nbsp;teh&nbsp;tearDown()&nbsp;phase,&nbsp;these&nbsp;will&nbsp;failing&nbsp;trying&nbsp;to&nbsp;close&nbsp;the&nbsp;weld&nbsp;instance&nbsp;variable&nbsp;with&nbsp;arbtirary&nbsp;erros,&nbsp;such&nbsp;as:<br><br>java.lang.NullPointerException<br>        at&nbsp;org.jboss.weld.environment.se.ShutdownManager.shutdown(ShutdownManager.java:42)<br>        at&nbsp;org.jboss.weld.environment.se.ShutdownManager$Proxy$_$$_WeldClientProxy.shutdown(ShutdownManager$Proxy$_$$_WeldClientProxy.java)<br>        at&nbsp;org.jboss.weld.environment.se.Weld.shutdown(Weld.java:218)<br><br><br>Or&nbsp;such&nbsp;as:<br>java.lang.IllegalStateException:&nbsp;Singleton&nbsp;is&nbsp;not&nbsp;set.&nbsp;Is&nbsp;your&nbsp;Thread.currentThread().getContextClassLoader()&nbsp;set&nbsp;correctly?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get(IsolatedStaticSingletonProvider.java:52)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.Container.instance(Container.java:67)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.bean.AbstractBean.initialize(AbstractBean.java:134)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.bean.AbstractClassBean.initialize(AbstractClassBean.java:205)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.bean.ManagedBean.initialize(ManagedBean.java:327)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:116)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:217)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:365)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.deployBeans(ForwardingBootstrap.java:70)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.jboss.weld.environment.se.Weld.initialize(Weld.java:137)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;WeldBugReportSurefireTest.setUp(WeldBugReportSurefireTest.java:65)<br><br><br><br>It&nbsp;is&nbsp;very&nbsp;hard&nbsp;to&nbsp;decide&nbsp;on&nbsp;an&nbsp;exception&nbsp;to&nbsp;report,&nbsp;so&nbsp;many&nbsp;take&nbsp;place&nbsp;an&nbsp;arbitrarly.&nbsp;<br><br>To&nbsp;make&nbsp;the&nbsp;tests&nbsp;pass&nbsp;I&nbsp;have&nbsp;have&nbsp;to&nbsp;use&nbsp;surefire&nbsp;configured&nbsp;for&nbsp;forking,&nbsp;witout&nbsp;re-use&nbsp;of&nbsp;forks.&nbsp;This&nbsp;solves&nbsp;my&nbsp;multi-threading&nbsp;issue.<br>But&nbsp;I&nbsp;am&nbsp;concerned&nbsp;with&nbsp;the&nbsp;erros&nbsp;I&nbsp;am&nbsp;getting,&nbsp;because&nbsp;I&nbsp;can&nbsp;envision&nbsp;scenarios&nbsp;where&nbsp;an&nbsp;application&nbsp;really&nbsp;needs&nbsp;to&nbsp;created&nbsp;different&nbsp;container&nbsp;objects&nbsp;that&nbsp;it&nbsp;shutsdown&nbsp;when&nbsp;appropriate&nbsp;without&nbsp;disturbing&nbsp;the&nbsp;other&nbsp;opened&nbsp;containers,&nbsp;as&nbsp;you&nbsp;can&nbsp;do&nbsp;with&nbsp;guice.<br><br><br>I&nbsp;have&nbsp;tried&nbsp;to&nbsp;compile&nbsp;a&nbsp;small&nbsp;project&nbsp;where&nbsp;this&nbsp;error&nbsp;can&nbsp;be&nbsp;reproduced.<br>I&nbsp;cannot&nbsp;use&nbsp;the&nbsp;real&nbsp;project&nbsp;for&nbsp;privacy&nbsp;reasons,&nbsp;so&nbsp;the&nbsp;exceptions&nbsp;that&nbsp;my&nbsp;sample&nbsp;project&nbsp;yields&nbsp;do&nbsp;not&nbsp;correspond&nbsp;exactly&nbsp;to&nbsp;the&nbsp;ones&nbsp;I&nbsp;get&nbsp;in&nbsp;my&nbsp;project...&nbsp;<br><br>In&nbsp;this&nbsp;project,&nbsp;tests&nbsp;can&nbsp;be&nbsp;triggered&nbsp;through&nbsp;the&nbsp;comand&nbsp;line&nbsp;with&nbsp;either:<br>mvn&nbsp;test<br>mvn&nbsp;-P&nbsp;parallel&nbsp;test<br>the&nbsp;mvn&nbsp;test&nbsp;runs&nbsp;one&nbsp;test&nbsp;at&nbsp;a&nbsp;time,&nbsp;the&nbsp;normal&nbsp;way,&nbsp;and&nbsp;should&nbsp;be&nbsp;successful.<br>the&nbsp;mvn&nbsp;-P&nbsp;parallel&nbsp;test&nbsp;<br>should&nbsp;break&nbsp;most&nbsp;of&nbsp;the&nbsp;time&nbsp;with&nbsp;arbitrary&nbsp;exceptions&nbsp;on&nbsp;arbitrary&nbsp;test&nbsp;classes<br><br>And&nbsp;if&nbsp;the&nbsp;managed&nbsp;bean&nbsp;DummyManagedBean.java&nbsp;has&nbsp;a&nbsp;flag&nbsp;property&nbsp;that&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;get&nbsp;the&nbsp;tests&nbsp;to&nbsp;pass&nbsp;when&nbsp;in&nbsp;parallel.<br>what&nbsp;this&nbsp;flag&nbsp;will&nbsp;do&nbsp;is&nbsp;make&nbsp;the&nbsp;thread&nbsp;postpone&nbsp;the&nbsp;test&nbsp;for&nbsp;long&nbsp;enough,&nbsp;for&nbsp;all&nbsp;other&nbsp;threads&nbsp;to&nbsp;complete&nbsp;their&nbsp;business&nbsp;logic,&nbsp;thus&nbsp;avoiding&nbsp;a&nbsp;weld&nbsp;shutdown&nbsp;to&nbsp;occur&nbsp;before&nbsp;the&nbsp;tests&nbsp;complete.<br><br></span>
<span class="diffaddedchars" style="background-color:#ddfade;"><br></span>

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













            </table>
        </td><!-- End #email-page -->
    </tr>
    <tr valign="top">
        <td style="color:#505050;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:10px;line-height:14px;padding: 0 16px 16px 16px;text-align:center;">
            This message is automatically generated by JIRA.<br />
            If you think it was sent incorrectly, please contact your JIRA administrators<br />
            For more information on JIRA, see: <a style='color:#3b73af;' href='http://www.atlassian.com/software/jira'>http://www.atlassian.com/software/jira</a>
        </td>
    </tr>
</table><!-- End #email-wrap -->
</div><!-- End #email-body -->