Java News/Tech/Discussion/etc. No programming help, no learning Java

0 readers
0 users here now

News, Technical discussions, research papers and assorted things of interest related to the Java programming language NO programming help, NO...

founded 1 year ago
MODERATORS
26
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/curious_scourge on 2023-10-25 17:02:35.


I joined a greenfields Java/C# company 10 years ago as the Java guy, and based our ESB architecture on Maven/Fuse/Karaf/Camel/AMQ inside dockers, behind a load balancer, snapshotted nightly in VMWare (On-prem data centre beats cloud based, by millions of dollars, for us, so not interested in AWS/GCP/Azure/etc.). Kubernetes never really worked out, because of obscure VM issues.

It works great, meets SLA, and I am very if-it-ain't-broke-don't-fix-it, especially since they've never hired another Java guy, to make trouble for me. Only issue these days is Java heap space runs out, like once a year, and the load balancer fails over, so it's not a major problem. We're up to 27 services, not quite micro either. Big requests will take a second or two.

So I'm a bit curious, after seeing some post about the latest Java micro service frameworks, what people are using (open source) in my situation. I seem to be in a pretty small minority of Java people who use my particular stack. Maybe I should start thinking about moving on from Java 8, one of these years.

27
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/nomemory on 2023-10-26 19:36:06.

28
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/krzyk on 2023-10-26 20:54:47.

29
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/repeating_bears on 2023-10-26 19:18:44.


I've been using Java 15's text blocks recently. Why was there the requirement for an initial newline after the """?

I understand that the main use-case is for strings that span multiple lines, but it's also useful for single-line strings that make heavy use of double quotes, e.g. JSON, removing the need to escape them.

What would have been the problem with allowing this?

String json = """{"foo":"bar","bar":123}""";

Right now, I have to write

String json = """
    {"foo":"bar","bar":123}""";

It's not a problem, just waste of space. Is there some compatibility issue I'm missing or what? Unless I missed it, the JEP provides no justification. I searched the mailing list but couldn't find anything.

I know this is trivial but I'm curious anyway.

30
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/yk313 on 2023-10-26 10:55:57.

31
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/INTER on 2023-10-24 11:42:15.

32
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/cryptos6 on 2023-10-25 10:10:45.


Spring Boot is seemingly the default option for most business applications. It is mature, offers a lot features and working with it can be quite productive, once your mastered it. However, there is also some historical cruft in this framework and I see younger developers struggle with it and preferring JavaScript stuff like Nest.js or Go.

I even think that all the annotations typical for JEE and Spring are there mostly for historical reasons, because Java before 8 was very cumbersome to write. Today you could write transaction handling using lambda expressions like this:

public void cancelOrder(OrderId id) {
  transaction.execute(() -> {
    var order = repository.findById(id);
    order.cancel();
  });
}

Before lambda expression such an approach required implementing an ugly (anonymous) class with a certain interface. Therefore @Transactional and friends made it much more practical and readable. But there are downsides: magic everywhere and less help provided by the compiler or IDE (although IDEs implemented much functionality related to annotation magic). There is a reason, why Spring is sometimes called "stacktrace obfuscation framework" ... ๐Ÿ˜‰

So, long story short: What less magical, mostly annotation free stack would you suggest? I'm thinking of a full stack with web, validation, dependency injection, ORM, and maybe also messaging (JMS ...). After some years with Spring, I'd like to try something more clear and lightweight, but not nothing super limited.

33
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/Hakky54 on 2023-10-24 17:03:54.

34
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/loicmathieu on 2023-10-24 09:46:20.


I stumbled upon this (from the inside.java website):

There is a plan to disable annotation compilers by default.

A flag on the command line will need to be added to enable them (by name, path, or module path).

The issue points that build tools are used anytime now, and as annotation processors are used at build time the command line flag could be added to the build tool.

Regarding how common annotation processors are (Micronaut, Lombok, even Quarkus for some extensions, ...) I wonder if it will be another pain in our Java developer life ...

35
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/daleksandrov on 2023-10-24 09:19:24.


๐ŸšจWe are happy and proud to announce that the revolutionary world's first virtual thread-based microservice framework Helidon 4 has been released!๐ŸŽ‡๐ŸŽ‰

๐Ÿ“šLearn more about it from this article:

#helidon #virtualthreads #java21 #helidon4 #microprofile

36
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/Joram2 on 2023-10-24 04:42:47.

37
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/debordian on 2023-10-23 16:19:35.

38
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/Shawn-Yang25 on 2023-10-19 07:29:46.

39
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/Heckrothing on 2023-10-22 15:56:14.

40
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/Tirezor on 2023-10-22 15:30:54.

41
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/ihatebeinganonymous on 2023-10-20 22:34:50.


Hi,

If you are like me, checking the JEP homepage regularly to see whether there is any update to current JEPs or new JEPs being added, you may be interested in this automated Twitter account:

Cheers

Update: There is also an RSS feed in https://rss.xlit.app/updates?feed=jep

42
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/ke7cfn on 2023-10-21 15:45:54.

43
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/debordian on 2023-10-18 16:03:31.

44
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/GavinRayDev on 2023-10-20 14:05:12.

45
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/yk313 on 2023-10-20 10:52:51.

46
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/benevanstech on 2023-10-19 12:50:20.

47
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/NRXXGZLS on 2023-10-18 23:45:10.


For me itโ€™s some sort of recursive access control/modifier. I want things package private, but subpackages still being able to access them.

edit: wanted java features and now imma kotlin konvert

48
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/pron98 on 2023-10-18 15:38:18.

49
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/observability_geek on 2023-10-18 08:58:21.

Original Title: Structured Concurrency in JDK 21: A Leap Forward in Concurrent Programming. Is it really? Has anyone already migrated to 21 and can tell me the experience, planning to migrate from 8 to 21. and to spring Boot 3.2

50
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/mpbeau on 2023-10-18 08:20:14.


We run JUnit tests every time I push a commit to github (Integration Tests and Unit Tests). The integration tests take 16 minutes to pass at this point and pushing even small changes means I have to context switch or wait for ages. Is there any way to parallelise them? Processes that help? Libraries to speed things up?

view more: โ€น prev next โ€บ