eclipselabs / passerelle

Passerelle, an actor-based process engine based on Ptolemy II
5 stars 3 forks source link

Make migration from passerelle v5.x easier : enable loading existing models #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Passerelle v5.x had many Java packages beginning with be.isencia...
With v7, all packages have been renamed to com.isencia..., also for actors, 
config panel factories etc.

As a consequence, old models no longer load with the v7.

We should provide an automated solution to map be.isencia.... names to the new 
com.isencia... analogues.

Original issue reported on code.google.com by erwin...@gmail.com on 29 Nov 2011 at 2:08

GoogleCodeExporter commented 9 years ago

Original comment by erwin...@gmail.com on 29 Nov 2011 at 2:15

GoogleCodeExporter commented 9 years ago
Done via a small change in Passerelle's MOMLParser.

All Class.forName() calls are regrouped in a new method loadClass() that, when 
it can not find a given class, checks if the qualified class name begins with 
be.isencia and then replaces it with com.isencia.

A more fundamental mechanism will be implemented later, with a  planned 
modification of MOMLParser to delegate class loading to service instances. This 
is needed to allow dynamic actor class reloading (and other types of 
passerelle/ptolemy-related objects?) following OSGi bundle updates.

Original comment by erwin...@gmail.com on 30 Nov 2011 at 9:14