mil.dod.th.ose.core/src/mil/dod/th/ose/core/impl/mp/JavaScriptEngineActivator.java
@Activate
    public void activate(final BundleContext context)
    {
        // thread context class loader is used by script engine to access the TH API, set it to the runtime's class 
        // loader
        Thread.currentThread().setContextClassLoader(m_MissionProgramRuntime.getClassLoader());
        
        final ScriptEngineManager manager = new ScriptEngineManager(null);
        
        final ScriptEngine engine = manager.getEngineByName(ENGINE_NAME);
        
        final Dictionary<String, Object> properties = new Hashtable<String, Object>();
        properties.put("name", ENGINE_NAME);
        m_Registration = context.registerService(ScriptEngine.class, engine, properties);
    }
/**
     * Activate this component by creating a JavaScript {@link ScriptEngine} and providing as an OSGi service.
     * 
     * @param context
     *      context of the bundle containing this component 
     */
Activate this component by creating a JavaScript  ScriptEngine and providing as an OSGi service.

@param context
context of the bundle containing this component
Activate this component by creating a JavaScript ScriptEngine and providing as an OSGi service . @param context context of the bundle containing this component
@Activate
    public void activate(final BundleContext context)
    {
        Thread.currentThread().setContextClassLoader(m_MissionProgramRuntime.getClassLoader());
        final ScriptEngineManager manager = new ScriptEngineManager(null);
        final ScriptEngine engine = manager.getEngineByName(ENGINE_NAME);
        final Dictionary<String, Object> properties = new Hashtable<String, Object>();
        properties.put("name", ENGINE_NAME);
        m_Registration = context.registerService(ScriptEngine.class, engine, properties);
    }
@ Activate public void activate ( final BundleContext context ) { Thread . currentThread ( ) . setContextClassLoader ( m_MissionProgramRuntime . getClassLoader ( ) ) ; final ScriptEngineManager manager = new ScriptEngineManager ( null ) ; final ScriptEngine engine = manager . getEngineByName ( ENGINE_NAME ) ; final Dictionary < String , Object > properties = new Hashtable < String , Object > ( ) ; properties . put ( "name" , ENGINE_NAME ) ; m_Registration = context . registerService ( ScriptEngine . class , engine , properties ) ; }
Activate this component by creating a JavaScript {@link ScriptEngine} and providing as an OSGi service.
Activate this component by creating a JavaScript { @link ScriptEngine } and providing as an OSGi service .
// thread context class loader is used by script engine to access the TH API, set it to the runtime's class  // loader