[seam-issues] [JBoss JIRA] Commented: (JBSEAM-4216) Seam Component with EJB Timer

Marek Novotny (JIRA) jira-events at lists.jboss.org
Fri May 20 03:02:01 EDT 2011


    [ https://issues.jboss.org/browse/JBSEAM-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603333#comment-12603333 ] 

Marek Novotny commented on JBSEAM-4216:
---------------------------------------

Why don't you use Seam Asynchronous features with EJB3 container? Annotate a seam component with {{@Startup}} and insert into your _components.xml_:
{{<async:timer-service-dispatcher/>}}

This should wait until Seam is initialized and then initializes your Seam component with asynchronous timer service invocation.  More about it http://docs.jboss.org/seam/latest/reference/en-US/html/jms.html#d0e21564

> Seam Component with EJB Timer
> -----------------------------
>
>                 Key: JBSEAM-4216
>                 URL: https://issues.jboss.org/browse/JBSEAM-4216
>             Project: Seam 2
>          Issue Type: Bug
>          Components: EJB3
>    Affects Versions: 2.1.1.GA
>         Environment: Ubuntu 8.10 x64, JBoss-AS 4.2.3.GA
>            Reporter: Israel Fonseca
>
> If a Seam component that triggers a timmer is used, an exception may be throw in the JBoss starting:
> 13:55:53,646 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside an initialized application
> And it does make sense, since the timer service tries to execute a method of a seam component before the seam application is started. To solve this i think that EJBs that are seam components should only be started after all the aplications in the server get started, or something like this.
> I tested it using a timer that generates a log (@Logger) at every minute, and restarting the server (the delayed timmer would be triggered before the Seam App is up).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list