Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Commit a5dc423

Browse files
saxenaksyaminikb
authored andcommitted
Fixes 22122: Updated AppClientScanner to scan annotations even for POJOs (#22127)
* Updated AppClientScanner to scan annotations even in case when there are no ManagedBean * Modifying the devtest to not bundle ejb classes in appclient jar file. This is required as ejb classes contains annotations and they are processed at the time of deployment which results in deployment failure
1 parent 2e4bc8d commit a5dc423

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/annotation/impl/AppClientScanner.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
@Service(name="car")
7474
@PerLookup
7575
public class AppClientScanner extends ModuleScanner<ApplicationClientDescriptor> {
76-
private static final Class[] managedBeanAnnotations = new Class[] {javax.annotation.ManagedBean.class};
7776

7877
@Override
7978
public void process(ReadableArchive archive, ApplicationClientDescriptor bundleDesc, ClassLoader classLoader, Parser parser) throws IOException {
@@ -120,10 +119,6 @@ private void doProcess(ReadableArchive archive, ApplicationClientDescriptor desc
120119
addScanClassName(desc.getCallbackHandler());
121120
}
122121

123-
GenericAnnotationDetector detector =
124-
new GenericAnnotationDetector(managedBeanAnnotations);
125-
126-
if (detector.hasAnnotationInArchive(archive)) {
127122
if (archive instanceof FileArchive) {
128123
addScanDirectory(new File(archive.getURI()));
129124
} else if (archive instanceof InputJarArchive) {
@@ -143,7 +138,6 @@ private void doProcess(ReadableArchive archive, ApplicationClientDescriptor desc
143138
*/
144139
addScanURI(scanURI(((MultiReadableArchive) archive).getURI(1)));
145140
}
146-
}
147141

148142
this.classLoader = classLoader;
149143
this.archiveFile = null; // = archive;

appserver/tests/appserv-tests/devtests/jms/annotation/MDB1/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<target name="build" depends="compile">
7272
<antcall target="build-ear-common">
7373
<param name="ejbjar.classes" value="**/MySessionBean*.class, **/*MessageBean.class" />
74-
<param name="appclientjar.classes" value="**/*Client.class,**/MySessionBean*.class" />
74+
<param name="appclientjar.classes" value="**/*Client.class,**/MySessionBeanRemote.class" />
7575
</antcall>
7676
</target>
7777

appserver/tests/appserv-tests/devtests/jms/annotation/MDB1/ejb/MySessionBeanRemote.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
@Remote
4646
public interface MySessionBeanRemote {
47-
public static final String RemoteJNDIName = MySessionBean.class.getSimpleName() + "/remote";
47+
public static final String RemoteJNDIName = "MySessionBean/remote";
4848

4949
public void sendMessage(String text);
5050

0 commit comments

Comments
 (0)