Skip to content

Commit

Permalink
Merge pull request payara#4136 from Pandrex247/PAYARA-4028-PostContru…
Browse files Browse the repository at this point in the history
…ct-Clustered

PAYARA-4028 PostConstruct values lost in Clustered Singleton EJBs
  • Loading branch information
Pandrex247 committed Aug 13, 2019
1 parent 4c04a45 commit 83a0c29
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ protected void releaseContext(EjbInvocation inv) throws EJBException {
try {
invocationManager.preInvoke(inv);
if (clusteredLookup.getClusteredSingletonMap().containsKey(clusteredLookup.getClusteredSessionKey())) {
clusteredLookup.getClusteredSingletonMap().put(clusteredLookup.getClusteredSessionKey(), inv.context.getEJB());
clusteredLookup.getClusteredSingletonMap().set(clusteredLookup.getClusteredSessionKey(), inv.context.getEJB());
}
}
finally {
Expand Down Expand Up @@ -553,6 +553,10 @@ private SingletonContextImpl createSingletonEJB()

if (doPostConstruct) {
intercept(CallbackType.POST_CONSTRUCT, context);
// Make sure to update Object stored in Map
if (clusteredLookup.isClusteredEnabled()) {
clusteredLookup.getClusteredSingletonMap().set(sessionKey, context.getEJB());
}
}

} catch ( Throwable th ) {
Expand Down

0 comments on commit 83a0c29

Please sign in to comment.