-
1. Re: jBoss Seam 2.0 Beta 1 Asynchronicity issues
gbc1 Aug 15, 2007 4:44 PM (in response to vadger)Manual does not mention...
Change your components.xml like this, adding a namespace for async at components tag:<?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:async="http://jboss.com/products/seam/async" xmlns:persistence="http://jboss.com/products/seam/persistence" xmlns:drools="http://jboss.com/products/seam/drools" xmlns:security="http://jboss.com/products/seam/security" xmlns:mail="http://jboss.com/products/seam/mail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd"> <core:init debug="@debug@" jndi-pattern="@jndiPattern@"/> <core:manager concurrent-request-timeout="500" conversation-timeout="120000" conversation-id-parameter="cid"/> <async:timer-service-dispatcher/> ... </components>
JBoss starts up as configured:22:40:00,906 INFO [Component] Component: org.jboss.seam.async.dispatcher, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: org.jboss.seam.async.TimerServiceDispatcher, JNDI: Server/TimerServiceDispatcher/local
Much fun!, Greetz GHad -
2. Re: jBoss Seam 2.0 Beta 1 Asynchronicity issues
vadger Aug 16, 2007 2:01 AM (in response to vadger)Thanks, it helped - no xml validation errors anymore. But still timer does not work. Can anybody tell me what I'm doing wrong?
Thanks -
3. Re: jBoss Seam 2.0 Beta 1 Asynchronicity issues
vadger Aug 16, 2007 2:41 AM (in response to vadger)I tried to use pure EJB3 Timer With annotations @Timer by tutorial
http://java-x.blogspot.com/2007/01/ejb-3-timer-service.html
and it works, but a little bit strange :) -
4. Re: jBoss Seam 2.0 Beta 1 Asynchronicity issues
vadger Aug 16, 2007 4:01 AM (in response to vadger)I've found how to put it to work.
I annotated Task Handler implementation - not only interface as it is written in documentation, also I added just in case @Stateless annotation for my bean :) one of operations gave me a positive result :)
@AutoCreate
@Name("taskHandler")
@Stateless
public class TaskHandlerBean implements TaskHandler {
@Logger
Log log;
@Override
@Asynchronous
public void sayGreeting(String greeting, @Expiration Date date, @IntervalDuration Long interval) {
log.info("greeting: #0 at #1", greeting, new Date());
}
}
Thanks for help.