{"id":129706,"date":"2024-12-31T10:15:59","date_gmt":"2024-12-31T08:15:59","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=129706"},"modified":"2024-12-23T13:15:15","modified_gmt":"2024-12-23T11:15:15","slug":"handle-the-blocking-method-in-non-blocking-context-warning","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html","title":{"rendered":"Handle the Blocking Method in Non-blocking Context Warning"},"content":{"rendered":"<p>With the rise of reactive programming, frameworks like Spring WebFlux provide non-blocking and asynchronous solutions for handling web requests. However, using blocking methods (such as database queries or file I\/O operations) in a non-blocking context can lead to performance bottlenecks. Let us delve into understanding how handle the blocking method in a non-blocking context warning in Java.<\/p>\n<h2><a name=\"section-1\"><\/a>1. Blocking Method in Non-Blocking Context in Spring Reactive<\/h2>\n<p><a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/reference\/html\/web-reactive.html\" target=\"_blank\" rel=\"noopener\">Spring WebFlux<\/a> is built around the <a href=\"https:\/\/projectreactor.io\/\" target=\"_blank\" rel=\"noopener\">Reactor Library<\/a>, enabling asynchronous processing. Blocking methods disrupt the non-blocking nature, causing thread starvation in reactive pipelines. The key to handling this issue is offloading blocking calls to a dedicated thread pool. This approach ensures that blocking operations do not occupy the limited threads of the reactive event loop, which are crucial for maintaining the scalability and responsiveness of the application. By properly managing blocking calls, developers can achieve a seamless integration of synchronous and asynchronous workflows, enhancing the overall performance and reliability of their systems.<\/p>\n<h2><a name=\"section-2\"><\/a>2. Code Example<\/h2>\n<p>Consider the following example where a blocking database call is used in a reactive pipeline:<\/p>\n<pre class=\"brush:java; wrap-lines:false;\">package com.jcg.example;\n\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.RestController;\nimport reactor.core.publisher.Mono;\n\n@RestController\npublic class BlockingController {\n\n    @GetMapping(\"\/blocking\")\n    public Mono&lt;String&gt; handleBlockingCall() {\n        return Mono.fromSupplier(this::blockingDatabaseCall)\n                   .doOnNext(data -&gt; System.out.println(\"Fetched: \" + data));\n    }\n\n    private String blockingDatabaseCall() {\n        try {\n            Thread.sleep(2000); \/\/ Simulate blocking I\/O\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n        }\n        return \"Blocking data\";\n    }\n}\n<\/pre>\n<h3>2.1 Code Explanation<\/h3>\n<p>The provided code defines a Spring WebFlux controller named <code>BlockingController<\/code>. It includes an endpoint <code>\/blocking<\/code> that demonstrates a blocking operation in a reactive context.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>The <code>@RestController<\/code> annotation marks this class as a RESTful web controller. The <code>@GetMapping(\"\/blocking\")<\/code> annotation maps HTTP GET requests to the <code>handleBlockingCall<\/code> method.<\/p>\n<p>The method <code>handleBlockingCall<\/code> returns a <code>Mono&lt;String&gt;<\/code>, which is a reactive type representing a single value. Inside the method, a blocking operation is wrapped using <code>Mono.fromSupplier<\/code>, which defers the execution of the blocking method <code>blockingDatabaseCall<\/code> until subscribed. Additionally, <code>doOnNext<\/code> is used to log the fetched data for debugging purposes.<\/p>\n<p>The <code>blockingDatabaseCall<\/code> method simulates a blocking I\/O operation by introducing a delay of 2 seconds using <code>Thread.sleep<\/code>. If an <code>InterruptedException<\/code> occurs during sleep, the thread\u2019s interrupted status is restored. After the delay, it returns a string value, &#8220;Blocking data.&#8221;<\/p>\n<p>This implementation introduces a performance issue because the blocking call (<code>Thread.sleep<\/code>) is executed on the same thread used by the reactive pipeline. This can lead to thread starvation in high-concurrency scenarios, making the application less scalable.<\/p>\n<h3>2.2 Code Output<\/h3>\n<p>When hitting the <code>\/blocking<\/code> endpoint, you will see delays due to the blocking nature:<\/p>\n<pre class=\"brush:plain; wrap-lines:false;\">Blocking data (after ~2 seconds)<\/pre>\n<p>This blocks the Netty thread, reducing scalability.<\/p>\n<h2><a name=\"section-3\"><\/a>3. Fixing the Issue: Using Schedulers<\/h2>\n<p>To handle blocking calls effectively, offload them to a dedicated thread pool using <code>Schedulers.boundedElastic()<\/code>:<\/p>\n<pre class=\"brush:java; wrap-lines:false;\">package com.jcg.example;\n\nimport reactor.core.scheduler.Schedulers;\n\n@GetMapping(\"\/non-blocking\")\npublic Mono&lt;String&gt; handleNonBlockingCall() {\n    return Mono.fromSupplier(this::blockingDatabaseCall)\n               .subscribeOn(Schedulers.boundedElastic())\n               .doOnNext(data -&gt; System.out.println(\"Fetched: \" + data));\n}\n<\/pre>\n<h3>3.1 Code Explanation<\/h3>\n<p>The provided code defines a method <code>handleNonBlockingCall<\/code> within a Spring WebFlux controller to handle potentially blocking operations in a non-blocking and efficient manner. This method is mapped to the <code>\/non-blocking<\/code> endpoint using the <code>@GetMapping<\/code> annotation, which processes HTTP GET requests.<\/p>\n<p>The method returns a <code>Mono&lt;String&gt;<\/code>, a reactive type that emits a single value. The blocking operation, represented by the <code>blockingDatabaseCall<\/code> method, is wrapped using <code>Mono.fromSupplier<\/code>. This ensures that the execution of the blocking method is deferred until it is subscribed to within the reactive pipeline.<\/p>\n<p>To address the blocking nature of the <code>blockingDatabaseCall<\/code>, the code uses <code>subscribeOn(Schedulers.boundedElastic())<\/code>. This instructs the framework to execute the blocking operation on a bounded elastic thread pool, which is specifically designed for tasks that involve blocking I\/O or long-running operations. This approach prevents the blocking call from impacting the main reactive thread pool, ensuring better scalability and responsiveness.<\/p>\n<p>Additionally, <code>doOnNext<\/code> is used to log the emitted data. When the blocking operation completes, it prints the fetched data to the console, providing a side-effect useful for debugging or monitoring.<\/p>\n<p>This implementation ensures that the application&#8217;s reactive nature is preserved while handling blocking operations efficiently, making it suitable for high-concurrency scenarios without risking thread starvation.<\/p>\n<h3>3.2 Code Output<\/h3>\n<p>When hitting the <code>\/non-blocking<\/code> endpoint, the main thread remains free for other tasks:<\/p>\n<pre class=\"brush:plain; wrap-lines:false;\">Fetched: Blocking data<\/pre>\n<h2><a name=\"section-4\"><\/a>4. Conclusion<\/h2>\n<p>Handling blocking methods in a non-blocking context is crucial for achieving high scalability in reactive applications. By offloading blocking operations to dedicated thread pools, you can maintain the asynchronous nature of the pipeline and avoid performance bottlenecks. Remember to identify potential blocking calls in your application and use techniques like <code>Schedulers.boundedElastic()<\/code> for seamless integration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the rise of reactive programming, frameworks like Spring WebFlux provide non-blocking and asynchronous solutions for handling web requests. However, using blocking methods (such as database queries or file I\/O operations) in a non-blocking context can lead to performance bottlenecks. Let us delve into understanding how handle the blocking method in a non-blocking context warning &hellip;<\/p>\n","protected":false},"author":26931,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[1358,1715],"class_list":["post-129706","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring-reactive","tag-spring-webflux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Handle the Blocking Method in Non-blocking Context Warning - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Java handle blocking method in non blocking context warning: Learn how to handle blocking methods in Java&#039;s non-blocking context.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Handle the Blocking Method in Non-blocking Context Warning - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Java handle blocking method in non blocking context warning: Learn how to handle blocking methods in Java&#039;s non-blocking context.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-31T08:15:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Yatin Batra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yatin Batra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html\"},\"author\":{\"name\":\"Yatin Batra\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/cda31a4c1965373fed40c8907dc09b8d\"},\"headline\":\"Handle the Blocking Method in Non-blocking Context Warning\",\"datePublished\":\"2024-12-31T08:15:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html\"},\"wordCount\":642,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Spring Reactive\",\"Spring WebFlux\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html\",\"name\":\"Handle the Blocking Method in Non-blocking Context Warning - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2024-12-31T08:15:59+00:00\",\"description\":\"Java handle blocking method in non blocking context warning: Learn how to handle blocking methods in Java's non-blocking context.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/handle-the-blocking-method-in-non-blocking-context-warning.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Handle the Blocking Method in Non-blocking Context Warning\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/cda31a4c1965373fed40c8907dc09b8d\",\"name\":\"Yatin Batra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Yatin.batra_.jpg\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Yatin.batra_.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Yatin.batra_.jpg\",\"caption\":\"Yatin Batra\"},\"description\":\"An experience full-stack engineer well versed with Core Java, Spring\\\/Springboot, MVC, Security, AOP, Frontend (Angular &amp; React), and cloud technologies (such as AWS, GCP, Jenkins, Docker, K8).\",\"sameAs\":[\"https:\\\/\\\/www.javacodegeeks.com\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/yatin-batra\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Handle the Blocking Method in Non-blocking Context Warning - Java Code Geeks","description":"Java handle blocking method in non blocking context warning: Learn how to handle blocking methods in Java's non-blocking context.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html","og_locale":"en_US","og_type":"article","og_title":"Handle the Blocking Method in Non-blocking Context Warning - Java Code Geeks","og_description":"Java handle blocking method in non blocking context warning: Learn how to handle blocking methods in Java's non-blocking context.","og_url":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2024-12-31T08:15:59+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Yatin Batra","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Yatin Batra","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html"},"author":{"name":"Yatin Batra","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/cda31a4c1965373fed40c8907dc09b8d"},"headline":"Handle the Blocking Method in Non-blocking Context Warning","datePublished":"2024-12-31T08:15:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html"},"wordCount":642,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Spring Reactive","Spring WebFlux"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html","url":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html","name":"Handle the Blocking Method in Non-blocking Context Warning - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2024-12-31T08:15:59+00:00","description":"Java handle blocking method in non blocking context warning: Learn how to handle blocking methods in Java's non-blocking context.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/handle-the-blocking-method-in-non-blocking-context-warning.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Handle the Blocking Method in Non-blocking Context Warning"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/cda31a4c1965373fed40c8907dc09b8d","name":"Yatin Batra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/12\/Yatin.batra_.jpg","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/12\/Yatin.batra_.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/12\/Yatin.batra_.jpg","caption":"Yatin Batra"},"description":"An experience full-stack engineer well versed with Core Java, Spring\/Springboot, MVC, Security, AOP, Frontend (Angular &amp; React), and cloud technologies (such as AWS, GCP, Jenkins, Docker, K8).","sameAs":["https:\/\/www.javacodegeeks.com"],"url":"https:\/\/www.javacodegeeks.com\/author\/yatin-batra"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/129706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/26931"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=129706"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/129706\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=129706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=129706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=129706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}