From a89b7e86770b3faa3dc7e75a95a8fd54888d12d1 Mon Sep 17 00:00:00 2001 From: Gaurav Gupta Date: Wed, 1 May 2024 00:43:27 +0530 Subject: [PATCH] FISH-8309 Link Parent Descriptor resources after annotation processing --- .../com/sun/enterprise/deployment/BundleDescriptor.java | 4 ++++ .../com/sun/enterprise/deployment/archivist/Archivist.java | 1 + .../ejb/deployment/descriptor/EjbBundleDescriptorImpl.java | 6 ++++++ .../glassfish/ejb/deployment/descriptor/EjbDescriptor.java | 4 +++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/BundleDescriptor.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/BundleDescriptor.java index c62afcd7a89..8d5ca49225c 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/BundleDescriptor.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/BundleDescriptor.java @@ -603,6 +603,10 @@ public void print(StringBuilder toStringBuilder) { */ @Override public abstract ArchiveType getModuleType(); + + public void processBundleDescriptor() { + + } /** * @return the visitor for this bundle descriptor diff --git a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/archivist/Archivist.java b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/archivist/Archivist.java index 00ceebdf2f8..3eaf01bec88 100644 --- a/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/archivist/Archivist.java +++ b/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/archivist/Archivist.java @@ -375,6 +375,7 @@ public void postRuntimeDDsRead(T descriptor, */ protected void postOpen(T descriptor, ReadableArchive archive) throws IOException { + descriptor.processBundleDescriptor(); } /** diff --git a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbBundleDescriptorImpl.java b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbBundleDescriptorImpl.java index a6c43014e30..db43eff53a5 100644 --- a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbBundleDescriptorImpl.java +++ b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbBundleDescriptorImpl.java @@ -355,6 +355,12 @@ public Collection getDescriptorIds() { return ejbIDs; } + public void processBundleDescriptor() { + for (EjbDescriptor ejbDescriptor : ejbs) { + ejbDescriptor.processDescriptor(); + } + } + public void addEjb(EjbDescriptor ejbDescriptor) { ejbDescriptor.setEjbBundleDescriptor(this); ejbs.add(ejbDescriptor); diff --git a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbDescriptor.java b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbDescriptor.java index 5f1c0a48f79..379e92acf02 100644 --- a/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbDescriptor.java +++ b/appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbDescriptor.java @@ -2371,7 +2371,9 @@ public EjbBundleDescriptorImpl getEjbBundleDescriptor() { public void setEjbBundleDescriptor(EjbBundleDescriptorImpl bundleDescriptor) { this.bundleDescriptor = bundleDescriptor; - + } + + public void processDescriptor() { if (this.bundleDescriptor != null) { for (Object ejbRefObj : this.bundleDescriptor.getEjbReferenceDescriptors()) { addEjbReferenceDescriptor((EjbReference) ejbRefObj);