excalibur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Aaron Farr <jaaronf...@gmail.com>
Subject Fortress embedded in Eclipse
Date Thu, 07 Apr 2005 20:38:05 GMT

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.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();


[1] http://issues.apache.org/jira/browse/FORTRESS-17

To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org

View raw message