Skip to Content
author's profile photo Former Member
Former Member

Navigation Connector Service will not start

Hello,

I am trying to program a custom Navigation Connector. As I have read in the documentation, you have to also implement a regular portal service with the purpose of registering the Navigation Connector.

This is the code for the Navigation Connector class. Really simple, just to see if it's working (NavigationEnum is an implementation of the javax.naming.NamingEnumeration).

public class NavConnector extends AbstractNavigationConnectorExt {
	
	public NavConnector() {
	}

	public NamingEnumeration getInitialNodes(Hashtable arg0) {
		return NavigationEnum.EMPTY_ENUM;
	}

	public INavigationConnectorNode getNode(Hashtable arg0, String arg1) {
		return new NavConnectorNode();
	}

	public NamingEnumeration getNodes(Hashtable arg0, Vector arg1) {
		return NavigationEnum.EMPTY_ENUM;
	}

	public String getConnectorCacheDiscriminator(Hashtable arg0) {
		return "fluffyCache";
	}

	public NamingEnumeration getNodeByQuickLink(Hashtable arg0, String arg1) {
		return NavigationEnum.EMPTY_ENUM;
	}

}

Then, in a regular service I coded, in the afterInit() method, I have put this:

		INavigationConnectorRegistration service = null;
		try {
			service = (INavigationConnectorRegistration)getContext().getService(INavigationService.KEY);
		} catch (Exception e) {
			logger.warningT("[NavConnectorService.afterInit] exception getting registrator: " + e.toString());
		}
		DefaultNavigationNamingHandler defaultNamingHandler = DefaultNavigationNamingHandler.getInstance();
		if (service != null) {
			service.registerConnector(NAVCONNECTOR_PREFIX, navConnector, defaultNamingHandler);
		}

Can you tell if there is something I am doing wrong?

The service will not start up neither on par upload nor on portal startup.

Thanks in advance.

Silviu.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2006 at 10:08 AM

    Hi Silviu,

    I don't know if you still need the answer to you question, but this is it:

    Instead of extending AbstractNavigationConnectorExt (this will be the right way from SP16 onwards I think) you should implement INavigationConnector.

    Using INavigationConnector caching is not possible in your code, but you can configure the portal to cache all navigation on a global level.

    kind regards,

    Caspar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.