Hi, At the moment, I'm registering a URLStreamHandleerService for JNDI in OSGi BundleContext as follows.
private static final String JNDI_PROTOCOL = "jndi"; .... Hashtable<String, String[]> properties = new Hashtable<String, String[]>(); properties.put(URLConstants.URL_HANDLER_PROTOCOL, new String[] { JNDI_PROTOCOL }); bundleContext.registerService(URLStreamHandlerService.class.getName(), new JNDIURLStreamHandlerService(), properties); ... class JNDIURLStreamHandlerService extends AbstractURLStreamHandlerService { URLStreamHandler urlStreamHandler = TomcatURLStreamHandlerFactory.getInstance().createURLStreamHandler(JNDI_PROTOCOL); @Override public URLConnection openConnection(URL url) throws IOException { return new URL(url, "", urlStreamHandler).openConnection(); } } Is there a better approach to do this with Tomcat 8.0.20? Thanks Best Regards Thusitha -- Thusitha Dayaratne Software Engineer WSO2 Inc. - lean . enterprise . middleware | wso2.com Mobile +94712756809 Blog alokayasoya.blogspot.com About http://about.me/thusithathilina