Skip to content

Commit

Permalink
Temporary MyFaces WebSocket fix
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Oct 15, 2024
1 parent 0984b10 commit a40343d
Showing 1 changed file with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.primefaces.util.Constants;
import org.primefaces.util.PropertyDescriptorResolver;

import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
Expand Down Expand Up @@ -156,9 +157,6 @@ void registerForReflection(PrimeFacesRecorder recorder, BuildProducer<Reflective
classNames.addAll(collectImplementors(combinedIndex, org.primefaces.component.export.Exporter.class.getName()));
classNames.addAll(collectImplementors(combinedIndex, org.primefaces.component.export.ExporterOptions.class.getName()));

// TODO: remove in MyFaces 4.0.3
classNames.add("org.apache.myfaces.view.facelets.component.RepeatStatus");

// method reflection
reflectiveClass.produce(
ReflectiveClassBuildItem.builder(classNames.toArray(new String[0])).methods(true)
Expand All @@ -169,6 +167,23 @@ void registerForReflection(PrimeFacesRecorder recorder, BuildProducer<Reflective
ReflectiveClassBuildItem.builder(org.primefaces.config.PrimeEnvironment.class.getName()).build());
}

// TODO: Remove after MyFaces 4.0.3
@BuildStep
void temporaryMyFacesStuff(BuildProducer<AdditionalBeanBuildItem> additionalBean,
BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
additionalBean.produce(AdditionalBeanBuildItem
.unremovableOf(org.apache.myfaces.push.cdi.WebsocketScopeManager.ApplicationScope.class));
additionalBean.produce(
AdditionalBeanBuildItem.unremovableOf(org.apache.myfaces.push.cdi.WebsocketScopeManager.SessionScope.class));
additionalBean.produce(
AdditionalBeanBuildItem.unremovableOf(org.apache.myfaces.push.cdi.WebsocketScopeManager.ViewScope.class));

// TODO: remove in MyFaces 4.0.3
reflectiveClass.produce(ReflectiveClassBuildItem.builder("org.apache.myfaces.view.facelets.component.RepeatStatus")
.methods(true).fields(true).build());

}

@BuildStep
void enforceInitParams(BuildProducer<ServletInitParamBuildItem> initParam) {
// only native uploading is supported no need for Commons FileUpload
Expand Down

0 comments on commit a40343d

Please sign in to comment.