|Re: Custom TrustEngine with Equinox servlet bridge [message #1014506 is a reply to message #1014443]
||Tue, 26 February 2013 00:13
| Michael Yara
Registered: July 2009
I was able to answer my own question with some research and trial and error.|
Here is the solution:
First you want to implement a Framework adapter hook. I followed the Hello Adaptor Hook example in the following pdf
In the adaptor package that you created add your implementation of TrustEngine. Mine was called BundleTrustEngine.
Next fill out the frameworkStart() method in your AdaptorHook class with the following in order to register your TrustEngine:
Hashtable<String, Object> properties = new Hashtable<String, Object>();
properties.put(Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
context.registerService(TrustEngine.class.getName(), new BundleTrustEngine(), properties);
Replace "BundleTrustEngine" with the name of your TrustEngine implementation class.
Next set the following as runtime properties of the application using -D or specify them in your config.ini file.
The osgi.framework.extensions should be set to the name of the bundle that houses your Adaptor hook.
You may also want to look at the following articles on how to properly deploy your adaptor hook:
I have not got to the part where I have included this in my embedded application but I am guessing that you simply have to export your adaptor hook bundle fragment jar and included it in the WebContent/WEB-INF/eclipse/plugins directory of the equinox servlet bridge war and repackage the war file.
[Updated on: Tue, 26 February 2013 00:16]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03999 seconds