Re: [jboss-dev-forums] [jBPM Development] - Close ProcessEngine upon BPM console undeployment
by Alejandro Guizar
Alejandro Guizar [http://community.jboss.org/people/alex.guizar%40jboss.com] replied to the discussion
"Close ProcessEngine upon BPM console undeployment"
To view the discussion, visit: http://community.jboss.org/message/550290#550290
--------------------------------------------------------------
> My first question would be - do we really need to close ProcessEngine upon console undeployment? I can think of few cases where such approach could be dangerous - just because console was down (either by administrator or server failure) whole process engine will be stopped. Is this desired?
> In my opinion console shall be treated as optional (non intrusive) component so removing it shall not affect the process engine.
>
> Does it affect only Tomcat?
The process engine needs to be closed by the module that created it. In JBoss AS this is already covered since jBPM is deployed as a service. The JbpmService bean correctly closes the engine on stop.
In Tomcat the situation is more complicated. Because it lacks the notion of services, the jbpm-console app creates the process engine itself. The engine cannot be managed by a separate module and shared via JNDI because Tomcat provides a read-only initial context.
In fact, the situation is aggravated due to Configuration.getProcessEngine() returning a shared instance. I take this method to be a formal equivalent of the http://docs.jboss.org/hibernate/stable/core/reference/en/html/tutorial.ht... HibernateUtil class in standalone environments. Unfortunately, it is tempting to call this method from within containers, where it is totally insane. The engine becomes reachable from the entire VM and there is no clear point at which it can be closed.
> If it comes to probable solution, we could register listeners (ServletContectListeners) for console to close down process engine on application destroy.
This would be an option if the shared ProcessEngine could be closed on servlet context destruction, which is not possible as said before. If the servlet context listener built its own unshared engine on initialization, it could close it on destruction. Unfortunately such an engine is unreachable for the console integration components. In a typical web app it would be set as an attribute of the servlet context, but the servlet context itself is unreachable as well.
One promising alternative I want to investigate is the Tomcat http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#Adding%... custom resource factory. There is http://community.jboss.org/wiki/UsingJNDI-boundSessionFactorywithTomcat41 prior art in this direction involving the Hibernate session factory.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550290#550290]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[JBoss AS Development Deployment Framework] - jboss seam web app throws errors for unkown reasons
by Daniel Kim
Daniel Kim [http://community.jboss.org/people/dkim18] created the discussion
"jboss seam web app throws errors for unkown reasons"
To view the discussion, visit: http://community.jboss.org/message/550035#550035
--------------------------------------------------------------
Hi,
I deployed jboss seam web app that collects data from users and generates PDF reports. It is a relatively simple web app and it went fairly for 1st quarter. However we are having some issues for 2nd quarter.
Some users are experiencing log in problem(users see "something bad happened." jboss error messages) and some pages throws jboss error messages as well.
When I checked log file, all I see is some buch of this error message:
68.93.192.64 - - [28/Jun/2010:10:03:40 -0400] "GET /error.seam?cid=195 HTTP/1.1" 302 -
However, when I tested production site I didn't get any problem for log in. However, I saw jboss error messages on some pages occassionally, but if I logout/login then try again, it worked fine. So, I thought it was some sort of glithces, but it looks like some users are having more severe problems.
IE causes the problem the most and google Chrome gives the least issues.
I think it is more like configuration issues.
Here is the web.xml
+++++++++++++
<?xml version="1.0" ?>
<web-app xmlns=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<!-- RichFaces -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>deepMarine</param-value>
</context-param>
<!-- Suppress spurious stylesheets -->
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>disable</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
<param-value>disable</param-value>
</context-param>
<!-- Change load strategy to DEFAULT to disable sending scripts/styles as packs -->
<context-param>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
<param-value>ALL</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
<param-value>ALL</param-value>
</context-param>
<!-- Seam -->
<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>Seam Resource Servlet</servlet-name>
<servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Seam Resource Servlet</servlet-name>
<url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>
<!-- Facelets development mode (disable in production) -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<!-- JSF -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.seam</url-pattern>
</servlet-mapping>
<security-constraint>
<display-name>Restrict raw XHTML Documents</display-name>
<web-resource-collection>
<web-resource-name>XHTML</web-resource-name>
<url-pattern>*.xhtml</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
<!-- uncomment <ejb-local-ref> entries when deploying to GlassFish and (optionally) JBoss AS 5 -->
<!--
<ejb-local-ref>
<ejb-ref-name>kelc/AuthenticatorBean/local</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home/>
<local>com.mydomain.kelc.action.Authenticator</local>
</ejb-local-ref>
-->
<!-- Add entries for each EJB session bean which is also a Seam component (not required on JBoss AS) -->
<persistence-unit-ref>
<persistence-unit-ref-name>kelc/pu</persistence-unit-ref-name>
<!-- The relative reference doesn't work on GlassFish. Instead, set the <persistence-unit-name> to "kelc",
package persistence.xml in the WAR, and add a <jar-file> element in persistence.xml with value "../../kelc.jar". -->
<persistence-unit-name>../kelc.jar#kelc</persistence-unit-name>
</persistence-unit-ref>
</web-app>
+++++++++
and this faces-config.xml
++++++++++++
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="1.2"
xmlns=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<application>
<locale-config>
<default-locale>en</default-locale>
<supported-locale>bg</supported-locale>
<supported-locale>de</supported-locale>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
<supported-locale>it</supported-locale>
<supported-locale>tr</supported-locale>
</locale-config>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
</faces-config>
+++++++++++++
I am using jboss jboss-4.2.3.GA.
Thanks in advance
Daniel
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550035#550035]
Start a new discussion in JBoss AS Development Deployment Framework at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months