Re: NotSerializableException with @Inject HttpServletRequest

2024-05-15 Thread Jonathan Gallimore
I've managed to implement this. Thanks Jonathan for raising this, and thank you David for the guidance. PRs incoming and I'll file a JIRA ticket. Jon On Fri, Aug 11, 2023 at 12:34 AM Jonathan S. Fisher wrote: > Thanks David! I was actually experimenting with something similar, > extending the S

Re: NotSerializableException with @Inject HttpServletRequest

2023-08-10 Thread Jonathan S. Fisher
Thanks David! I was actually experimenting with something similar, extending the Supplier and Serializable interfaces and trying to pass a function back and forth. I'll give this a shot and send a patch up. In the meantime as a workaround, one can call externalContext.getRequest() and cast to Http

Re: NotSerializableException with @Inject HttpServletRequest

2023-08-10 Thread David Blevins
Here's what I'd probably do: Replace these calls with dedicated classes for each proxy type if (systemInstance.getComponent(HttpServletRequest.class) == null) { systemInstance.setComponent(HttpServletRequest.class, Proxys.threadLocalProxy(HttpServletRequest.class, OpenEJBSec

NotSerializableException with @Inject HttpServletRequest

2023-08-10 Thread Jonathan S. Fisher
Hello TomEE friends, I was looking to patch a bug we encountered and could use some advice from the other committers. Given this CDI Bean: @SessionScoped @Named public class MyPageBean implements Serializable { @Inject private HttpServletRequest req; ... use the bean somewhere in EL } This will