[opencms-dev] I_CmsResourceLoader and I_CmsLauncher: which to use?

M Butcher mbutcher at grcomputing.net
Sat Mar 13 00:56:03 CET 2004


I want to add a custom launcher-thing to handle my new custom resource 
type. Reading through the Javadocs, it appears that I have two options: 
I can implement I_CmsResourceLoader or I_CmsLauncher.

I tried implementing the I_CmsLauncher interface, basing it largely on 
A_CmsLauncher and the CmsLinkLauncher class. The only methods that I 
implemented were those defined in I_CmsLauncher. Once I finished and 
compiled it, I loaded it into my module, added it to <launchers/> in 
registry.xml, associated <launcherType/> for my resource type, and 
restarted Tomcat, and... nothing happened.

Well, actually, I did get this note in the log:

Launcher loaded: tv.aleph_null.opencms.xml.generic.CmsXslLauncher with id 21

No errors or anything -- not even in catalina.out.

My resource type definition looks like this:
<restype>
   <name>genxml</name>
   <launcherType>21</launcherType>
   <launcherClass/>
   <resourceClass>com.opencms.file.GenericXmlResourceType</resourceClas
s>
</restype>

But as far as I can tell, the CmsDumpLoader is being used instead of the 
CmsXslLauncher launcher that I defined. So... did I miss the point of 
how to implement an I_CmsLauncher? Should I have used an 
I_CmsResourceLoader? What is the difference?

Actually, I like the I_CmsResourceLoader interface a lot more (looks 
like a servlet), but I don't know how to register it. Do I use the 
<launchers/> definition for that, too?

Thanks,

Matt



More information about the opencms-dev mailing list