#
swilliam
Dear All
Using the standard 1.5 binaries, I think I may have found something not quite right with the way classes are loaded during module creations.
I have a variant of the Articles module I have called ArticlesExt which uses the Cuyahoga.Modules.ArticlesExt namespace. There are several modules within this assembly, but they all take a constructor using the interface Cuyahoga.Modules.ArticlesExt.DataAccess.IArticleDao, in common with the standard Articles module (but a different interface, obviously). The related services are registered in the cuyahoga_moduleservice table under different names (obviously).
Depending on which module is first loaded, I can *either* get an instance of my ArticlesExt modules *or* an instance of the standard Articles module. In each case, they both work perfectly, each doing their own thing correctly, but I can never get them *both* working at the same time, the other one throwing an exception saying it can't create a proxy.
I have checked and cannot see any namespace clashes or full class name conflicts. I renamed the main ArticlesExt module and that made no difference. I renamed the service key and that didn't seem to fix it either. Finally, I renamed the new IArticleDao interface and ArticleDao to ILinkArticleDao and LinkArticleDao respectively. This fixed the problem.
Is there something in Castle or the ModuleLoader that is using just the interface/class local name, rather than full name? I suspect what happens is once one interface/service is registered, the other module is picking up the wrong one by mistake.
Has anyone else had any problems with interfaces/services of similar names?
Many thanks
Simon
Using the standard 1.5 binaries, I think I may have found something not quite right with the way classes are loaded during module creations.
I have a variant of the Articles module I have called ArticlesExt which uses the Cuyahoga.Modules.ArticlesExt namespace. There are several modules within this assembly, but they all take a constructor using the interface Cuyahoga.Modules.ArticlesExt.DataAccess.IArticleDao, in common with the standard Articles module (but a different interface, obviously). The related services are registered in the cuyahoga_moduleservice table under different names (obviously).
Depending on which module is first loaded, I can *either* get an instance of my ArticlesExt modules *or* an instance of the standard Articles module. In each case, they both work perfectly, each doing their own thing correctly, but I can never get them *both* working at the same time, the other one throwing an exception saying it can't create a proxy.
I have checked and cannot see any namespace clashes or full class name conflicts. I renamed the main ArticlesExt module and that made no difference. I renamed the service key and that didn't seem to fix it either. Finally, I renamed the new IArticleDao interface and ArticleDao to ILinkArticleDao and LinkArticleDao respectively. This fixed the problem.
Is there something in Castle or the ModuleLoader that is using just the interface/class local name, rather than full name? I suspect what happens is once one interface/service is registered, the other module is picking up the wrong one by mistake.
Has anyone else had any problems with interfaces/services of similar names?
Many thanks
Simon