> Hello, > > In the merlin block.xml file, you describe a component as > follows: > > <component name="test1" class="tutorial.TestComponent" > activation="startup"> > <configuration> > <source>configuration from block directive</source> > </configuration> > </component> > > Why is the "class" attribute required? > > With the xinfo files available, shouldn't it be possible > to just specify a name and version and then the container > finds the class from the meta-info? Granted, I don't know > merlin internals very well yet, but it seems possible to me.
Two problems:
The approach you describing would work if we could gaurantee
that the name of a component type (declared in the xinfo
descriptor could be assumed to be a unique key within the
scope of the type repository). This is problamatic because
the type repository is per-classloader which means that you
could have conflicting names.
Second issue is that the name declared under the deployment directive (the <component> tag) is the name of a deployment profile (and not a type). This is important when you want to deploy the same component type in different deployment scenarios. E.g. a type name may be "keystore" whereas the deployment directive names my be "credentials" and "authorities".
At the end of the day - the class name attribute is the unique key with the scope of the repository and from that the location of the meta-info and associated data can be resolved.
> Also, seems like it should be possible to generate a basic > block.xml file from a maven project.xml file. I'm going to > look into it, just wondering if anyone else has already > started on this idea.
I guees your thinking about the construction of a classpath declaration and setup of the basic block structure? This would make sence.
Cheers, Steve.
> J. Aaron Farr
--
Stephen J. McConnell mailto:[EMAIL PROTECTED] http://www.osm.net
Sent via James running under Merlin as an NT service. http://avalon.apache.org/sandbox/merlin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
