Em Mon, 04 May 2009 14:09:27 -0300, 蓝天白云 <[email protected]>
escreveu:
Hi,
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:
[snip]
*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
http://extwind.googlecode.com/svn/trunk/Tapestry-OSGi/org.extwind.osgi.tapestry/src/org/extwind/osgi/tapestry/internal/proxy/ProxyTapestryFilter.java:
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
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]