Note that there are some explanatory texts on larger screens.

plurals
  1. PONetbeans: Weird weld se behavior
    primarykey
    data
    text
    <p>Following the official <a href="http://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#d0e5333" rel="nofollow">documentation</a> I implemented a very simple Java SE Weld quickstart class.</p> <pre><code>@Singleton public class TesteCDI { public void printHello(@Observes ContainerInitialized event, @Parameters List&lt;String&gt; parameters) { System.out.println("Hello Weld!" + parameters); } } </code></pre> <p>My run configuration fires <code>org.jboss.weld.environment.se.StartMain</code> </p> <p>Here is the funny part. If I don't create the Jar file (clicking in "Clean and Build"), my message isn't printed.</p> <pre><code>54 [main] INFO org.jboss.weld.Version - WELD-000900 1.1.0 (Final) 110 [main] INFO org.jboss.weld.Bootstrap - WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously. 388 [main] WARN org.jboss.interceptor.util.InterceptionTypeRegistry - Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled 388 [main] WARN org.jboss.interceptor.util.InterceptionTypeRegistry - Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled </code></pre> <p>If I do create the Jar file, everything runs fine, both from the command line and from Netbeans. So I assumed Netbeans was running the application from the jar.</p> <p>The problem is... <strong>It isn't</strong>.</p> <p>If I update my Test class and run from Netbeans, it picks the changes. If I run the jar from command line it just prints the old message. </p> <p>If I clean my project, Netbeans launch configuration stops printing the messsage.</p> <p>Can anyone explain how exactly is Netbeans running my Application? Does this odd behavior make sense or should it be considered a bug?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload