[jboss-jira] [JBoss JIRA] (WFLY-11978) EAR with 2+ JPA does not shutdown cleanly
Scott Marlow (Jira)
issues at jboss.org
Thu Apr 25 09:31:00 EDT 2019
[ https://issues.jboss.org/browse/WFLY-11978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13726617#comment-13726617 ]
Scott Marlow commented on WFLY-11978:
-------------------------------------
[~dlmiles] does this recreate if the application has not actually serviced any user requests?
I tried to recreate with a very simple jar that contains:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="TEST_PU">
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
<properties>
<property name="hibernate.enhancer.enableDirtyTracking" value="true"/>
<property name="hibernate.generate_statistics" value="true"/>
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
</properties>
</persistence-unit>
<persistence-unit name="second_PU">
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<properties>
<property name="hibernate.enhancer.enableDirtyTracking" value="false"/>
<property name="hibernate.generate_statistics" value="false"/>
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
</properties>
</persistence-unit>
</persistence>
{code}
I did a jstack thread dump and don't see the same issue after undeployment (using the latest [WildFly master branch code|https://github.com/wildfly/wildfly]).
Do you have a simple test ear that recreates this that you could attach? Best if it uses java:jboss/datasources/ExampleDS, as I show in my ^ persistence.xml.
Also, from a quick look at the Infinispan [https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/factories/AbstractComponentRegistry.java#L356], I don't really understand where the code is that does the notify() to wake this thread up. I wonder if its a race where the state is ComponentStatus.STOPPING but changes by time wait() is called.
> EAR with 2+ JPA does not shutdown cleanly
> -----------------------------------------
>
> Key: WFLY-11978
> URL: https://issues.jboss.org/browse/WFLY-11978
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 16.0.0.Final
> Environment: Windows JDK8 WF16
> Reporter: Darryl Miles
> Assignee: Scott Marlow
> Priority: Major
> Attachments: td8948.txt
>
>
> EAR with 2+ JPA does not shutdown cleanly.
> I see in the logs each JPA project have an entry:
> WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'blah....jpa.project1'
> WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'blah....jpa.project2'
> then a few lines later:
> WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'blah....jpa.project2'
> I never see the "phase 1 of 2" entry for "jpa.project1" in the log.
> The container will wait 300 seconds and timeout.
> The management console during the time shows
> Operation: undeploy
> Execution Status: awaiting-stablility.
> The container is killed and the configuration.xml still contains the EAR deployment info, as undeploy did not complete.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list