On Wednesday, January 22, 2003, at 07:28  AM, mati wrote:
Is it possible to run fortress container inside one of Phoenix Services and
if so what would have to be done in order to do that.
Where would have to be configuration files to be stored.
Here's some code that I use to start a fortress container inside of a phoenix block. The configuration for Fortress is really the phoenix blocks' config:


final ContextBuilder builder = new ContextBuilder( this.m_context );
final CommandManager cm = new CommandManager();

createThreadManager( cm );

builder.setCommandQueue( cm.getCommandQueue() );
builder.setContainerClass( MyContainer.class );
builder.setContextDirectory( this.m_context.getBaseDirectory() );
builder.setWorkDirectory( this.m_context.getBaseDirectory() );
builder.setServiceManagerParent( this.m_serviceManager );
builder.setContainerConfiguration( this.m_config );
builder.setLoggerManager( new LoggerLoggerManager( getLogger() ) );
builder.setRoleManagerConfiguration(
"resource://mycontainer.roles" );
builder.setInstrumentManager( new NoopInstrumentManager() );

final Logger logger = getLogger().getChildLogger( "system" );
ContextManager contextManager = new ContextManager( builder.getContext(), logger );
contextManager.initialize();

this.m_containerManager = new DefaultContainerManager( contextManager, logger );
this.m_containerManager.initialize();

m_container = ( EdiContainer ) this.m_containerManager.getContainer();

if( getLogger().isDebugEnabled() ) getLogger().debug( "Container created" );


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to