Discussion:
command-control vs. command-control-default
Brian Frutchey
2009-08-11 15:47:27 UTC
Permalink
Could someone explain for me the difference between the
generic.sesam/search-command-control module and the
generic.sesam/search-command-control/default module? They seem
duplicative. Trying to track down why YahooWebSearchCommand can't call
the protected method of its ancestor AbstractSearchCommand... Thanks!



Brian



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://sesat.no/pipermail/kernel-development/attachments/20090811/6317cd7d/attachment-0001.htm
Mck
2009-08-12 10:14:13 UTC
Permalink
Post by Brian Frutchey
Could someone explain for me the difference between the
generic.sesam/search-command-control module and the
generic.sesam/search-command-control/default module? They seem
duplicative. Thanks!
Good question brian!
search-command-control is an assembly module, that is it does not
contain any sources but assembles a "search-command-control" build from
just
search-command-control/default
or from both
search-command-control/default
search-command-control/fast

The decision to assemble both together into one module happens when you
build with "-Pinclude-fast".

This is because the fast search commands reference proprietary libraries
from FAST. Without them these proprietary libraries the build won't work
and you can't get them unless you have a license agreement with FAST.

So by default sesat-kernel builds without any FAST search commands and
indeed the assembly module ends up looking like an exact duplicate of
the the child "default" module :-) Maven trickery. If you take a closer
look you'll see all the sources really lie inside the children default
and fast modules.
Post by Brian Frutchey
Trying to track down why YahooWebSearchCommand can?t call the
protected method of its ancestor AbstractSearchCommand?
The error was not classloading related but how anonymous inner classes
work in java. An anonymous inner class (the new AbstractXmlRestful
inside the YahooWebSearchCommand's constructor) is unable to call the
method in the outer class YahooWebSearchCommand.this.getFilter() if that
method is in a superclass, despite being public or protected.
This isn't a well documentation part of the java specification (at least
not obvious to me).
The solution is always to override the method and delegate to the
superclass. For example in this case the fix was nothing more than to
add to YahooWebSearchCommand.java

@Override
protected String getFilter() {
return super.getFilter();
}


~mck
--
"If we look at the path, we do not see the sky." Native American saying
| semb.wever.org | sesat.no | finn.no |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://sesat.no/pipermail/kernel-development/attachments/20090812/a4e8874d/attachment.pgp
Loading...