Home » Author Archives: Martin Mois

Author Archives: Martin Mois

Martin is a Java EE enthusiast and works for an international operating company. He is interested in clean code and the software craftsmanship approach. He also strongly believes in automated testing and continuous integration.

Using JINQ with JPA and H2

java-interview-questions-answers

A few days ago I have read the interesting interview with Ming-Yee Iu about JINQ. JINQ is, like the name already suggests, the attempt to provide something similar to LINQ for Java. The basic idea is to close the semantic gap between object-oriented code that executes queries on a relational data model. The queries for the relational database model should be ...

Read More »

Apache Hadoop Tutorial – The ULTIMATE Guide (PDF Download)

apache-hadoop-logo

EDITORIAL NOTE: Apache Hadoop is an open-source software framework written in Java for distributed storage and distributed processing of very large data sets on computer clusters built from commodity hardware. All the modules in Hadoop are designed with a fundamental assumption that hardware failures are common and should be automatically handled by the framework. Hadoop has become the de-facto tool ...

Read More »

Testing Concurrent Applications

java-logo

This article is part of our Academy Course titled Java Concurrency Essentials. In this course, you will dive into the magic of concurrency. You will be introduced to the fundamentals of concurrency and concurrent code and you will learn about concepts like atomicity, synchronization and thread safety. Check it out here! Table Of Contents 1. Introduction 2. SimpleBlockingQueue 2.1. Test ...

Read More »

Fork/Join Framework

java-logo

This article is part of our Academy Course titled Java Concurrency Essentials. In this course, you will dive into the magic of concurrency. You will be introduced to the fundamentals of concurrency and concurrent code and you will learn about concepts like atomicity, synchronization and thread safety. Check it out here! Table Of Contents 1. Introduction 2. Fork/Join 2.1. RecursiveTask ...

Read More »

Performance, Scalability and Liveness

java-logo

This article is part of our Academy Course titled Java Concurrency Essentials. In this course, you will dive into the magic of concurrency. You will be introduced to the fundamentals of concurrency and concurrent code and you will learn about concepts like atomicity, synchronization and thread safety. Check it out here! Table Of Contents 1. Introduction 2. Performance 2.1. Amdahl’s ...

Read More »

The java.util.concurrent Package

java-logo

This article is part of our Academy Course titled Java Concurrency Essentials. In this course, you will dive into the magic of concurrency. You will be introduced to the fundamentals of concurrency and concurrent code and you will learn about concepts like atomicity, synchronization and thread safety. Check it out here! Table Of Contents 1. Introduction 2. java.util.concurrent 2.1. Executor ...

Read More »

Concurrency Fundamentals: Deadlocks and Object Monitors

java-logo

This article is part of our Academy Course titled Java Concurrency Essentials. In this course, you will dive into the magic of concurrency. You will be introduced to the fundamentals of concurrency and concurrent code and you will learn about concepts like atomicity, synchronization and thread safety. Check it out here! Table Of Contents 1. Liveness 1.1. A Deadlock 1.2. ...

Read More »

Introduction to Threads and Concurrency

java-logo

This article is part of our Academy Course titled Java Concurrency Essentials. In this course, you will dive into the magic of concurrency. You will be introduced to the fundamentals of concurrency and concurrent code and you will learn about concepts like atomicity, synchronization and thread safety. Check it out here! Table Of Contents 1. Basic know-how about threads 2. ...

Read More »

Java Concurrency Essentials Tutorial

java-logo

Course Overview Concurrency is always a challenge for developers and writing concurrent programs can be extremely hard. There is a number of things that could potentially blow up and the complexity of systems rises considerably when concurrency is introduced. However, the ability to write robust concurrent programs is a great tool in a developer’s belt and can help build sophisticated, ...

Read More »

Hibernate教程-终极指南

jboss-hibernate-logo

编者按:Hibernate ORM(简称Hibernate)是一个对象-关系映射框架,用于将面向对象的域模型转换为传统的关系数据库。Hibernate通过将直接的持久性相关的数据库访问替换掉,而高级对象处理功能来替换,解决了对象-关系间不匹配的问题。 Hibernate是最流程的Java框架之一。为此,我们在Java Code Geeks提供了大量的教程,点击这里查看它们。 现在,我们想要创建一个独立的、具有参考性的文章,来提供一个关于如何使用Hibernate的框架,并且帮助你快速开启你的Hibernate应用开发。开始享受吧!  目录 1. 简介 2. 项目搭建 3. 基础知识 3.1. SessionFactory 和Session 3.2. 事务(Transactions) 3.3. 表(Tables) 4. 继承(Inheritance) 5. 关系(Relationships) 5.1. 一对一 5.2. 一对多 5.3. 多对多 5.4. 组件(Components) 6. 用户自定义数据类型 7. 拦截器(Interceptors) 8. 源码下载 简介 Hibernate是Java世界里最流程的对象/关系映射框架(ORM)之一。它允许开发者将普通的Java类的对象结构,映射到数据库中的关系结构。借助于ORM框架,我们的一些工作,比如将内存中的对象实例存储到持久化的数据库,和加载这些数据到原来的对象结构,都变得更加容易。 同时,这些ORM解决方案,比如Hibernate,旨在从那些用于存储数据的数据库产品中建立抽象层。这样,就能够面向不同的数据库产品使用相同的Java代码,而不需面向不同的数据库编写不同的代码,来处理其中细微的差别。 Hibernate也是一个JPA提供者,这意味着它实现了Java持久化API(JPA)。JPA是一个独立于厂商的规范,用于定义Java对象和关系型数据表的映射关系。在终结系列中另一篇文章已经详细解释了JPA,所以我们在本文将重点介绍Hibernate,因此,我们也不会使用JPA注解,而是使用Hibernate专有的配置文件。 Hibernate由三个不同的组件组成: 实体(Entities):Java类(普通Java对象),用于在Hibernate中映射到关系型数据库系统的表。 对象-关系元数据(Object-Relational metadata):实体和关系型数据库的映射信息,可以通过注解(Java 1.5开始支持)实现,或者使用传统的基于XML的配置文件。这些配置信息,用于在运行时执行Java对象和数据库数据的存储和恢复。 Hibernate查询语言(HQL):使用Hibernate时,发送到数据库的查询,不必是原生的SQL格式,而是使用Hibernate专有的查询语言。这些查询语句,会在运行时被翻译成当前应用正在使用的数据库对应方言;所以说,HQL格式的语句是独立于特定数据库供应商的。 在本教程,我们将解释这个框架的各个方面,同时开发一个简单的Java SE应用程序,功能主要包括存储和检索关系型数据库的数据。我们将要使用到的类库/环境如下: maven >= 3.0 :编译环境 Hibernate(4.3.8.Final) H2 (1.3.176):关系型数据库 项目搭建 第一步,我们通过命令行创建一个简单的Maven项目: mvn archetype:create -DgroupId=com.javacodegeeks.ultimate -DartifactId=hibernate 这个命令会在文件系统中生成如下结构: |-- src | |-- main | ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns