Comments for JVM Advent https://www.javaadvent.com/ The JVM Programming Advent Calendar Wed, 18 Dec 2024 15:07:20 +0000 hourly 1 https://wordpress.org/?v=6.8.5 Comment on WebAssembly for the Java Geek by Wasm 4 the Java Geek 3: Electric Boogaloo - JVM Advent https://www.javaadvent.com/2022/12/webassembly-for-the-java-geek.html#comment-14202 Wed, 18 Dec 2024 15:07:20 +0000 https://www.javaadvent.com/?p=3611#comment-14202 […] first time I was at Red Hat, last year I was at Tetrate, and this year I joined Dylibso. Maybe Dylibso does […]

]]>
Comment on A Return to WebAssembly for the Java Geek by Eine Einführung in WASM nicht nur für Webentwickler - Business -Software- und IT-Blog - Wir gestalten digitale Wertschöpfung https://www.javaadvent.com/2023/12/a-return-to-webassembly-for-the-java-geek.html#comment-13225 Tue, 13 Aug 2024 15:15:10 +0000 https://www.javaadvent.com/?p=4571#comment-13225 […] Insgesamt gibt es zu dem Thema WASM/Java einen sehr empfehlenswerten Artikel der viele Fragen beantwortet: https://www.javaadvent.com/2023/12/a-return-to-webassembly-for-the-java-geek.html […]

]]>
Comment on 5 years in Spring, yet certification taught me this by Andrei https://www.javaadvent.com/2023/12/5-years-in-spring-yet-certification-taught-me-this.html#comment-9948 Tue, 07 May 2024 14:37:39 +0000 https://www.javaadvent.com/?p=4648#comment-9948 Right, and do you know by any chance how this is implemented by Spring? When assuming that Spring creates the following, there should not be any difference whether the call happens from the outside or from the inside of the class.

“`
class MyClass
{
public void methodA() {
this.methodB();
}

@Cacheable(“myCache”)
public String methodB() {
// Perform some heavy computation / database access
return “Result”;
}
}

// Autogenerated
class MyClassCGLIBProxy extends MyClass
{

public String methodB() {
String cached = readFromCache();
if (cached != null)
{
return cached;
}
return base.methodB();
}
}

MyClass myClassObject = container.Create(); // container actually creates MyClassCGLIBProxy here

myClass.methodB(); // overriden in MyClassCGLIBProxy therefore cached
myClass.methodA(); // even if the call to methodB happens within an object itself it should still hit the overriden version, which is MyClassCGLIBProxy.methodB
“`

But I guess Spring manages this somehow differently then?

]]>
Comment on 5 years in Spring, yet certification taught me this by Vlad Dedita https://www.javaadvent.com/2023/12/5-years-in-spring-yet-certification-taught-me-this.html#comment-9945 Tue, 07 May 2024 12:21:20 +0000 https://www.javaadvent.com/?p=4648#comment-9945 In reply to Andrei.

Thank you for your great question.

When a method in Spring is decorated with annotations like @Cacheable or any other that influences behavior, Spring creates a proxy to handle these interactions. This proxy acts as an intermediary, enhancing the functionality of the original method when it is called from outside the class. However, when methods within the same class call each other directly (i.e., using this.method()), they bypass the proxy and invoke the original methods directly. Therefore, the enhanced functionality provided by the proxy, such as caching or transaction management, only applies when the method is accessed externally, not from internal calls within the class itself.

To sum up, the key here is that the proxied (“overriden”) methods will only on interaction from the “outside world”, while original code (from inside world) will not interact with the proxied version of the class.

]]>
Comment on 5 years in Spring, yet certification taught me this by Andrei https://www.javaadvent.com/2023/12/5-years-in-spring-yet-certification-taught-me-this.html#comment-9902 Mon, 06 May 2024 09:11:49 +0000 https://www.javaadvent.com/?p=4648#comment-9902 Hi, thanks for the article. I am entering Java with a 10 years .net experience, and I figured I’d learn IOC first.
After reading the official documentation, I am looking up for some more clarifications on certain topics.
One thing I wanted to check after reading the article. Regarding PROXYING IN CIRCLES and Cacheable annotation. I thought in this case GCLIB proxy is created, and when you call `this.methodB()` from within `methodA()`, and it will hit the overridden version. If it is not the case, does it mean that the container creates 2 objects? If so, there is a big chance to face much more “funny” scenarios..

]]>
Comment on Groovy and Data Science by sanakhan7 https://www.javaadvent.com/2022/12/groovy-and-data-science.html#comment-9318 Tue, 23 Apr 2024 08:57:07 +0000 https://www.javaadvent.com/?p=3759#comment-9318 The audience has been exposed to a range of data science tasks successfully tackled using Groovy alongside various JVM libraries and platforms. They are encouraged to recognize the advantages of incorporating Groovy into their data science endeavors, citing its user-friendly Java-like syntax, dynamic or static typing flexibility, and metaprogramming capabilities which streamline code complexity. The alignment with Java is highlighted as a valuable asset, facilitating an easier learning curve and leveraging the existing infrastructure of the JVM. Furthermore, the versatility of Groovy is emphasized, enabling the creation of simple solutions for straightforward tasks while also offering scalability options through diverse JVM technologies to tackle complex data science challenges with confidence.

Thank you.

]]>
Comment on A zero dependency Wasm runtime for the JVM by Samuel https://www.javaadvent.com/2023/12/chicory-wasm-jvm.html#comment-8986 Mon, 25 Dec 2023 21:59:35 +0000 https://www.javaadvent.com/?p=5014#comment-8986 Impressive. Love the idea of executing functions written in most any language from other languages like Java

]]>
Comment on WebAssembly for the Java Geek by A Zero-Dependency WebAssembly Runtime for the JVM | News Lexa https://www.javaadvent.com/2022/12/webassembly-for-the-java-geek.html#comment-8984 Mon, 25 Dec 2023 09:55:10 +0000 https://www.javaadvent.com/?p=3611#comment-8984 […] https://www.javaadvent.com/2022/12/webassembly-for-the-java-geek.html […]

]]>
Comment on WebAssembly for the Java Geek by A zero dependency Wasm runtime for the JVM - JVM Advent https://www.javaadvent.com/2022/12/webassembly-for-the-java-geek.html#comment-8983 Mon, 25 Dec 2023 01:01:51 +0000 https://www.javaadvent.com/?p=3611#comment-8983 […] https://www.javaadvent.com/2022/12/webassembly-for-the-java-geek.html […]

]]>
Comment on A Return to WebAssembly for the Java Geek by A Return to WebAssembly for the Java Geek - JiayunJiayun https://www.javaadvent.com/2023/12/a-return-to-webassembly-for-the-java-geek.html#comment-8945 Tue, 05 Dec 2023 12:46:25 +0000 https://www.javaadvent.com/?p=4571#comment-8945 […] https://www.javaadvent.com/2023/12/a-return-to-webassembly-for-the-java-geek.html […]

]]>
Comment on WebAssembly for the Java Geek by A Return to WebAssembly for the Java Geek - JVM Advent https://www.javaadvent.com/2022/12/webassembly-for-the-java-geek.html#comment-8943 Tue, 05 Dec 2023 01:01:28 +0000 https://www.javaadvent.com/?p=3611#comment-8943 […] Last year we compared WebAssembly and discussed in what ways it differs from the JVM. A lot of things have happened in the meantime. If you want to dive deeper into that kind of detail, I warmly suggest reading this beautiful blog series by Chris Dickinson.  […]

]]>
Comment on How to debug dependency conflicts in Maven and Gradle by Errors In Pom.xml With Dependencies (Missing Artifact...) - Programming Questions And Solutions Blog https://www.javaadvent.com/2020/12/how-to-debug-dependency-conflicts-in-maven-and-gradle.html#comment-8289 Thu, 02 Mar 2023 05:04:55 +0000 https://www.javaadvent.com/?p=2368#comment-8289 […] I also found this article helpful.How to Debug Dependency Conflicts in Maven and Gradle […]

]]>
Comment on Using Postgres as a Message Queue by Johannes https://www.javaadvent.com/2022/12/using-postgres-as-a-message-queue.html#comment-8274 Thu, 02 Feb 2023 19:27:46 +0000 https://www.javaadvent.com/?p=3753#comment-8274 In reply to Rafael Winterhalter.

Afaik this what e.g. a redis pub sub would behave like – so I guess not that unusual.

]]>
Comment on Using Postgres as a Message Queue by Rafael Winterhalter https://www.javaadvent.com/2022/12/using-postgres-as-a-message-queue.html#comment-8273 Thu, 02 Feb 2023 17:46:09 +0000 https://www.javaadvent.com/?p=3753#comment-8273 In reply to Johannes.

