Commit 2a7d24f3 authored by Lionel Seinturier's avatar Lionel Seinturier

Bug fix for @EagerInit (reported by Nicolas D.)

parent 9d5fbc45
......@@ -5,6 +5,7 @@ Tinfi 0.4.5
(these last two features have been requested by Nicolas D.)
* new example mixing SCA and OSGi components
* move to Juliac 2.1.6
* bug fix for @EagerInit (reported by Nicolas D.)
Tinfi 0.4.4
......
......@@ -24,10 +24,9 @@
package org.ow2.frascati.tinfi.control.content;
import org.objectweb.fractal.api.control.IllegalLifeCycleException;
import org.objectweb.fractal.api.control.LifeCycleController;
import org.objectweb.fractal.api.factory.InstantiationException;
import org.objectweb.fractal.julia.control.lifecycle.ChainedIllegalLifeCycleException;
import org.ow2.frascati.tinfi.control.content.SCAContentController;
import org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator;
import org.ow2.frascati.tinfi.control.property.SCAPropertyController;
/**
......@@ -36,20 +35,19 @@ import org.ow2.frascati.tinfi.control.property.SCAPropertyController;
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
*/
public abstract class LifeCycleEagerInitMixin implements LifeCycleController {
public abstract class LifeCycleEagerInitMixin implements LifeCycleCoordinator {
// -------------------------------------------------------------------------
// Private constructor
// -------------------------------------------------------------------------
private LifeCycleEagerInitMixin () {}
private LifeCycleEagerInitMixin() {}
// -------------------------------------------------------------------------
// Implementation of the LifeCycleController interface
// Implementation of the LifeCycleCoordinator interface
// -------------------------------------------------------------------------
public void startFc() throws IllegalLifeCycleException {
_super_startFc();
public boolean setFcStarted () throws IllegalLifeCycleException {
/*
* Notify the SCA content controller that the component has been started.
......@@ -62,19 +60,16 @@ public abstract class LifeCycleEagerInitMixin implements LifeCycleController {
catch( InstantiationException ie ) {
throw new ChainedIllegalLifeCycleException(ie,null,"");
}
return _super_setFcStarted();
}
public void stopFc() throws IllegalLifeCycleException {
_super_stopFc();
}
// -------------------------------------------------------------------------
// Fields and methods required by the mixin class in the base class
// -------------------------------------------------------------------------
public abstract void _super_startFc() throws IllegalLifeCycleException;
public abstract void _super_stopFc() throws IllegalLifeCycleException;
public abstract boolean _super_setFcStarted() throws IllegalLifeCycleException;
/**
* The {@link SCAPropertyController} interface of the component to which
......
......@@ -61,8 +61,7 @@ public class ScopeTestCase extends TestCase {
ScopeCompositeImpl.eagerinit = false;
String adl = getClass().getPackage().getName()+".ScopeComposite";
ScopeItf itf = TinfiDomain.getService(adl,ScopeItf.class,"s");
itf.getContent(0);
TinfiDomain.getService(adl,ScopeItf.class,"s");
assertTrue(
"Content instance should have been eagerly initialized",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment