15 Jun 2021

feedDZone Java Zone

Understanding JPA and Other Query Construction Frameworks

JPA is the standard that guides the developer towards an object conceptualization of his application and provides him with an abstraction of the relational model. However, once the model is in place, several frameworks are available to generate the request or the command. Which choices are the most relevant? Let's explore.

Criteria JPA2

Once your dependencies are added, the Criteria API is immediately available. It is the most basic and requires knowing the API and its subtleties to produce requests. The use of these objects obliges to pass directly in character string the name of the attributes in order to impose restrictions. Errors are therefore quite frequent during development and during refactoring operations. Plus, because these errors happen at run time, they are often caught too late.

15 Jun 2021 4:18pm GMT

Making portable functions across serverless platforms

The rising popularity of serverless development alongside the increased adoption of multi- and hybrid-cloud architectures has created a lot of competition among platforms. This gives developers many choices about where they can run functions on serverless platforms-from public managed services to on-premises Kubernetes.

If you've read my previous articles about Java serverless, you learned how to get started developing Java serverless functions with Quarkus and how those serverless functions can be optimized to run on Kubernetes. So what should you do next to make your serverless functions fit better with the many choices available to you?

15 Jun 2021 2:04pm GMT

13 Jun 2021

feedDZone Java Zone

Remote Debugging: What It Means for Java Applications

Following the lingering promise of managed infrastructure, reduced operational cost, and resiliency, cloud computing has seen phenomenal trends in adoption since the past decade. As software development marches towards the cloud, we soon realize that this shift warrants the need to rethink our debugging strategies. This is because as software systems are now leveraging these advancements in cloud computing and distributed systems we see gaps emerging in debugging that cannot be satisfied by the traditional methods of logging and breakpoints.

For example, a major issue while using breakpoints is that the codebase needs to be run in debug mode. Therefore, we are not actually replicating the actual state of our systems taking into consideration multi-threading, distributed services, and dependencies on remote services in a cloud-native environment along with multi-service architecture. Similarly, logs offer no respite, as they may be cumbersome and even costly to execute and store.

13 Jun 2021 12:44pm GMT

Introduction to Spring Data Elasticsearch 4.1

Preface

I was recently playing around with Spring Data Elasticsearch (the Spring Data project for Elasticsearch) and came across several issues. One of these was a lack of up-to-date articles. This led me to share my experience using the latest Elasticsearch 7 and Spring Data Elasticsearch 4.1. I hope that my advice can help others gain insight into the tool and how to effectively use it for a variety of reasons.

In this Article, You Will Learn

First, I will briefly explain the purpose of Elasticsearch.

13 Jun 2021 11:40am GMT

Hackathon Java Tools for Developers

article image Hackathon competitions might be one of the most efficient methods to motivate developers to create their own solutions. Meanwhile, now not many developers are not familiar with such events and how to prepare for them. In this article, I'll explain what tools can simplify your development process as well as increase your chance to win.

What's A Hackathon?

The idea of a hackathon is to deliver an application that has to solve one of the problems in a given field within 24/48h. Often competition organizers notify participants about the hackathon subject. So in most of the cases process has the next steps:

13 Jun 2021 11:00am GMT

How to Activate New User Accounts by Email

In a previous article, I explained how to create an activation link for new users of a Vaadin web application. In this article, I'll show you how to send that link via email using SMTP.

Adding the spring-boot-starter-mail Dependency

Spring Boot makes it easy to start sending emails from the app. We just need to add the following to the <dependencies> section of the pom.xml file:

13 Jun 2021 1:13am GMT

12 Jun 2021

feedDZone Java Zone

Large or Small Heap Size? [Video]

Do you want to run your application with a large heap size or a small heap size? What is the right strategy? Which strategy is more expensive? Which is more performant? Watch this video to know more!

12 Jun 2021 1:17am GMT

Multithreading in Java

Every programmer comes across Multithreading and for some reason, it has been considered hard to understand. Well, it's not. In this blog, we will go through some basics of multithreading and in the process will try to understand why it is such an important topic in software development.

A program can have multiple processes and Multithreading allows us to run these multiple processing units concurrently. Our programs by default run on a Single thread also known as the main thread. Multithreading is useful because:

12 Jun 2021 1:11am GMT

11 Jun 2021

feedDZone Java Zone

How to Spellcheck Words and Sentences in Java

In our technology-driven world, electronic communication is increasingly overshadowing verbal communication. Whether we are filling out an online form, sending a text on our phone, or writing an email, it is a fact that many of our business and personal interactions require efficiently written (typed) language. Due to this heavy reliance on electronic communication, it is critical to ensure your online platform has a support system built-in to account for human error; if your application or website allows input or search queries from users, you run the risk of your systems not understanding the text due to spelling errors - and this is where spellcheck comes in.

