wildfly/wildfly — pull request #6040 by dstraub (2014-03-16 13:31:49+00:00)
Title: builder methods without parameters causes exception due missing cache name

Create a singleton service with parameterless builder methods like this:

SingletonService singletonService = new SingletonService(HA_SINGLETON_SERVICE_NAME, new HASingletonSampleService());

singletonService.build(CurrentServiceContainer.getServiceContainer())
.install()
.setMode(ServiceController.Mode.ACTIVE);

causes
java.lang.IllegalArgumentException: Name segment is null for server
at org.jboss.msc.service.ServiceName.of(ServiceName.java:87) [jboss-msc-1.2.1.Final.jar:1.2.1.Final]
at org.jboss.msc.service.ServiceName.append(ServiceName.java:117) [jboss-msc-1.2.1.Final.jar:1.2.1.Final]
at org.wildfly.clustering.server.group.CacheGroupProvider.getServiceName(CacheGroupProvider.java:56)
at org.wildfly.clustering.server.singleton.SingletonService.build(SingletonService.java:114)