4 Replies Latest reply on Nov 28, 2007 9:53 AM by damianharvey

    Observer issues - multiple calls + async


      I've just implemented the Manager Component pattern as outlined in the docs using @Unwrap and @Observer and it's working a treat.

      Two small issues with it though:

      1. When using incremental hot deploy (ie. WEB-INF/dev) the Event is fired as many times as it's been since you last did a full deploy. For instance, if I start up my server and cause an event to fire, do an incremental hot deploy, cause the event to fire again; Then I will get the event firing twice on the second fire. If I do a full undeploy/redeploy it 'resets' the number of times it fires and all is good.

      2. Can @Observer be used with @Asynchronous? I've tried but I get the following exception:

      Caused by: java.lang.NoSuchMethodException: java.util.ArrayList.rebuildTradeRoute()
       at java.lang.Class.getMethod(Class.java:1581)
       at org.jboss.seam.async.AsynchronousInvocation.call(AsynchronousInvocation.java:45)

      If I remove the @Async then it's fine.