When you stop and consider how many times you encounter spellcheck in your electronic interactions, it should become clear that it has created a huge failsafe for our often rushed and impatient natures. Spellcheck has come a long way since its beginnings; the first spellcheckers simply verified words instead of suggesting corrections. Fast forward to our current era and spellcheckers have improved in both functionality and efficiency; they operate in the background of our applications and let us know with a red line that we have made a potential error. This is often accomplished with Natural Language Processing (NLP) which, as we have discussed previously, enables computers to process and interpret human language in the form of text or audio data.

11 Jun 2021 9:39pm GMT

Video Post: Java Timer and TimerTask

In the video below, we take a closer look at the Java Timer and TimerTask alongside some examples!

11 Jun 2021 8:10pm GMT

Spring Boot Tutorial: How To Use @Value Annotation With Default Value

In the video tutorial below, we take a closer look at the How to use @Value annotation with default value in Spring Boot. Let's get started!

11 Jun 2021 7:35pm GMT

Spring Data: Easy MongoDB Migration Using Mongock

In one of my projects, I was looking for some simple options to manage MongoDB database schema changes similar to other projects like Flyway or Liquibase. I found Mongock, which is an open-source Java MongoDB tool.

Prerequisites

Getting Started

We will start by creating a simple Spring Boot project from start.spring.io, with the following dependencies: Web, MongoDB, and Lombok.

11 Jun 2021 3:30am GMT

09 Jun 2021

feedDZone Java Zone

[DZone Community Meetup] The Death of Freedom by Software with Justin Albano

How software is responsible for eroding freedom of speech and what we can do as software engineers to stop this trend before it's too late.

Join us live on Wednesday, June 16th at 11:00 am EDT

Join us for this special live DZone event with Justin Albano and moderator Kellet Atkinson where we discuss and go in-depth on the DZone article, The Death of Freedom by Software. This event features a question and answer at the end.

Agenda

Live Question and Answer with Justin Albano and Kellet Atkinson

There will be a live Q&A at the end of this virtual event! Have a question or comment? Ask your questions and share your feedback live during the Q&A!

09 Jun 2021 12:31pm GMT

Optimize Java serverless functions in Kubernetes

A faster startup and smaller memory footprint always matter in Kubernetes due to the expense of running thousands of application pods and the cost savings of doing it with fewer worker nodes and other resources. Memory is more important than throughput on containerized microservices on Kubernetes because:

This significantly impacts serverless function development and the Java deployment model. This is because many enterprise developers chose alternatives such as Go, Python, and Nodejs to overcome the performance bottleneck-until now, thanks to Quarkus, a new Kubernetes-native Java stack. This article explains how to optimize Java performance to run serverless functions on Kubernetes using Quarkus.

09 Jun 2021 11:40am GMT

User-Friendly API Publishing and Testing With Retrofit

Any web service needs to export their public API if consumers want to make the best use of that service. A developer-friendly approach to do so if you work in the Java ecosystem is to package DTOs and endpoint interfaces in an API jar file and use the Retrofit framework to create type-safe clients for integration testing. This article discusses a complete example.

If you've worked in enterprise Java projects you will remember good old Web Services Description Language, the XML based format for describing network services by IBM and Microsoft. Maybe you still work with it? WSDL and its twin XML Schema are among those W3C standards that seasoned developers love to hate. Its specification files are not very human readable, let alone human writable. Fortunately you don't have to. They can be generated by your server endpoint and fed straight into a code generator to create transfer objects (DTOs) and service stubs.

09 Jun 2021 6:38am GMT

06 Jun 2021

feedDZone Java Zone

How to Call Rest API by Using jQuery AJAX in Spring Boot? [Video]

In the video below, we take a closer look at the How to call Rest API by using jQuery AJAX in Spring Boot? | Consuming RESTful service with jQuery. Let's get started!

06 Jun 2021 10:34pm GMT

10 Nov 2011

feedPlanetJava

OSDir.com - Java: Red Hat's top secret Java Killer/Successor: The Ceylon Project

From the Ceylon dept.:

Gavin King of Red Hat/Hibernate/Seam fame recently unveiled the top secret project that he has been working on over the past two years, a new language and SDK designed to replace Java in the enterprise. The project came out of hiding without much fanfare or publicity at QCon Beijing in a keynote titled "The Ceylon Project - the next generation of Java language?".

10 Nov 2011 6:01am GMT

OSDir.com - Java: Oracle Introduces New Java Specification Requests to Evolve Java Community Process

From the Yet Another dept.:

To further its commitment to the Java Community Process (JCP), Oracle has submitted the first of two Java Specification Requests (JSRs) to update and revitalize the JCP.

10 Nov 2011 6:01am GMT

