Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
frascati
frascati
Commits
fa5ed52f
Commit
fa5ed52f
authored
Feb 14, 2009
by
Pierre CARTON
Browse files
AF-Backend :
work on move to tinfi 0.4.4 and juliac 2.1.5
parent
fd539222
Changes
6
Hide whitespace changes
Inline
Side-by-side
core-factory/pom.xml
View file @
fa5ed52f
...
...
@@ -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>
...
...
core-factory/src/main/java/org/ow2/frascati/factory_backend/core/instance/binding/ScaBindingRMI.java
View file @
fa5ed52f
...
...
@@ -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
...
...
core-factory/src/main/java/org/ow2/frascati/factory_backend/core/instance/implementation/ScaFractalImpl.java
View file @
fa5ed52f
...
...
@@ -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
.
getDe
fini
tion
());
Class
<?>
classe
=
cl
.
loadClass
(
impl
.
getDe
scrip
tion
());
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
.
getDe
fini
tion
(),
context
);
c
=
(
Component
)
f
.
newComponent
(
impl
.
getDe
scrip
tion
(),
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
.
getDe
fini
tion
(),
e
);
"Error when building instance for class "
+
impl
.
getDe
scrip
tion
(),
e
);
}
catch
(
IllegalAccessException
e
)
{
throw
new
ImplementationException
(
"Could not access class "
+
impl
.
getDe
fini
tion
(),
e
);
+
impl
.
getDe
scrip
tion
(),
e
);
}
catch
(
org
.
objectweb
.
fractal
.
api
.
factory
.
InstantiationException
e
)
{
throw
new
ImplementationException
(
"Error when building component instance : "
+
impl
.
getDe
fini
tion
(),
e
);
"Error when building component instance : "
+
impl
.
getDe
scrip
tion
(),
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
;
}
}
core-factory/src/main/java/org/ow2/frascati/factory_backend/core/instance/implementation/spring/ScaSpringImpl.java
View file @
fa5ed52f
...
...
@@ -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)
...
...
core-factory/src/main/resources/org/ow2/frascati/factory_backend/Frascati.fractal
View file @
fa5ed52f
<?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"
/>
...
...
generate-factory/src/main/java/org/ow2/frascati/factory_backend/generate/implementation/ScaSpringImpl.java
View file @
fa5ed52f
...
...
@@ -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)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment