got it running and pushed it to my github repo
https://github.com/struberg/myfaces-tobago
Don't want to push it to MyFaces directly for now as it breaks the
enforcer-plugin due to the mw-snapshot.
@Dennis, Udo
please review it. I can push it to Tobago once it works well enough.
LieGrue,strub
On Tuesday, 6 February 2018, 15:18:31 CET, Romain Manni-Bucau
<[email protected]> wrote:
2018-02-06 15:15 GMT+01:00 Mark Struberg <[email protected]>:
Well, Dennis' code uses the following fqcn: org.apache.myfaces.tobago.
example.demo.info.ActivityList
And since it starts with 'org.apache.myfaces' it is thrown away. Which imo
should not be the case
If we would make the included and excluded class filter configurable via
openwebbeans.properties then we could at least add org.apache.myfaces.tobago.
example to the 'included' list. And all would work fine. Wdyt?
Actually it should be configurable through scanning package options
(include/exclude).
LieGrue,strub
On Tuesday, 6 February 2018, 14:20:56 CET, Romain Manni-Bucau
<[email protected]> wrote:
yes, the exclusion is intended since the MF extension registers the beans
already so no need to pay the scanning time.
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn | Book
2018-02-06 14:09 GMT+01:00 Thomas Andraschko <[email protected]>:
I mean that it should not fail because of duplicate beans therefore.
Am Dienstag, 6. Februar 2018 schrieb Thomas Andraschko :
AFAIR MyFaces should not be scannend and all beans are registered via a
extension?! Also AFAIR it doenst even has a beans.xml.
Am Dienstag, 6. Februar 2018 schrieb Mark Struberg :
Hi folks!
I've debugged the example and it falls into the category 'bad luck' ;)
Meecrowave has a specialised Filter KnowClassesFilter which by default excludes
some packages which are well known to not contain any CDI beans. This is done
to improve the startup time.
There is kind of a positive/negative lookup
logic.https://github.com/apache/meec rowave/blob/trunk/meecrowave-c
ore/src/main/java/org/apache/m eecrowave/openwebbeans/KnowCla
ssesFilter.java#L41
We have the 'included': if some class starts with any of those package names,
then we add it If the class package does not show up in the included list then
we look into the 'excluded'.And if we find it there, then we skip the whole
class.
Sadly 'org.apache.myfaces' is in this very 'excluded' list ...And this is why
Dennis' sample beans are not found. Any other project will work perfectly fine.
Do we like to make this configurable?
Actually I think we do not even need this. It should only be used if you create
a single-jar packaging (uberjar).Otherwise the 'bad' jars in question are
already filtered out as a whole anyway by the!
A quick hack would be to add a Filter and register it in
openwebbeans.properties. That will of course trash the portability of your
sample...
LieGrue,strub
On Tuesday, 6 February 2018, 09:24:15 CET, Romain Manni-Bucau
<[email protected]> wrote:
Hi Dennis,
can you check this diff https://gist.github.com/r
mannibucau/c63afe1326ca9e74097 35b3f5911ea45 ?
I'm not sure why the bean is not found, is it a bad JSF setup?
About the duplicate, it seems myfaces adds twice the same bean if you scan it:
once by scanning, once in the extension org.apache.myfaces.f
low.cdi.FlowBuilderCDIExtensio n#beforeBeanDiscovery. So long story short
org.apache.webbeans.conf ig.BeansDeployer#addAdditional AnnotatedTypes ends up
adding again the same beans. We can surely filter it in OWB but also guess you
should be able to make it working without scanning myfaces at all, no?
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn | Book
2018-02-06 8:04 GMT+01:00 Dennis Kieselhorst <[email protected]>:
Hi Romain,
thanks for your feedback. Let's leave out Tobago, the demo needs to run in
several setups and is somehow complex.
We are about to release MyFaces 2.3.0 and I'd like to create an archetype for
plain MyFaces and Meecrowave. Tried with a simple hello world sample but still
getting DuplicateDefinitionException.
Can you please take a look? https://github.com/deki/ myfaces-meecrowave-sample
Cheers
Dennis