On Oct 16, 2008, at 2:55 AM, Alex Grönholm wrote:

I'm already in the process of writing a new quartz Trigger to solve these problems. I'll keep you updated on my progress.

Started working on the related @Schedule annotation processing. So far have some basic xml setup to hold the annotation data. Modeled it after the xml for the security, transaction, and concurrency xml.

Here's what I came up with...

A bean declared like so:

    public static class MyBean {
        @Schedules({
            @Schedule(dayOfMonth = "6", month = "2", year = "2009"),
            @Schedule(dayOfMonth = "30", month = "3", year = "2009")
        })
        public void runAction() {
        }
    }

Would result in the following xml:

  <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee";>
    <enterprise-beans>
    ...
    </enterprise-beans>

    <assembly-descriptor>
        <method-schedule>
            <schedule>
                <dayOfMonth>6</dayOfMonth>
                <month>2</month>
                <year>2009</year>
            </schedule>
            <schedule>
                <dayOfMonth>30</dayOfMonth>
                <month>3</month>
                <year>2009</year>
            </schedule>
            <method>
                <ejb-name>MyBean</ejb-name>
                <method-name>runAction</method-name>
                <method-params/>
            </method>
        </method-schedule>
    </assembly-descriptor>
  </ejb-jar>

Still have to hookup the code that processes the @Schedule annotation into the jaxb tree (i.e. the xml) in the AnnotationDeployer, but will likely get that in tomorrow. The goal is to get it into the EjbJarInfo fully validated so that it can be hooked up in the Assembler whenever we get something with Quartz working.

-David



Reply via email to