[JBoss Seam] - Re: Quartz TimerService
by msduk
This worked fine for me. I have the quartz jar in the lib folder and I believe that was it. This is on 4.0.5 GA.
I noticed that I have jobs.xml, .properties and the xsd in my WEB-INF from an earlier attempt to run it the non-ejb way. Maybe it requires this?
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = "0/15 * * * * ?") })
| @ResourceAdapter("quartz-ra.rar")
|
| public class TestQuartzTarget implements Job {
|
| @PersistenceContext
| EntityManager em;
|
| private static final Logger log = Logger
| .getLogger(TestQuartzTarget.class);
|
| public PendingOrderQuartzTarget() {
| super();
| System.out.println("Quartz-bean is constructed()");
| }
|
| public void execute(JobExecutionContext jobExecutionContext)
| throws JobExecutionException {
|
| long start = System.currentTimeMillis();
|
| log.debug(this.getClass().getName() + " STARTING RUN");
| log.debug(em);
|
| //Do your work here
|
| log.debug(this.getClass().getName() + " FINISHING RUN");
| log.debug("RUNTIME: " + (System.currentTimeMillis() - start) + " ms");
| }
|
| }
>From web.xml
<servlet>
| <servlet-name>QuartzInitializer</servlet-name>
| <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
|
| <init-param>
| <param-name>config-file</param-name>
| <param-value>quartz-nrg2.properties</param-value>
| </init-param>
|
| <init-param>
| <param-name>shutdown-on-unload</param-name>
| <param-value>true</param-value>
| </init-param>
|
| <init-param>
| <param-name>start-scheduler-on-load</param-name>
| <param-value>true</param-value>
| </init-param>
| <load-on-startup>1</load-on-startup>
| </servlet>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994405#3994405
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994405
19 years, 4 months
[JBoss Seam] - Re: Seam & Maven2
by mzeijen
I have been look through the current JBoss maven2 repository at http://repository.jboss.com/maven2. I have noticed that it isn't really maintained. I also have some remarks on the JBoss artifact structure within it:
1. Most JBoss artifacts have a groupId of 'jboss' and some 'org.jboss'. I.M.H.O this should be 'org.jboss'. The idea behind the groupId is the same idea behind packages of Java. You should use the domain of the creators of the library as groupId.
2. The current 1.01-GA artifacts (core, ui, debug) of seam have the groupId 'jboss'. I.M.H.O this should be 'org.jboss.seam'. This groups the seam libraries within on group and makes it easier to find/maintain.
3. The current version used is 1.0.1-GA. This reflects the version that is used by JBoss itself. I am not so sure if it is a good id to use the GA within Maven2 versions. In Maven2 the -{code} behind a version number represents a qualifier. A qualifier is intended to indicate a version prior to a release. So the use of -alpha, -beta, -cr1, etc isn't a problem, but we probably shouldn't use the GA because Maven2 then doesn't see the library as a release. The GA could result in problems with the dependency management of Maven2.
Is there someone who I can contact about the Maven2 repository of JBoss?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994404#3994404
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994404
19 years, 4 months