Bug 1008953 - Code snippets issues
Summary: Code snippets issues
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Documentation
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: DR5
: 6.2.0
Assignee: gsheldon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-17 11:54 UTC by Jiri Holusa
Modified: 2013-11-07 22:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-07 22:49:24 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBQA-8358 0 Major Resolved Verify code snippets in documentation 2014-08-11 23:58:32 UTC

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/


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