OSDir.com - Java: No copied Java code or weapons of mass destruction found in Android

From the Fact Checking dept.:

ZDNET: Sometimes the sheer wrongness of what is posted on the web leaves us speechless. Especially when it's picked up and repeated as gospel by otherwise reputable sites like Engadget. "Google copied Oracle's Java code, pasted in a new license, and shipped it," they reported this morning.



Sorry, but that just isn't true.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Java SE 7 Released

From the Grande dept.:

Oracle today announced the availability of Java Platform, Standard Edition 7 (Java SE 7), the first release of the Java platform under Oracle stewardship.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Java SE 7 Passes JCP

From the Jitters dept.:

The next edition of Java has been approved by a Java Community Process executive committee, but not without some acrimony.

10 Nov 2011 6:01am GMT

OSDir.com - Java: JDK 7 RC1 Released

From the JDK dept.:

After an initial round of testing we've declared build 147 to be the first Release Candidate of JDK 7.



There are only thirteen changes in this build. Over half of them are administrivial updates that don't affect the actual code; the remainder are true showstoppers, including several hard VM crashes and a JIT correctness bug identified by an Eclipse unit test.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Google Files Sizzling Answer to Oracle's Amended Java Complaint

From the Counter dept.:

Google has filed its answer to Oracle's amended complaint and its memorandum opposing Oracle's Motion to Dismiss. And we find out why Google didn't just roll over and pay Oracle for a license. Oracle asked in its motion to dismiss that the counterclaims alleging that Oracle's patents are invalid be dismissed. So Google explains more thoroughly why it believes they are in fact invalid. First, Google asserts:



Each of the Patents-in-Suit is invalid under 35 U.S.C. § 101 because one or more claims are directed to abstract ideas or other non-statutory subject matter.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache loses Java showdown vote to Oracle

From the Dis Harmony dept.:

The Apache Software Foundation - one of tech's most influential open-source groups - is closer to quitting Java's governing body after losing a stand-off vote against Oracle on Java.



The Reg has learned that with 75 per cent of qualifying Java Community Process (JCP) members having voted on whether to ratify Oracle's proposed roadmap for Java 7 and 8, Oracle's plan has been accepted.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache Software Foundation Resigns from Java Community Process

From the So Long dept.:

The Apache Software Foundation has resigned its seat on the Java SE/EE Executive Committee. Apache has served on the EC for the past 10 years, winning the JCP "Member of the Year" award 4 times, and recently was ratified for another term with support from 95% of the voting community. Further, the project communities of the ASF, home to Apache Tomcat, Ant, Xerces, Geronimo, Velocity and nearly a 100 mainstay java components have implemented countless JSRs and serve on and contribute to many of the JCPs technical expert groups.



We'd like to provide some explanation to the community as to why we're taking this significant step.



The recent Java SE 7 vote was the last chance for the JCP EC to demonstrate that the EC has any intent to defend the JCP as an open specification process, and demonstrate that the letter and spirit of the law matter. To sum up the issues at stake in the vote, we believe that while continuing to fail to uphold their responsibilities under the JSPA, Oracle provided the EC with a Java SE 7 specification request and license that are self-contradictory, severely restrict distribution of independent implementations of the spec, and most importantly, prohibit the distribution of independent open source implementations of the spec. Oracle has refused to answer any reasonable and responsible questions from the EC regarding these problems.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache Discontinues Independent Java Implementation 'Harmony'

From the DisHarmony dept.:

After the resignation of Apache from the Java SE/EE Executive Committee, the time has now come for Harmony to be added to the Apache Attic. Harmony was 'the project to produce an open source cleanroom implementation of Java.' An open vote was taken within the Project Management Committee, which resulted in a 20-2 majority to discontinue development.

10 Nov 2011 6:01am GMT

Javable: YourKit Java Profiler 7.0 released

The major update to YourKit Java Profiler has been released. Version 7.0 includes

10 Nov 2011 6:01am GMT

Javable: Sun phases out mobile Java

Sun will gradually phase out mobile Java (Java Micro Edition) and move respective services to Standard Edition. "We're trying to converge

10 Nov 2011 6:01am GMT

Javable: Google Android SDK is available

The development kit and API for Google mobile platform, Android, has been released.

10 Nov 2011 6:01am GMT

Javable: Consumer JRE Early Access

Sun has started an early access program to Java SE 6 Update N (formerly known as the "Consumer

10 Nov 2011 6:01am GMT

Javable: NetBeans 6.0 released

New version of pure Java IDE has been released, with support for many new

10 Nov 2011 6:01am GMT

Javable: Happy New Year!

We wish a Happy New Year to all our readers and contributers. Hope to see you all in 2008.

10 Nov 2011 6:01am GMT