- Spring DATA JPAは、Spring Frameworkの拡張ライブラリ。
springframework-jdbc
シリーズかspringframework-orm
シリーズのようだが、安定したら本流に組み込まれるのかもしれない。 - この記事の執筆時点のバージョンは SPRING DATA JPA 1.1.0 GA
- Spring DATA JPAは、JPAの機能をベースに 汎用的な Repositoryの機能を提供する。
- ちなみに、Repositoryというのは、ドメイン駆動設計(Domain Driven Design)のパターンのひとつで、ドメインのEntityのCollectionのように振舞う責務を持つ。例えば
CustomerRepository
ならば、システムに存在するCustomer
EntityたちをCollectionに保持するかのように振舞う。 - PoEAAにもある。参照
- もちろん本当のCollectionに保持したら大変なことになるので、バックエンドではデータベースアクセスが行われたりするわけだが、そういったことを抽象化する。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo | |
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo | |
sudo yum install -y apache-maven | |
mvn --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /tmp/test = EBS-SSD | |
# /mnt/test = instance-store | |
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test | |
256+0 records in | |
256+0 records out | |
268435456 bytes (268 MB) copied, 3.26957 s, 82.1 MB/s | |
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test | |
256+0 records in | |
256+0 records out |
If you are seeing Mongo soft rlimits warnings in your logs, or a WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
when you login to mongo shell via mongo
from the commandline, or any mysterious/unexplained mongo connection errors... follow this how-to exactly and it will resolve the issue for you.
(Source of this how to found at basho/basho_docs#1402)
First file:
sudo vi /Library/LaunchDaemons/limit.maxfiles.plist
...containing:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AVLTree /////////////////////////////////////////////////////////////////// | |
// This file is originally from the Concentré XML project (version 0.2.1) | |
// Licensed under GPL and LGPL | |
// | |
// Modified by Jeremy Stephens. | |
// Pass in the attribute you want to use for comparing | |
function AVLTree(n, attr) { | |
this.init(n, attr); | |
} |