On Jan 29, 2010, at 12:54 PM, Jarek Gawor wrote:
Hi all,
I'm trying to get myfaces working in trunk. Myfaces has a TLD file (in
META-INF directory) that contains a servlet context listener that the
web container is supposed to discover and register at startup. That
servlet context listener sets things up so that myfaces works right.
The problems is that in OSGi environment the web container does not
really see other TLDs besides what's included in the application. So
I'm wondering how to discover these non-application TLDs that might be
required for the application to work. And it's not just a matter of
finding the TLD files, we also have to load/instantiate the listener
class specified in the TLDs.
I guess we could build some registry of TLDs but how would we know
that one set of TLDs are needed for app A and another set for app B?
Or what if there are two different versions of some TLDs?
Or maybe we just provide some specific solution for the jfs/myfaces
problem and not worry about generic solution for now?
Thoughts?
One way to abstract this scenario might be:
myfaces has a service (supplying a ServletContextListener instance)
The myfaces MBE recognizes that the web app needs to use this service
by finding some jsf goo in the web app. So it could install something
that calls the service at an appropriate time.
When the app starts, this service-consuming code gets the servlet
listener and installs it.
This seems like it sidesteps the gooey ill-defined discovery mechanism?
thanks
david jencks
Jarek