Commit fa5ed52f authored by Pierre CARTON's avatar Pierre CARTON
Browse files

AF-Backend :

             work on move to tinfi 0.4.4 and juliac 2.1.5
parent fd539222
......@@ -339,8 +339,8 @@
<!-- STP SCA model located into the private repository. -->
<dependency>
<groupId>org.eclipse.stp</groupId>
<artifactId>sca-custom</artifactId>
<version>1.0.0</version>
<artifactId>sca</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
......
......@@ -28,8 +28,7 @@ import java.util.HashMap;
import org.eclipse.stp.sca.BaseReference;
import org.eclipse.stp.sca.BaseService;
import org.eclipse.stp.sca.Binding;
import org.eclipse.stp.sca.RMIBinding;
import org.eclipse.stp.sca.ScaPackage;
import org.eclipse.stp.sca.domainmodel.tuscany.RMIBinding;
import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.NoSuchInterfaceException;
import org.objectweb.fractal.bf.BindingFactory;
......@@ -52,7 +51,8 @@ public class ScaBindingRMI implements ScaBindingProtocol {
* The binding type according to the SCA model
*/
public static int BINDING_TYPE = ScaPackage.RMI_BINDING;
public static int BINDING_TYPE = org.eclipse.stp.sca.domainmodel.tuscany.TuscanyPackage.RMI_BINDING;
/**
* Logger for this class
......
......@@ -26,7 +26,7 @@ package org.ow2.frascati.factory_backend.core.instance.implementation;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.stp.sca.FractalImplementation;
import org.eclipse.stp.sca.domainmodel.frascati.FractalImplementation;
import org.eclipse.stp.sca.Implementation;
import org.objectweb.fractal.adl.ADLException;
import org.objectweb.fractal.adl.FactoryFactory;
......@@ -68,7 +68,7 @@ public class ScaFractalImpl implements ScaImplementation {
try {
// Try loading from definition generated with Juliac
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Class<?> classe = cl.loadClass(impl.getDefinition());
Class<?> classe = cl.loadClass(impl.getDescription());
org.objectweb.fractal.api.factory.Factory object = (org.objectweb.fractal.api.factory.Factory) classe
.newInstance();
......@@ -87,24 +87,25 @@ public class ScaFractalImpl implements ScaImplementation {
f = FactoryFactory.getFactory(FactoryFactory.FRACTAL_BACKEND);
// try instanciation for the given Fractal ADL definition
c = (Component) f.newComponent(impl.getDefinition(), context);
c = (Component) f.newComponent(impl.getDescription(), context);
return c;
} catch (ADLException ex) {
// Error with Fractal ADL
log.severe("Error in the Fractal implementation : "
+ impl.getDefinition());
+ impl.getDescription());
ex.printStackTrace();
}
} catch (InstantiationException e) {
throw new ImplementationException(
"Error when building instance for class " + impl.getDefinition(), e);
"Error when building instance for class " + impl.getDescription(), e);
} catch (IllegalAccessException e) {
throw new ImplementationException("Could not access class "
+ impl.getDefinition(), e);
+ impl.getDescription(), e);
} catch (org.objectweb.fractal.api.factory.InstantiationException e) {
throw new ImplementationException(
"Error when building component instance : " + impl.getDefinition(), e);
"Error when building component instance : " + impl.getDescription(), e);
}
return c;
......@@ -119,7 +120,8 @@ public class ScaFractalImpl implements ScaImplementation {
*/
public int getImplementationID() {
return org.eclipse.stp.sca.ScaPackage.FRACTAL_IMPLEMENTATION;
return org.eclipse.stp.sca.domainmodel.frascati.FrascatiPackage.FRACTAL_IMPLEMENTATION;
}
}
......@@ -24,7 +24,7 @@
package org.ow2.frascati.factory_backend.core.instance.implementation.spring;
import org.eclipse.stp.sca.Implementation;
import org.eclipse.stp.sca.SpringImplementation;
import org.eclipse.stp.sca.domainmodel.tuscany.SpringImplementation;
import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.factory.GenericFactory;
import org.objectweb.fractal.api.factory.InstantiationException;
......@@ -80,7 +80,8 @@ public class ScaSpringImpl implements ScaImplementation
*/
public int getImplementationID ()
{
return org.eclipse.stp.sca.ScaPackage.SPRING_IMPLEMENTATION;
return org.eclipse.stp.sca.domainmodel.tuscany.TuscanyPackage.SPRING_IMPLEMENTATION;
}
/** (non-Javadoc)
......
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE definition PUBLIC "-//objectweb.org//DTD Fractal ADL 2.0//EN" "classpath://org/objectweb/fractal/adl/xml/standard.dtd">
<!-- OW2 FraSCAti Assembly Factory -->
<!-- Copyright (C) 2008-2009 INRIA, USTL -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
<!-- License as published by the Free Software Foundation; either -->
<!-- version 2 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -->
<!-- Lesser General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Lesser General Public -->
<!-- License along with this library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Damien Fournier -->
<!-- -->
<!-- Contribution: Philippe Merle -->
<definition name="org.ow2.frascati.factory_backend.Frascati">
<interface name="load" signature="org.ow2.frascati.factory_backend.core.dispatcher.Manager"
role="server"/>
<interface name="runtime" signature="org.ow2.frascati.factory_backend.core.instance.runtime.RuntimeFactory"
role="server"/>
<component name="assembly-factory" definition="org.ow2.frascati.factory_backend.AssemblyFactory"/>
<component name="binding-factory" definition="org.objectweb.fractal.bf.BindingFactory"/>
<component name="tinfi" definition="org.ow2.frascati.factory_backend.core.instance.runtime.TinfiRuntime"/>
<component name="binding-factory-plugins" definition="org.objectweb.fractal.bf.PluginResolver"/>
<component name="tinfi" definition="org.ow2.frascati.factory_backend.core.instance.runtime.TinfiRuntime" />
<binding client="this.runtime" server="tinfi.runtime"/>
<binding client="this.load" server="assembly-factory.load"/>
<binding client="assembly-factory.runtime" server="tinfi.runtime"/>
......
......@@ -25,7 +25,7 @@
package org.ow2.frascati.factory_backend.generate.implementation;
import org.eclipse.stp.sca.Implementation;
import org.eclipse.stp.sca.SpringImplementation;
import org.eclipse.stp.sca.domainmodel.tuscany.SpringImplementation;
import org.objectweb.fractal.api.factory.GenericFactory;
import org.objectweb.fractal.api.factory.InstantiationException;
import org.objectweb.fractal.api.type.ComponentType;
......@@ -78,7 +78,8 @@ public class ScaSpringImpl implements ScaImplementation
*/
public int getImplementationID ()
{
return org.eclipse.stp.sca.ScaPackage.SPRING_IMPLEMENTATION;
return org.eclipse.stp.sca.domainmodel.tuscany.TuscanyPackage.SPRING_IMPLEMENTATION;
}
/** (non-Javadoc)
......
Supports Markdown
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