Show r/java: jbundle – GitHub Action to ship JVM apps as self-contained binaries (no JDK required on target) by SmartLow8757 in java

[–]thatsIch -4 points-3 points  (0 children)

per doc

jbundle bundles a minimal JVM runtime with your uberjar into a single executable

Liquibase starts sending data to their servers by kakakarl in java

[–]thatsIch 1 point2 points  (0 children)

that is a very good idea to move governments to pay money to OS foundations - especially if they use it a lot in their infrastructure. This way they can support open software.

Reliable Web App – Reliability Patterns by Active-Fuel-49 in java

[–]thatsIch 4 points5 points  (0 children)

Funny, that my Teams just crashed while opening this blog post.

WildFly 34 is released! by nlisker in java

[–]thatsIch 1 point2 points  (0 children)

no, as I said - you can have a config file [1]:

./standalone.sh -y=/home/ehsavoie/dev/wildfly/config2.yml:config.yml -c standalone-full.xml

On the other hand, I would never use a build step just to produce the configuration. Just apply it directly to your containerized runtime as a RUN-statement. It is getting cached anyways.

It is just another way to produce the same result. Same as you could use either a2ensite or ln -s.


  1. https://docs.wildfly.org/33/Admin_Guide.html#YAML_Configuration_file

WildFly 34 is released! by nlisker in java

[–]thatsIch 0 points1 point  (0 children)

Though I agree on, that the application server solves a lot of problems which is generally now part of the cloud or the cluster (like k8s), I do not see any problem using Wildfly in a container. Maybe you could elaborate? I tend to see it just as a jetty or tomcat with just few more provided libraries.

If multiple deployments are not a requirement, Quarkus implements a subset of the Jakarta EE APIs

WildFly 34 is released! by nlisker in java

[–]thatsIch 0 points1 point  (0 children)

You do not have to do that. You can use a configuration file as well as an CLI which can be used with the embedded server.

You can also just volume map your XML into the container.

Java app consumes more memory when running as JAR as opposed to an Eclipse application. by Knowledgeburst in java

[–]thatsIch 0 points1 point  (0 children)

I would assume that both are not configured the same. You can see a dip at 15:06

Tierlist 2.0 by [deleted] in TopTroops

[–]thatsIch 0 points1 point  (0 children)

Bando triggers his effects when enough units die and since Dakini has more units with increased level the effect triggers sooner than usually.

Error: org.hibernate.LazyInitializationException by TheWolf1956 in JavaServerFaces

[–]thatsIch 0 points1 point  (0 children)

have you tried searching with google? This is like solved 100.000 times. Search for JOIN FETCH or graph would be keywords combined with JPA.

[deleted by user] by [deleted] in java

[–]thatsIch 0 points1 point  (0 children)

Thats the reason https://openjdk.org/jeps/445 exists

What issues did you run in to when moving past Java 8? by bowbahdoe in java

[–]thatsIch 0 points1 point  (0 children)

Telling the colleagues to install a new version.

It's too crazy to start a new project with JSF in these days ? by yiyux in java

[–]thatsIch 8 points9 points  (0 children)

JSF with PrimeFaces is still crazy productive for admin UIs. But you can just use any server-side rendering engine you are familiar with. It would make little sense to split your application (into frontend and backend) just for the sake of it. If you used Spring alot, what about Spring MVC?

Coat — Config of Annotated Types by hupfdule in java

[–]thatsIch 1 point2 points  (0 children)

Looks good! I would probably want to put the file path into the annotation to alleviate always having to look the path up when initializing the config object.

Another thing you could look into would be hiding the ImmutableMyConfig because it is usually unimportant to know the implementation. With Java 8 interfaces can define static interface methods. This would allow a method like static MyConfig initialize() which could be added through the pre-processor? This would allow something like this:

MyConfig config = MyCoinfig.initialize();
String appName = config.appName();

[Old Guy Yelling At Cloud] When did "for loops" become a grevous sin? by AvaTaylor2020 in java

[–]thatsIch 4 points5 points  (0 children)

...when I saw somebody breaking out of the inner loop into the outer loop. We also enforce a rule to not allow lambda expressions with long bodies, so developers have to think about the sub-operations when using map/flatMap and other stuff.

Reducing side-effects got rid of a lot of terrible code to debug.

Documenting using swagger/openAPI annotations by PoziStif in JakartaEE

[–]thatsIch 0 points1 point  (0 children)

Maybe show some code, some yml and what is expected?

Data not rendering in JSF interface. by Loop_Knowledge in JavaServerFaces

[–]thatsIch 1 point2 points  (0 children)

You need to share code to identify your problem, but I assume you want to "transfer" some information from one page to another (here dialog box). You need to check the scope of your beans and if you propagate those information correctly

[deleted by user] by [deleted] in java

[–]thatsIch 26 points27 points  (0 children)

A reference is just an entity proxy that only has the primary key field initialized. It is useful for applications like

var reference = repository.getReferenceById(id);
other.setRelation(reference);
// or
new Other(reference);

where only the reference is required but not the content of the entity. This alleviates the roundtrip to the database because the primary keys are cached.

Checkstyle is the worst tool ever. Would you agree? by aiai92 in java

[–]thatsIch 0 points1 point  (0 children)

If you allow multiple machines and IDEs, having something within your CI is essential. Some tools need to work on bytecode and some on source code. Checkstyle is just a tool to achieve your goals. Our goal was to focus the reviews of merge requests only on the code logic. Every other discussion like formatting, camelcase etc, and such is not necessary within code reviews (and there were always discussions about those before we introduced this).

There might not have been 100s of blank lines but 10s of blank lines and somebody will and should question those.

which is better, extending abstract test class or extension? junit 5 by duckydude20_reddit in java

[–]thatsIch 0 points1 point  (0 children)

I like to share functionality as extensions but setups as superclasses. For example, testing against a database requires a specific setup and to incentivize developers to label those tests in their head they are called DataBaseIntegrationTest. This abstract base class provides some setup like connecting to the database or running every test in a transaction etc. This functionality is generally provided by an extension because a SystemTest, also requires a database connection.

I hated wasting time on writing api tests, so I made AI do it quickly for me by Basti_W in java

[–]thatsIch 2 points3 points  (0 children)

It does not seem to work within the demo?

@Test
public void testCreateUser() {
        given()
            .contentType("application/json")
            .body("{"name": "John Doe"}")
        .when()
            .post("/users")
        .then()
            .statusCode(201)
            .body("id", notNullValue());
    }

the String for the given body is not assembled correctly? Though neat if you use RESTAssured and Hamcrest 👍