Bug 1122588

Summary: Cannot redeploy JDG apps in EAP without restarting EAP
Product: [JBoss] JBoss Data Grid 6 Reporter: John Osborne <josborne>
Component: EAPAssignee: Tristan Tarrant <ttarrant>
Status: CLOSED NOTABUG QA Contact: Martin Gencur <mgencur>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.1CC: jdg-bugs, jmarkos, wfink
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-28 10:56:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Osborne 2014-07-23 14:39:59 UTC
If you start JBoss EAP and then deploy an application (or have the app already deployed) and then either undeploy/deploy or redeploy EAP will throw an Exception "CacheManager already registered"

I am not sure if this is expected behavior, but if you make any changes to your app and redeploy it then you have to remove the app, stop jboss, start jboss, redeploy app in order for it to work. If you are preloading or distributing between other cache nodes, then this could be a 5-20 minute process.

Comment 2 Jakub Markos 2014-08-28 08:46:30 UTC
Hi,
could you provide a stripped down version of your application exhibiting the issue? I've tried to reproduce this using the carmart quickstart from JDG 6.2.1.GA with EAP 6.2.0, and everything was ok with the deploy -> undeploy -> deploy sequence.

Comment 3 Martin Gencur 2014-08-28 10:56:33 UTC
This is not a bug. I used your application (while trying to reproduce the large memory usage with JDBC cache stores) and saw the issue when redeploying the application. However, I noticed you don't call cacheManager.stop() anywhere when undeploying the app. This method unregisters cache manager's MBean from EAP server. Then I went and added a servlet listener where on in contextDestroyed I call cacheManager.stop() and the problem is gone. Now I can re-deploy the application without problems. 

Jakub was trying the Carmart quickstart which has this shutdown hook. So please look at how this is done there. 

I'm closing this issue now.

Comment 4 John Osborne 2014-08-29 16:05:15 UTC
I rather see user error than a bug.  Thanks for your due diligence on this issue!