feat: Support CRaC and priming of powertools batch#2590
Open
David-DAM wants to merge 1 commit into
Open
Conversation
|
Contributor
Author
|
Hi @phipag I have tested the changes in my own AWS account, let me explain the process to validate that the steps are correct
package com.davinchicoder;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
import software.amazon.lambda.powertools.batch.BatchMessageHandlerBuilder;
import java.util.Map;
public class App implements RequestHandler<Map<String, String>, String> {
static {
System.out.println("Static initializer");
new BatchMessageHandlerBuilder();
}
public App() {
System.out.println("Constructor");
}
@Override
public String handleRequest(Map<String, String> input, Context context) {
context.getLogger().log("Handling request\n");
return "OK";
}
}
After that I suppose is working fine but just to let you know during the tests I got some errors before in the class ClassPreLoader, specifically in this method because it doesn't handle the LinkageError, in my case I was getting the NoClassDefFoundError, maybe because I got misconfigured my dependencies and I had to add some of them but just to let you know private static boolean loadClassIfFound(String className) {
try {
Class.forName(className, true, ClassPreLoader.class.getClassLoader());
return true;
} catch (ClassNotFoundException e) {
// No action is required if the class with given name cannot be found
return false;
}
} |
David-DAM
marked this pull request as ready for review
July 25, 2026 12:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issue number: Closes #1998
Description of changes:
Checklist
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.