Hibernate

Multiple data source implementations are very crucial in instances where we want to secure the application from vulnerabilities such as a database failure. This will ensure that the application can still function even if part of the database went down. This tutorial will use student and course entities to demonstrate how multiple data sources can…

Read More Multiple Datasources in Spring Application

In this tutorial, I will share how to make the Spring Boot application display Hibernate SQL Queries. If you are learning about Hibernate, you might also be interested in the following tutorials: One-to-One Mapping Hibernate/JPA Using Spring Boot and MySQL One-to-Many Mapping Hibernate/JPA Using Spring Boot and MySQL Many-to-Many Relationship in Spring Boot Rest +JPA…

Read More Show Hibernate SQL Query in Spring Boot

In this blog post, I am going to share with you how to configure Spring Data JPA in a Jersey 2 Container Deployable Web App. Spring Data JPA makes it much easier and more convenient to persist and read data from the database and when I needed to tie together Spring Data JPA and Jersey 2 Web…

Read More Configure Spring Data JPA in Jersey 2 JAX-RS App

With this blog post, I am going to share what I needed to do to make JPA work in my Jersey 2 Web Services App. I have created my Jersey 2 app using the following maven snippet: mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes \ -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.26 I then opened pom.xml and added a few new dependencies which I…

Read More Configuring JPA in Jersey 2 Web App

When you start building a mobile app most likely you will need to build pages like user Sign up and once user has successfully registered, you will need to create a Sign in page. I have created many video tutorial how to implement these pages in Swift and if you follow those you will no doubt…

Read More REST API with Java JAX-RS. Create and Deploy to Amazon Cloud.

With this tutorial I wanted to share with you how to configure your Java project and it’s hibernate configuration file hibernate.cfg.xml to use a more professional and production ready connection pool provider C3P0. Hibernate’s internal connection pooling algorithm is rudimentary, and is provided for development and testing purposes. In my earlier blog posts I used…

Read More Configure Hibernate to Use C3P0 Connection Pool

It time to learn how to create a Web Service to authenticate user with their user name and password and how to issue a unique secure access token which our Mobile Application can use to send HTTP requests and communicate with protected web services of our API. For a free video tutorial on how to…

Read More RESTful Web Service to Authenticate User and Issue Access Token

In this blog post I am going to share with you a way to create a RESTful Web Service to: Create a new user profile, Generate and save in database a user secure user password rather than an actual password provided by user, Return back as a response a custom user profile object(JSON) with information that…

Read More RESTful Web Service to Save a New User in Database

Hibernate is a great framework to use to persist data into a database when building RESTful Web Services for your mobile application with Jersey and JAX-RS. In most of the projects I have participated when designing RESTful Web Services for Mobile App we used MySQL database server and Hibernate framework to store user data which…

Read More Persist Java Object in MySQL Database With Hibernate