Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Judging from your requirements, I don't think Quartz will be needed. Quartz is a scheduler and what you need is a Spring asynchronous task execution facilities.</p> <p>Essentially, what is done, upon first call of async bean, control is immediately returned and the called async bean is handed off to Spring's <code>TaskExecutor</code> which further on controls the execution of the given method logic.</p> <p>High-level overview of your options is as follows: you will need to inject a <code>TaskExecutor</code> bean implementation into Spring context and your asynchronous method logic will have to somehow perform the handoff either by </p> <ul> <li>(<strong>XML-config</strong>) wiring <code>TaskExecutor</code> as a collaborator inside your Spring bean containing method which you intend to execute asynchronously and calling execute() method of <code>TaskExecutor</code>, or </li> <li>(<strong>annotation-config</strong>) by marking the intended method with <code>@Async</code> annotation. Be advised, <code>TaskExecutor</code> implementation must be injected into Spring context.</li> </ul> <p>Also, take note that should you want to return something from your asynchronous task, the return type must be an implementation of Java's <code>Future&lt;T&gt;</code> interface, which is a requirement since <code>TaskExecutor</code> is built on <code>java.concurrent.util.Executor</code> interface.</p> <p>I can't comment on Struts, though, as I've never worked with it, but as far as I can tell, Struts should have no part in realizing asynchronicity - the heavy lifting is done by Spring alone.</p> <p>For a more thorough and complete look on mentioned subject, I suggest starting with the following links:</p> <ul> <li><p><a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/htmlsingle/spring-framework-reference.html#scheduling" rel="nofollow">http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/htmlsingle/spring-framework-reference.html#scheduling</a></p></li> <li><p><a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/" rel="nofollow">http://static.springsource.org/spring/docs/3.0.x/javadoc-api/</a></p></li> <li><a href="http://docs.oracle.com/javase/1.5.0/docs/api/index.html?java/util/concurrent/Executor.html" rel="nofollow">http://docs.oracle.com/javase/1.5.0/docs/api/index.html?java/util/concurrent/Executor.html</a></li> </ul>
    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.
 

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