]
Alejandro Guizar commented on JBPM-2074:
----------------------------------------
I don't have the Effective Java book right now, but if I recall correctly, item 7
"avoid finalizers" explains that a class should avoid relying on the finalizer
for releasing resources, and should instead offer methods for explicit cleanup.
In the case of JbpmConfiguration, the close() method is publicly available. The finalizer
makes sure close() is called even if the client code failed to call it. Any calls to
close() have no effect if the configuration is closed already.
There must be another yet-to-be-discovered problem related to closing, that the finalizer
brings to the surface. I don't see any bad practice here, tough.
Fix intermittent problem with
JbpmConfigurationTest.testDomainModelConfigsWithoutJbpmContext
--------------------------------------------------------------------------------------------
Key: JBPM-2074
URL:
https://jira.jboss.org/jira/browse/JBPM-2074
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Core Engine
Reporter: Thomas Diesler
Assignee: Thomas Diesler
Fix For: jBPM 3.2.6 GA
It seems that some asynchronous process creates a JbpmContext
2009-02-28 19:53:53,895 DEBUG [org.jbpm.AbstractJbpmTestCase] ### START
org.jbpm.JbpmConfigurationTest.testDomainModelConfigsWithoutJbpmContext
####################################################
2009-02-28 19:53:53,895 DEBUG [org.jbpm.configuration.ObjectFactoryImpl] adding object
info 'jbpmConfiguration'
2009-02-28 19:53:53,895 DEBUG [org.jbpm.persistence.db.StaleObjectLogConfigurer] stale
object exceptions are already hidden from logging
2009-02-28 19:53:53,896 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm
context with service factories '[message, tx, scheduler, authentication, persistence,
logging]'
2009-02-28 19:53:53,896 DEBUG [org.jbpm.JbpmContext] creating
org.jbpm.JbpmContext@1a7abed
2009-02-28 19:53:53,896 DEBUG [org.jbpm.JbpmContext] closing jbpmContext
org.jbpm.JbpmContext@1a7abed
2009-02-28 19:53:53,896 INFO [org.hibernate.connection.DriverManagerConnectionProvider]
cleaning up connection pool: jdbc:hsqldb:mem:jbpm
2009-02-28 19:53:53,897 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm
context with service factories '[message, tx, scheduler, authentication, persistence,
logging]'
2009-02-28 19:53:53,897 DEBUG [org.jbpm.JbpmContext] creating
org.jbpm.JbpmContext@1bfe151
2009-02-28 19:53:53,898 DEBUG [org.jbpm.JbpmContext] closing jbpmContext
org.jbpm.JbpmContext@1bfe151
2009-02-28 19:53:53,898 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm
context with service factories '[message, tx, scheduler, authentication, persistence,
logging]'
2009-02-28 19:53:53,898 DEBUG [org.jbpm.JbpmContext] creating
org.jbpm.JbpmContext@10994db
2009-02-28 19:53:53,898 DEBUG [org.jbpm.JbpmContext] closing jbpmContext
org.jbpm.JbpmContext@10994db
2009-02-28 19:53:53,899 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm
context with service factories '[]'
2009-02-28 19:53:53,899 DEBUG [org.jbpm.JbpmContext] creating
org.jbpm.JbpmContext@1945b7a
2009-02-28 19:53:53,899 DEBUG [org.jbpm.JbpmContext] closing jbpmContext
org.jbpm.JbpmContext@1945b7a
2009-02-28 19:53:53,901 DEBUG [org.jbpm.AbstractJbpmTestCase] ### END
org.jbpm.JbpmConfigurationTest.testDomainModelConfigsWithoutJbpmContext
######################################################
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: