Bug 1008953

Summary: Code snippets issues
Product: [JBoss] JBoss Data Grid 6 Reporter: Jiri Holusa <jholusa>
Component: DocumentationAssignee: gsheldon
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: gsheldon, jdg-bugs
Target Milestone: DR5   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-07 22:49:24 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:

Comment 2 Misha H. Ali 2013-09-18 03:13:27 UTC
Made comments with internal links private for security reasons. Thanks for reporting these issues, Jiri, I'll get this fixed ASAP.

Comment 3 Misha H. Ali 2013-09-18 03:48:39 UTC
(In reply to Jiri Holusa from comment #0)
> #1: Snippet
> 
> When trying this snippet using JBoss EAP (two instances on localhost on
> different ports) I'm getting org.infinispan.jmx.JmxDomainConflictException:
> Domain already registered org.infinispan when trying to register:
> type=CacheManager,name="DefaultCacheManager"
> 
> I figured out that it's probably because EAP has its own underlaying JMX (no
> problems when running it on Tomcat) and there comes the collision. It's all
> resolved by adding GlobalConfiguration with
> .globalJmxStatistics().allowDuplicateDomains(true).enable().
> 
> I think it would be nice to mention this fact in some tip or something.

Jiri, I have addressed this by adding a note saying:

JBoss EAP includes its own underlying JMX. This can cause a collision when using the sample code with JBoss EAP and display an error such as "org.infinispan.jmx.JmxDomainConflictException: Domain already registered org.infinispan".

Does this fix the problem, or would you advise that further information is needed to clarify?

Comment 4 JBoss JIRA Server 2013-09-18 07:05:36 UTC
Martin Gencur <mgencur> made a comment on jira JBQA-8358

Misha,
it would be best to add also the following snippet to show the solution:
GlobalConfiguration glob = new GlobalConfigurationBuilder()               .clusteredDefault().globalJmxStatistics().allowDuplicateDomains(true).enable().build();

I know we're talking about GlobalConfigurationBuilder later in the docs so we could just reference it and mention the .allowDuplicateDomains(true) later, together with GlobalConfigurationBuilder.

Comment 5 Misha H. Ali 2013-09-18 07:07:34 UTC
Even better! Thanks, Martin. I'll implement this and post links to review the final version in the docs.

Comment 11 Misha H. Ali 2013-09-19 23:30:50 UTC
Excellent, thanks for picking these out, Jiri! I was a bit busy yesterday but I'll be applying all of these including Martin's comment today and providing links for each. :)

Comment 29 Jiri Holusa 2013-09-27 11:27:38 UTC
Perfect job!!

Thank you very much. Done

Comment 30 JBoss JIRA Server 2013-09-27 11:29:10 UTC
Jiří Holuša <jholusa> updated the status of jira JBQA-8358 to Resolved

Comment 31 JBoss JIRA Server 2013-09-27 11:29:10 UTC
Jiří Holuša <jholusa> made a comment on jira JBQA-8358

Documentation snippets are corrected.

Comment 32 JBoss JIRA Server 2013-09-27 11:55:17 UTC
Martin Gencur <mgencur> made a comment on jira JBQA-8358

Nice! Thanks.

Comment 33 Misha H. Ali 2013-11-07 22:49:24 UTC
This bug is approved and available at:

https://access.redhat.com/site/documentation/Red_Hat_JBoss_Data_Grid/