You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Alessandro Adamou <ad...@cs.unibo.it> on 2012/10/05 18:14:09 UTC
Re: The OntoNet name is trademarked, can I still use it?
I did the first commits for getting the ontonet renaming done. I'm
having trouble preserving backwards compatibility for service
interfaces. I'm trying to do as Olivier suggested:
On 7/4/12 11:56 AM, Olivier Grisel wrote:
> For the interface it's quite easy: just make the old deprecated
> interfaces inherit from the new ones.
Say I have
public interface old.package.Manager extends new.package.Manager { ... }
then when I implement it in a component I do something like
@Component
@Service({ old.package.Manager, new.package.Manager })
public class ManagerImpl implements old.package.Manager { ... }
and suppose I have two other Components that reference it, one using the
new interface and one using the old interface (for instance, one could
be a Stanbol component and the other a third-party component that must
remain compatible).
@Component
public class A {
@Reference
new.package.Manager mgr;
}
@Component
public class B {
@Reference
old.package.Manager mgr;
}
Well, both A and B had their reference unsatisfied. If instead there is
only one type used for referencing the Component, it seems to work.
Moreover, here's the funny part, if I move the deprecated interface from
the old package to a different one, say bogus.package.Manager , and
refactor accordingly, then both references are satisfied!
For some really obscure reason, it seems not to like the
ontologymanager.ontonet.api package in conjunction with the new
ontologymanager.servicesapi one!
...and yes, the services API is exporting both the old packages and the
new ones.
As soon as I figure out how to fix that, I'll improve backwards
compatibility.
Alessandro
--
M.Sc. Alessandro Adamou
Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy
Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy
"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)
Not sent from my iSnobTechDevice
Re: The OntoNet name is trademarked, can I still use it?
Posted by Alessandro Adamou <ad...@cs.unibo.it>.
Ok I think I found the murderer. There was a second bundle exporting the
deprecated ontonet package but with no version indication. I guess this
caused bundle classloaders to go bananas and fail to resolve service
references.
I removed that export altogether, it was useless.
I'll keep you posted on completing the refactoring (the RESTful
endpoints too).
Alessandro
On 10/5/12 6:14 PM, Alessandro Adamou wrote:
> I did the first commits for getting the ontonet renaming done. I'm
> having trouble preserving backwards compatibility for service
> interfaces. I'm trying to do as Olivier suggested:
>
> On 7/4/12 11:56 AM, Olivier Grisel wrote:
>> For the interface it's quite easy: just make the old deprecated
>> interfaces inherit from the new ones.
>
> Say I have
>
> public interface old.package.Manager extends new.package.Manager { ... }
>
> then when I implement it in a component I do something like
>
> @Component
> @Service({ old.package.Manager, new.package.Manager })
> public class ManagerImpl implements old.package.Manager { ... }
>
> and suppose I have two other Components that reference it, one using
> the new interface and one using the old interface (for instance, one
> could be a Stanbol component and the other a third-party component
> that must remain compatible).
>
> @Component
> public class A {
>
> @Reference
> new.package.Manager mgr;
>
> }
>
> @Component
> public class B {
>
> @Reference
> old.package.Manager mgr;
>
> }
>
> Well, both A and B had their reference unsatisfied. If instead there
> is only one type used for referencing the Component, it seems to work.
>
> Moreover, here's the funny part, if I move the deprecated interface
> from the old package to a different one, say bogus.package.Manager ,
> and refactor accordingly, then both references are satisfied!
>
> For some really obscure reason, it seems not to like the
> ontologymanager.ontonet.api package in conjunction with the new
> ontologymanager.servicesapi one!
>
> ...and yes, the services API is exporting both the old packages and
> the new ones.
>
> As soon as I figure out how to fix that, I'll improve backwards
> compatibility.
>
> Alessandro
>
--
M.Sc. Alessandro Adamou
Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy
Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy
"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)
Not sent from my iSnobTechDevice