Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
109 views

I've just upgraded to Micronaut 4 and Java 21 and I'm trying to share state between a HttpServerFilter and a Controller using a @RequestScope bean. My goal is to set some summary information (like a ...
ionesi cristi's user avatar
1 vote
0 answers
107 views

I'm trying to understand a little more about the affect of having request-scoped classes in the pipeline of a Nest application. I have had the need to introduce 'local storage' to the REST API I am ...
user1728296's user avatar
0 votes
1 answer
153 views

I have an existing endpoint calling some function, and it works fine when doing a rest call to the endpoint. Then I want to create a scheduler that will call that function regularly. The scheduler ...
Janez Radešček's user avatar
1 vote
1 answer
4k views

I've got a Quarkus application. The entry point to trigger this application is a class which implements AWS RequestHandler. Before it runs I would like to set the context depending on the given ...
bob's user avatar
  • 280
0 votes
0 answers
360 views

Recently I've run into an issue regarding request-scoped beans. Here's the code: @Configuration class PreAuthorizationHttpHeaderFilterConfig { @Bean JwtPreAuthorizationConfigurer ...
Sergey Tsypanov's user avatar
0 votes
1 answer
2k views

I have a multitenant Quarkus application. For each process, I need to store context information about the tenant that owns the process. This information is necessary for the HibernateTenantResolver ...
Herr Derb's user avatar
  • 5,567
1 vote
0 answers
285 views

I'm facing issue where, sometimes, async thread is NOT copying Request Scope properties through : @Override public <T> Future<T> submit(Callable<T> task) { return super....
MANVENDRA LODHI's user avatar
0 votes
1 answer
3k views

I'm relatively new to nestJS and ran into a circular dependency with REQUEST Scoped services that got me reading about ModuleRef in nestJS. I was looking at the documentation where it mentions that ...
Zephyr's user avatar
  • 2,661
2 votes
1 answer
8k views

I did some experimentation with Quarkus and I am having difficulties understanding how @RequestScoped works. Coming from Spring, I would be expecting that the following code should not work and throw ...
Dave's user avatar
  • 461
1 vote
0 answers
234 views

Not able to use request scoped bean in a reactor code. Facing the below exception org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.eventProcessor': ...
Kratos_001's user avatar
0 votes
0 answers
387 views

I was facing an issue while converting a bean with request scope to JSON using object mapper. It thows an exception like below. Not sure what am missing. I couldn't find any relatable resource on the ...
Venkat's user avatar
  • 149
11 votes
2 answers
6k views

It is working as far as I tested. But I do not get it why and how it works.(Also I am not sure it is safe to use in production) Here is my testCode @Service public class SomeService { private ...
Juneyoung Oh's user avatar
  • 7,734
3 votes
1 answer
3k views

In my Spring Boot application, i've a Scheduler task which executes for every one hour. In the scheduler method trying to access the request-scope bean. Always getting the exception org....
Naraparaju Mruduladevi's user avatar
1 vote
1 answer
3k views

I am using spring boot for creating microservices. I need to implement request scope beans as I get some information in header and need this to be available across all the classes for that particular ...
Lolly's user avatar
  • 37k
3 votes
1 answer
428 views

I'm trying to create a localized JSF web application which allows user to select a language via dropdown. When language is selected, I simulate a redirect to the same page but with URL parameter: ...
peterremec's user avatar
0 votes
1 answer
66 views

I have many children of class object inside a big class object. I have set value for those child object and I want them to be printed in my jsp page through request scope. How do I implement this in ...
user avatar
1 vote
2 answers
4k views

I have a class the following class as RequestScope bean: @RequestScope class RequestContext { private String requestId; private String traceId; private String authorisedId; private String ...
Sreerag's user avatar
  • 1,411
2 votes
1 answer
6k views

Is there a pattern to use @RequestScope with Webflux? We used the approach suggested here (https://www.baeldung.com/spring-bean-scopes) but it gives below error. No scope registered for scope name ...
user12842828's user avatar
0 votes
1 answer
1k views

I would need to send the response which also consists of request information as well. Tried with the following code but getting below exception: @Component @Scope(value = "request", proxyMode = ...
kpmDev's user avatar
  • 1,370
0 votes
1 answer
2k views

I have a usecase in a spring boot application, where in we get a request, we send an acknowledgement back and then start a new executor task in background which will do some processing and send back ...
aky's user avatar
  • 3
0 votes
0 answers
1k views

Im working with Spring Boot 2.2.4. I have the following class, where Client is a request scoped bean: @AllArgsConstructor @Component public class CacheLoader { private Client client; @Async ...
MaverinCode's user avatar
3 votes
1 answer
1k views

I have a custom Spring Boot AutoConfiguration class in which I’m creating a @RequestScoped bean of a custom class - Foo. In the same AutoConfiguration class, I’m creating a bean of my global exception ...
cannot_mutably_borrow's user avatar
0 votes
1 answer
418 views

I have seen similar threads but mine is different in that I am using a custom grant type. To give you a background, when we call a micro-service from another one, we use a delegation token that has ...
xbmono's user avatar
  • 2,326
1 vote
1 answer
2k views

Lets say we have a class @RequestScope public abstract class A { int a; } and another class which extends the above class @Service public class B extends A { public int getA () { return a;...
swayamraina's user avatar
  • 3,206
1 vote
0 answers
759 views

I have an Spring Rest application, in which there's a requirement to get some access token in a service(Annotated with @Service) class. The token generation is in a separate class(Annotated with @...
Rajesh2389's user avatar
0 votes
1 answer
2k views

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.movimentacaoEntradaRadarNotaBuilderImpl': Scope 'request' is not active for the current ...
Airton cruz's user avatar
1 vote
0 answers
33 views

I want to use AWS SDK for .Net to read and write to an S3 bucket, from a web application. What should be the scope of AmazonS3Client client? Looking at ASW sample code they are using a static ...
Hooman Bahreini's user avatar
0 votes
0 answers
62 views

For what reason won't an injected secondary bean using the same scope contain the form data from the submit? Using an explicit method call with parameter from a (JSF) commandButton action.. I've ...
Cygone's user avatar
  • 1
1 vote
1 answer
203 views

In a WebApi application, I am using Ninject to inject a factory that allows consuming classes to create a DbContext that is scoped according to their requirements. I want to be able to write a unit ...
Paul Taylor's user avatar
  • 5,761
0 votes
1 answer
3k views

I have a bean that has a request scope and in it there is a method that is annotated with micrometer(io.micrometer.core.annotation) @Timed but it is not showing in the metrics. It shows if the bean ...
dawit's user avatar
  • 205
8 votes
2 answers
6k views

I'm using a Java8/Spring Boot 2 application. I want to inject a request-scoped bean into a singleton bean. The official documentation highlights that either a proxy or ObjectFactory/Provider should be ...
user1884155's user avatar
  • 3,776
2 votes
1 answer
658 views

I have a Request scoped(prototype) bean as a Response for a Rest Controller and getting Exception , not working I tried spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false on the property file as ...
SandOfTime's user avatar
4 votes
1 answer
1k views

Request scope enables us to track request wise variables throughout the request processing. But I think it depends on thread local variables. I assume using Kotlin coroutines will that break the Guice ...
Dragonborn's user avatar
  • 1,815
0 votes
0 answers
26 views

I have one Singleton class in my Primefaces Webapp, where I want to query one parameter from my database (for the logged in user). This parameter access function is in other class and this isn't ...
VORiAND's user avatar
  • 175
2 votes
0 answers
726 views

I have created a REST service with Apache Camel (REST DSL) running on Karaf container that accepts a list of items and returns the availabilities of those them. The problem is that if the service is ...
Themis Pyrgiotis's user avatar
0 votes
0 answers
5k views

In Spring it's easy to autowire beans and have them available anywhere in the app context. Beans can be specialized to a scope such as session/request/web socket etc. I have a rather unique scenario. ...
GSUgambit's user avatar
  • 4,989
-1 votes
1 answer
1k views

Spring boot How can i easy use bean with Request Scope in async method. When i try execute got exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bean ...
adfFun's user avatar
  • 1
0 votes
1 answer
3k views

I am trying to get the text produced as a result of an external script in html with Python: <td class="headerlast item" rowspan="2" colspan="1" id="Party_ATP021_1"> <div id="Party_ATP021mod"&...
MCS's user avatar
  • 1,101
3 votes
1 answer
2k views

I am trying to integrate Simple Injector (4.0.12) in my .NET (4.6.1) Web API Project, but cannot find a way to register all Web API Controllers with the correct AsyncScopedLifestyle. When I try ...
Alwin S's user avatar
  • 186
2 votes
1 answer
448 views

I want to put a variable in the requestScope so I can use it in an other page. Unfortunately, the requestScope is totally empty in this other page. In fact, when I print #{requestScope} in both pages, ...
Flyout91's user avatar
  • 867
3 votes
1 answer
317 views

Obviously, it's easy to have multiple parallel requests accessing the same @SessionScoped bean in a web app context. Am I correct in believing that I have to explicitly control synchronization when ...
user1050755's user avatar
  • 11.8k
1 vote
0 answers
136 views

I've decided to use a request scoped container managed EntityManager and I've created a producer for that reason: @RequestScoped public class EntityManagerProducer { @PersistenceContext(unitName =...
Daniel Rusev's user avatar
  • 1,331
1 vote
1 answer
380 views

I have a use case where I have 6 steps being performed in one request. The business is requesting that we capture metrics on what the result of each step was in the process. They want us to log to a ...
Scoota P's user avatar
  • 2,551
1 vote
1 answer
4k views

I want to inject my request scoped bean to my other bean. @Component @Scope(value = WebApplicationContext.SCOPE_REQUEST) public class UiCtx { @Autowired(required = true) private ...
Damian's user avatar
  • 3,050
4 votes
1 answer
2k views

For background, I'm processing RPC requests in a Thrift service (though my question isn't Thrift-specific). What I want seems like it should be simple, but I can find no examples: how do I reuse com....
Paul N's user avatar
  • 41
5 votes
1 answer
2k views

Is there a possibility to use thread static like variables within a single request? The current code uses a thread static variable for logging purposes and now we want to use async controller methods (...
Nico's user avatar
  • 181
1 vote
1 answer
754 views

I have an object pool of resources: public interface PooledResource { ... } @Component public class ResourcePool { public PooledResource take() { ... } public ...
Dave Jeod's user avatar
1 vote
1 answer
329 views

I know in a web application, for every request it gets, spring creates a new instance of the bean in ints container. I want to know how does spring differentiate between the requests and create new ...
Tushar Banne's user avatar
  • 1,765
-1 votes
1 answer
359 views

I'm migrating a legacy PHP project (pre-OO) to Symfony2. On every request I have to: compute some dynamic data (depending on the current date and/or some request parameter) use that data (multiple ...
thofou76's user avatar
0 votes
0 answers
61 views

I have an application with a logout button. After I doubleclick the button, I get a ViewExpiredException: An unexpected exception was caught during processing the request: javax.faces.application....
sinned's user avatar
  • 503