/** * @see org.jboss.system.ServiceMBeanSupport#createService() */ @Override protected void createService() throws Exception { this.service.create(); }
/** * @see org.jboss.system.ServiceMBeanSupport#destroyService() */ @Override protected void destroyService() throws Exception { this.service.destroy(); }
public HAPartition getHAPartition() { return this.service.getHAPartition(); }
if (this.service.getServiceHAName() == null) this.service.setServiceHAName(name.getCanonicalName()); this.service.start();
public void setHAPartition(HAPartition partition) { this.service.setHAPartition(partition); }
/** * * Override this method only if you need to provide a custom partition wide unique service name. * The default implementation will usually work, provided that * the getServiceName() method returns a unique canonical MBean name. * * @return partition wide unique service name */ public String getServiceHAName() { return this.service.getServiceHAName(); }
public void setRegisterThreadContextClassLoader(boolean register) { this.service.setRegisterThreadContextClassLoader(register); }
@Inject(fromContext = FromContext.NAME) public void setServiceHAName(String haName) { this.service.setServiceHAName(haName); } }
@ManagementProperty(use={ViewUse.CONFIGURATION}, description="Whether this service should register its classloader with the HAPartition for use in deserializing group RPC parameters and responses") public boolean isRegisterThreadContextClassLoader() { return this.service.isRegisterThreadContextClassLoader(); }
@ManagementProperty(use={ViewUse.STATISTIC}, description="The name under which this service registers itself with the HAPartition") public String getHAServiceKey() { return this.service.getHAServiceKey(); }
/** * * Broadcast a notifcation remotely to the partition participants * * @param notification */ protected void sendNotificationRemote(Notification notification) throws Exception { // Overriding the source MBean with its ObjectName // to ensure that it can be safely transferred over the wire notification.setSource(this.getServiceName()); this.service.handleEvent(notification); }
@ManagementProperty(use={ViewUse.STATISTIC}, description="The name of the HAPartition this service is associated with") public String getPartitionName() { return this.service.getHAPartition().getPartitionName(); }