Yes and no. You cannot block the notification until there’s a listener. It be more like UDP.

]]>
Comment on Using Postgres as a Message Queue by Johannes https://www.javaadvent.com/2022/12/using-postgres-as-a-message-queue.html#comment-8272 Thu, 02 Feb 2023 15:19:24 +0000 https://www.javaadvent.com/?p=3753#comment-8272 So to turn this into a pub/sub we can just use the notify/listen without persisting the message into a table, right?

]]>
Comment on Using Postgres as a Message Queue by This Week in Spring - Jan 3rd, 2023 https://www.javaadvent.com/2022/12/using-postgres-as-a-message-queue.html#comment-8255 Sun, 15 Jan 2023 21:16:03 +0000 https://www.javaadvent.com/?p=3753#comment-8255 […] I love this post by Rafael Winterhalter (create of ByteBuddy and Bootiful Podcast guest on the amazing publish/subscribe capabilities of PostgreSQL. I love PostgreSQL. But then he goes even further, turning the mechanism into support in Spring Integration. He explains everything in this epic post, Using Postgres as a Message Queue […]

]]>
Comment on Using Postgres as a Message Queue by Rafael Winterhalter https://www.javaadvent.com/2022/12/using-postgres-as-a-message-queue.html#comment-8187 Tue, 27 Dec 2022 14:20:42 +0000 https://www.javaadvent.com/?p=3753#comment-8187 In reply to Javarer.

Fully possible, but it takes out some of the simplicity of just using Postgres.

Most effective is to adjust the Postgres setting for allowed connections. But most of the time, that’s not necessary either.

]]>
Comment on Using Postgres as a Message Queue by Javarer https://www.javaadvent.com/2022/12/using-postgres-as-a-message-queue.html#comment-8186 Tue, 27 Dec 2022 14:05:21 +0000 https://www.javaadvent.com/?p=3753#comment-8186 What if you only used one dedicated direct connection to PostgreSQL and dispatch the events to JVM level observers?

Would that work?

]]>
Comment on WebAssembly for the Java Geek by Thomas Darimont https://www.javaadvent.com/2022/12/webassembly-for-the-java-geek.html#comment-8177 Sat, 24 Dec 2022 05:52:03 +0000 https://www.javaadvent.com/?p=3611#comment-8177 Great article!
There is another option for running Webassembly workloads in the JVM.

The extism plugin frame work https://extism.org/ recently added a Java sdk that can be used to call functions in wasn’t binaries from JVM-based applications:
https://extism.org/docs/integrate-into-your-codebase/java-host-sdk

This could be added to the list “running Webassembly in the JVM”

Cheers,
Thomas

]]>
Comment on WebAssembly for the Java Geek by sandoradam https://www.javaadvent.com/2022/12/webassembly-for-the-java-geek.html#comment-8171 Fri, 23 Dec 2022 09:44:03 +0000 https://www.javaadvent.com/?p=3611#comment-8171 Big thanks for this! As a Java geek I learned more about wasm from this article then the previous 10 read.

]]>
Comment on Hidden Treasures of Eclipse Collections by HIDDEN TREASURES OF ECLIPSE COLLECTIONS 2022 EDITION - JVM Advent https://www.javaadvent.com/2018/12/hidden-treasures-of-eclipse-collections.html#comment-7728 Sat, 03 Dec 2022 01:01:23 +0000 https://www.javaadvent.com/?p=1597#comment-7728 […] known features of the framework. I have published similar blogs in Java Advent Calendars of 2018, 2019, 2020, and 2021. Please refer to the resources at the end of the blog for more information […]

]]>
Comment on A tale of two cities: how blocking calls are treated? by A tale of two cities: how blocking calls are treated? - My Blog https://www.javaadvent.com/2022/12/a-tale-of-two-cities-how-blocking-calls-are-treated.html#comment-7727 Fri, 02 Dec 2022 10:34:27 +0000 https://www.javaadvent.com/?p=4062#comment-7727 […] Read More […]

]]>
Comment on Project Loom and Structured Concurrency by Project Loom – Igfasouza.com https://www.javaadvent.com/2020/12/project-loom-and-structured-concurrency.html#comment-3065 Tue, 01 Mar 2022 15:15:51 +0000 https://www.javaadvent.com/?p=2438#comment-3065 […] https://www.javaadvent.com/2020/12/project-loom-and-structured-concurrency.html […]

]]>
Comment on Reflections on Log4Shell by LCC 272 – Interview sur Log4Shell avec this – Veille Technologique https://www.javaadvent.com/2021/12/reflections-on-log4shell.html#comment-1125 Sat, 12 Feb 2022 18:00:26 +0000 https://www.javaadvent.com/?p=3489#comment-1125 […] Reflection on log4shell par diabolical developer […]

]]>