Stephen McConnell wrote:


Richard Wallace wrote:

Hey again,

On Tue, 2003-01-21 at 18:59, Stephen McConnell wrote:

Sounds to me like you should be creating a Block instead of stuffing
around with bootstrapping.

1. create an EngineClassLoader

* this means referencing externally located jar files
containing the components you want to use
* if the web app is not running as a component within
Merlin then you will need to create the logging system (see
the engine test case in the assembly package for an
example)

2. create a block

* create a appliance context and populate it with
everything it needs
* use the engine to create the block using the appliance
context as an argument
see DefaultBlockLoader.createBlock( ...) for an example

3. start the block


I did number one from above. I've got everything else setup properly. I have the jars in the WEB-INF/lib and just use the Tomcat ClassLoader
to create the EngineClassLoader. That worked out well.

I'm having some problems with step two. Everywhere I look there is a
reference to the registry, even in the DefaultBlockLoader.createBlock()
method. It seems to play an important role.

The registry is the mechanisms used by blocks to export the services establisted by their respective implementations. It will be important in respect to block level assembly (which is not in place yet). Currently the machinery is in place for capturing the service export and these are expressed as URLs.

But, every time I try and
create an instance of the DefaultRegistry class I get the same
MalformedURLException saying "native" is an unknown protocol. My guess
is that Tomcat sets the URLStreamHandler so when the DefaultRegistry
tries to set it again, it fails. I haven't been able to find anywhere
where this might be configurable in Tomcat v4.1.18 (so I can tell it
what to use).

I'm looking into this now - basically uping the error handling because I think the problem is occuring somewhere where I'm not expecting a problem. Will have some more news on this in a bit.

You mentioned something about using Excalibur source resolver instead of
the current setup.  Any progress on that so far?  I think I might be
kinda at a standstill until this gets resolved.  I'd be willing to help
if you could give me direction.

Sylvain Wallez is the guy who is working on this. I've been looking over the package but I havn't go too far (not much documetation the last time looked but I know Sylvain has been working on this). Have CC'ed Sylvain with the objective of pulling him into this discussion.

As far as I understand the discussion, the problem is to use some specific URL-schemes when Tomcat already has already set the set-only-once-per-JVM URL.setURLStreamHandlerFactory().

The Excalibur SourceResolver (originated in Cocoon) and was meant just for this : provide a component that resolves an URI to a Source object, from which you can get an InputStream. Many implementations exist today to access files, URLs, classpath-resources, webdav servers, and even a CVS server.

I don't know how to integrate this in Merlin, but this may be what you're looking for.

Cheers,
Sylvain

--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to