public synchronized void serviceChanged(ServiceEvent event) {
		String[] objectClass = (String[]) event.getServiceReference().getProperty("objectClass");

		// If a dictionary service was registered, see if we
		// need one. If so, get a reference to it.
		if (event.getType() == ServiceEvent.REGISTERED) {
			if (m_ref == null) {
				// Get a reference to the service object.
				m_ref = event.getServiceReference();
				m_dictionary = (DictionaryService) m_context.getService(m_ref);
			}
		}
		// If a dictionary service was unregistered, see if it
		// was the one we were using. If so, unget the service
		// and try to query to get another one.
		else if (event.getType() == ServiceEvent.UNREGISTERING) {
			if (event.getServiceReference() == m_ref) {
				// Unget service object and null references.
				m_context.ungetService(m_ref);
				m_ref = null;
				m_dictionary = null;

				// Query to see if we can get another service.
				ServiceReference[] refs = null;
				try {
					refs = m_context.getServiceReferences(DictionaryService.class.getName(), "(Language=*)");
				} catch (InvalidSyntaxException ex) {
					// This will never happen.
				}
				if (refs != null) {
					// Get a reference to the first service object.
					m_ref = refs[0];
					m_dictionary = (DictionaryService) m_context.getService(m_ref);
				}
			}
		}
	}