code: public void unregisterService() {
  
  		try {
  			if( this.serviceReg != null ) {
  				this.logger.finer( "Running in an OSGi environment. Trying to unregister a MBean for the messaging." );
  				this.serviceReg.unregister();
  				this.logger.finer( "Running in an OSGi environment. The MBean was unregistered." );
  			}
  
  		} catch( Exception e ) {
  			this.logger.severe( "A MBean could not be unregistered for the messaging." );
  			Utils.logException( this.logger, e );
  
  		} finally {
  			this.serviceReg = null;
  		}
  	}
docs: Unregisters the service that was created from this class instance.
  <p>
  This method MUST be invoked every time a client is not necessary anymore.
  </p>