In my company we are trying to embed a Tapestry application into an OSGi
application. We are using Equinox (http://www.eclipse.org/equinox/) as an
implementation of the OSGi R4 specification. Via OSGi Http service it is
possible to embed a simple Servlet into OSGi. But we are experiencing
classpath problems during the initialization of a Hello world Tapestry
application .

In OSGi every single bundle has it own class loader. When our bundle tries
to initialize Tapestry it fails because no page classes can be found. The
reason is that the URLs of the resources within Equinox have a prefix
"bundleresource" or "bundleentry". Because Tapestry's ClassNameLocatorImpl
is not able to resolve such URLs Tapestry fails to find the page classes. We
solved the problem temporary by replacing the class ClassNameLocatorImpl by
our own implementation. Now we approach a clear solution.

It would be great if we could tell ComponentClassResolverImpl to to use
another ClassNameLocator implementation. Unfortunately we can't override any
of the mentioned services because Tapestry fails before AppModule gets the
chance to contribute or override any service.

Do you have any ideas? We are happy about every hint.

-- 
Best regards,

Igor Drobiazko

Reply via email to