Bug 1122588 - Cannot redeploy JDG apps in EAP without restarting EAP
Summary: Cannot redeploy JDG apps in EAP without restarting EAP
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: EAP
Version: 6.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-23 14:39 UTC by John Osborne
Modified: 2014-08-29 16:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-28 10:56:33 UTC
Type: Bug


Attachments (Terms of Use)

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!


Note You need to log in before you can comment on or make changes to this bug.