FYI:
This afternoon I got Fortress running from inside an Eclipse plugin
but only when you use ECM-style roles file configuration. Using
Fortress meta results in ClassNotFound exceptions and I haven't
tracked it down yet. An issue is open in JIRA [1] for anyone who
wants to help figure this out.
Here's a snippet:
String xconf = "/conf/system.xconf";
String roles = "/conf/system.roles";
String logger = "/conf/logkit.xconf";
Bundle bundle = Platform.getBundle(MY_PLUGIN_ID);
URL xconfURL = Platform.asLocalURL( bundle.getEntry(xconf) );
URL rolesURL = Platform.asLocalURL( bundle.getEntry(roles) );
URL loggerURL = Platform.asLocalURL( bundle.getEntry(logger) );
// Set up all the preferences for Fortress
final FortressConfig config = new FortressConfig();
// you must set the Context class loader !
config.setContextClassLoader(MyPlugin.class.getClassLoader());
config.setLoggerManagerConfiguration(loggerURL.getPath());
config.setContainerConfiguration( xconfURL.getPath() );
config.setRoleManagerConfiguration( rolesURL.getPath() );
// Get the root container initialized
ContainerManager cm = new DefaultContainerManager(
config.getContext() );
ContainerUtil.initialize( cm );
DefaultContainer container = (DefaultContainer) cm.getContainer();
---
jaaron
[1] http://issues.apache.org/jira/browse/FORTRESS-17
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]