[jboss-jira] [JBoss JIRA] Commented: (JBPM-742) Reimplement JobExecutorServlet as a ServletContextListener

Alejandro Guizar (JIRA) jira-events at lists.jboss.org
Fri Mar 2 03:41:08 EST 2007


    [ http://jira.jboss.com/jira/browse/JBPM-742?page=comments#action_12354790 ] 
            
Alejandro Guizar commented on JBPM-742:
---------------------------------------

A matter of choosing the best fit between two viable alternatives. CMP and POJO persistence are both viable alternatives, yet most applications choose the latter because it better fits their requirements and removes the dead weight (empty lifecycle methods in CMP, doXXX methods in servlets).

Converting a servlet to a context listener is really straightforward - if I did not do it earlier it was because I wanted to be aware of any reason why this should remain a servlet. Unless someone chimes in, I'll start working on this.

> Reimplement JobExecutorServlet as a ServletContextListener
> ----------------------------------------------------------
>
>                 Key: JBPM-742
>                 URL: http://jira.jboss.com/jira/browse/JBPM-742
>             Project: JBoss jBPM
>          Issue Type: Feature Request
>          Components: Core Engine
>    Affects Versions: jBPM jPDL 3.2 alpha 2
>            Reporter: Alejandro Guizar
>         Assigned To: Alejandro Guizar
>             Fix For: jBPM jPDL 3.2
>
>
> ServletContextListeners are a viable alternative to servlets for management of the jBPM scheduler/command threads. From the Servlet 2.4 spec, section 10.2:
> >>>
> Servlet event listeners support event notifications for state changes in the ServletContext, HttpSession and ServletRequest objects.
> Servlet context listeners are used to **manage resources** or state held at a JVM level for the application.
> <<<
> Their intent definitely seems to match our purposes.
> Further below:
> >>>
> There may be multiple listener classes listening to each event type.
> <<<
> We could have separate listeners for the scheduler and command executor so that applications may remove either of them in case the related service is not used.
> Section 10.2.2 provides an example. When the application starts up, the listener creates a connection to the database and stores it in the servlet context. Servlets access the connection from the context as needed. When the application shuts down, the listener closes the connection.
> Our listener could start the thread and store it in the servlet context, then stop it using the mechanisms provided by JBPM-741. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list