This leaves me with two questions:

My App Module class extended the
Component Module class. (Doh!) I now remember doing this to have the
Jetty Launcher in Eclipse pick up the component module configuration.

1) Why would you extend a module class so that it is effectively included, when all you need to do is have it on the class path and the the appropriate manifest entry (which I believe you said you had)? One of the main bonuses of having component libs is to specifically avoid this rigid coupling. However even if you wanted that, this is what @SubModule is for.

Except for maybe adding extra configuration for a test version of an
application I can't think why you'd want to extend the module class.

2) Again, extending the module class is (IMO) the Wrong Way(tm) of doing this. I do this kind of testing/demoing for my component lib and have such a test version of an app module. In the test version I simply use @SubModule to 'include' the usual app module.

Don't mistake my input as criticism - I just want to know if you were aware of these seemingly emerging T5 best practices and had found reasons to avoid them. If so, please share!

sincerely,
chris

Steve Eynon wrote:
Except for maybe adding extra configuration for a test version of an
application I can't think why you'd want to extend the module class.
That said, it's quite a constraint to impose for the module class
doesn't *need* to be final. (And guaranteed someone, somewhere will
want to at some point for some reason!)

Maybe consider logging a warning message instead? That would then give
more context to the "Service id has already been defined" error
message.

Steve.

On Dec 8, 2007 5:26 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
Makes me wonder if Tapestry modules should be final?


On Dec 8, 2007 9:12 AM, Steve Eynon <[EMAIL PROTECTED]> wrote:
To clear this one up, I was in error. My App Module class extended the
Component Module class. (Doh!) I now remember doing this to have the
Jetty Launcher in Eclipse pick up the component module configuration.

During my tour of the tapestry source I came across the
"tapestry.modules" system parameter, so I can now have the component
module picked up by both a stand-alone Jetty instance and the Eclipse
Jetty Launcher.

Cheers,

Steve.

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



Reply via email to