-
1. Re: EJB injection from JBoss Module
wdfink Sep 12, 2013 5:44 AM (in response to slrslr)I think you mean this feature WFLY-2030?
You might use upstream to check it.
-
2. Re: EJB injection from JBoss Module
ctomc Sep 12, 2013 6:03 AM (in response to slrslr)Did you create jandex annotation index for your ejb jboss module?
-
3. Re: EJB injection from JBoss Module
slrslr Sep 12, 2013 7:55 AM (in response to ctomc)Hello,
No I did no create a jandex index.
I have already seen this word when searching info about my problem, but I never managed to find any documentation about what is jandex index (except that it is an index of annotations present in a jar), what it does and in which case and how to use it.
Is it necessary ? If yes how does it work ?
Thank you.
-
4. Re: EJB injection from JBoss Module
jaikiran Sep 12, 2013 9:56 AM (in response to slrslr)1 of 1 people found this helpfulSee this thread Annotation inheritance on AS 7 and the ones referenced in there.
-
5. Re: EJB injection from JBoss Module
slrslr Sep 13, 2013 11:35 AM (in response to jaikiran)Hello,
This is what I tried:
- generate the jandex index file for the jar file that have indexes in my module (I never managed to generate an index file for the whole directory).
- I created a jar called jandex.jar with a folder META-INF and inside the jandex.idx that I just generated.
- I updated the module.xml and added this jandex.jar in the resources-root.
When loading the module I see:
17:24:17,614 TRACE [org.jboss.modules] (MSC service thread 1-2) Attempting to find all resources META-INF/jandex.idx in Module <name_of_my_module>:main" from local module loader @215750e4 (finder: local module finder @6b7fb9d5 (roots: /<my_install>/JBoss/modules, <my_install>/JBoss/modules/system/layers/base))
17:24:17,614 ERROR [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015894: Module <name_of_my_module>:main will not have it's annotations processed as no META-INF/jandex.idx file was found in the deployment. Please generate this file using the Jandex ant task.
So it does not find the jandex.idx.
I also tried:
- put the jandex.idx in my original jar (here also the -m option does not work, so I unjared added the file, and repacked manually) --> not better
- I then thought that it was because the META-INF folders of a module are not loaded by default in a deployment. I tried to add an <imports> block in the jboss_deployment_structure.xml to tell it to import "META-INF/*" --> not better
I also tried to find an example working, it seems that the resteasy jars (as sugggested in one link) do not have jandex.idx files anymore.
What is the recipe ? I am not sure of anything I do cause there is no documentation anywhere. Is there something special to do to have the jandex.idx found (special location) and processed at deployment time ?
Thank you in advance