tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiago H. de Paula Figueiredo" <thiag...@gmail.com>
Subject Re: Problems with developing Tapestry 5 on osgi environment
Date Mon, 04 May 2009 22:13:57 GMT
Em Mon, 04 May 2009 14:09:27 -0300, 蓝天白云 <donf.yang@gmail.com>  

> Hi,


> I'm developing Tapestry 5 base on osgi environment recently

Nice! Could you share the code with use when it's done?

> and it's almost done at this time but 3 problems:
> *1. case-insensitive*
> As we know, java is a case-sensitive world,, I really can't make sense  
> why tapestry built with case-insensitive.

I'm not familiar with OSGi, but what's the problem here?

> *2. controlledPackageNames*
> I can't remove packages from controlledPackageNames when component  
> bundles
> stop until get any supported method from ComponentInstantiatorSource such
> like
>  void removePackage(String packageName);

Components (and pages and mixins) are added through Tapestry IoC, which  
loads all modules at registry startup time. After that, you can't add nor  
remove modules (including components, pages and mixins).

> *3. Service binding*
>  This is a major problem with osgi.
> I just researched how tapestry's service binding, if any chance to  
> provide a way to add modules in Registry or something else like  
> following:
> addModules(Collection<ModuleDef> moduleDefs, ...)

You cannot add modules after the Registry is created, but you can add them  
before, using RegistryBuilder directly. Or, in the case of the  
TapestryFilter, using TapestryAppInitializer. Reading your code, I've  
found this line in  

TapestryAppInitializer appInitializer = new  
TapestryAppInitializer(provider, filterName, "servlet");

After this line, you can call appInitializer.addModules(Class... modules)  
to add any Tapestry-IoC module you need.

I hope I gave you some good hints. :)

Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org

View raw message