Closed gottschd closed 2 years ago
Hi all, it seems to me as an important issue, no? Do I miss something? Are more information necessary? Is there anybody who can also reproduce this? Thanks for feedback.
Hi,
Sorry for the late reply but I can also reproduce it with 5.201 and 5.2020.4. I have created the internal issue /FISH-460
so that the engineering team can investigate this issue further.
Thank you for the reproducer and for reporting this issue.
Best Regards Rudy
This was rejected by dev team some time ago (sorry for the late reply)
The env entry is only defined for the EJBs created via the ejb-jar.xml file (the “fancy” ones), those nulls are coming from the Producer/Consumer that were created by annotations and thus don’t have a env variable definition in the ejb-jar.xml file since they’re bean specific.
Both the annotations and end xml definition creates a set of beans and only the 'XML ones' are configured with env-entries.
Description
Using a
@Resource
annotation on a member in an EJB or MDB will not always lead to a correctly initialized value. Sometimes it is null. The value comes from the corresponding "ejb-jar.xml".Expected Outcome
The member with the
@Resource
annotation is always initialized correctly and stays stable., i.e. does not change the value from null to not-null in an undeterministic way in case the EJb or MDB is called multiple times.Current Outcome
The member inside an EJB/MDB annotated with
@Resource
switches its value between null and not-null in an undeterministic non-stable way.Steps to reproduce (Only for bug reports)
Sample maven project available here. Deploy the resulting simple-mdb-env-ear.ear from the maven project in payara and watch the server.log file.
Long story short:
Create an MDB
Create an EJB
ejb-jar.xml
Environment