JPA inheritance performance improvement

This article is about improving JPA’s performance when working with large/thick hierarchies. Let’s suppose that for some reason you have a similar (or larger) hierarchy to one I encountered in one of my projects: – InheritanceType.JOINED also using DiscriminatorColumn – […]

Ubuntu and Oracle

# see also https://wiki.centos.org/HowTos/Oracle12onCentos7 # see also https://adrhc.go.ro/wordpress/centos-and-oracle/ # Follow this (works with Ubuntu 16.04 too): # http://www.techienote.com/install-oracle-12c-on-ubuntu/ # systemd oracle.service (working when only one db is automatically started with /etc/oratab) [Unit] Description=Oracle 12c After=local-fs.target Wants=local-fs.target [Service] Type=forking User=oracle Group=oinstall […]

JPA performance

http://java-persistence-performance.blogspot.ro/2011/06/how-to-improve-jpa-performance-by-1825.html# http://spitballer.blogspot.ro/2010/04/jpa-persisting-vs-merging-entites.html Use byte code weaving EclipseLink implements LAZY for OneToOne and ManyToOne relationships using byte code weaving Pagination Use setFirstResult, setMaxResults of javax.persistence.Query. Caching See https://docs.oracle.com/javaee/7/tutorial/persistence-cache001.htm#GKJIO. See <shared-cache-mode> in persistence.xml or javax.persistence.sharedCache.mode property when creating the EntityManagerFactory. See javax.persistence.Cacheable […]

Ubuntu: phpMyAdmin setup

wget https://files.phpmyadmin.net/phpMyAdmin/4.5.0.2/phpMyAdmin-4.5.0.2-english.tar.gz tar xvzf phpMyAdmin-4.5.0.2-english.tar.gz mv phpMyAdmin-4.5.0.2-english myadmin mkdir myadmin/config chown -R ************ myadmin/config /etc/php5/fpm/php.ini session.gc_maxlifetime = 3600 sudo service php5-fpm restart #save configuration created using https://adrhc.go.ro/myadmin/setup mv -v myadmin/config/config.inc.php myadmin/config.inc.php sudo chown ************ myadmin/config.inc.php rmdir myadmin/config sudo service php5-fpm […]

Create mysql system db

# see also https://adrhc.go.ro/wordpress/mysql-command-line/ #CREATE SYSTEM DB (first step and mandatory before using mysql) export SRVPATH=/ffp/opt/srv mkdir -p $SRVPATH/mysql/innodb/ mkdir -p $SRVPATH/mysql/innodblogdir/ mkdir -p $SRVPATH/mysql/binlog/ mkdir -p $SRVPATH/mysql/log/ mkdir -p $SRVPATH/mysql/tmp/ mkdir -p $SRVPATH/mysql/data cd /ffp # use your my.cnf […]

Compiling mysql 5.6.24

#See https://adrhc.go.ro/wordpress/common-commands-when-building/ for building environment, x.sh script and other things not defined here. #Before starting declare the environment variables specified at the link above. NEW_BUILD_NAME=mysql #NEW_BUILD_VER=5.6.24.large NEW_BUILD_VER=5.6.24.small+innodb NEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER ls -l /tmp/$NEW_BUILD_NAME-* ls -l ~/ffp_0.7_armv5/packages/$NEW_BUILD_NAME-* NEW_BUILD_NR=0 cd $HOME/compile rm -r $HOME/compile/$NEW_BUILD_NAME_AND_VER […]

Tomcat datasource in context.xml

<Resource name=”exifweb” auth=”Container” type=”javax.sql.DataSource” factory=”org.apache.tomcat.jdbc.pool.DataSourceFactory” testWhileIdle=”true” testOnBorrow=”true” testOnReturn=”false” validationQuery=”SELECT 1″ validationInterval=”30000″ timeBetweenEvictionRunsMillis=”30000″ maxActive=”10″ minIdle=”2″ maxIdle=”3″ maxWait=”5000″ initialSize=”1″ removeAbandonedTimeout=”60″ removeAbandoned=”false” logAbandoned=”false” minEvictableIdleTimeMillis=”30000″ jmxEnabled=”false” jdbcInterceptors=”org.apache.tomcat.jdbc.pool.interceptor.ConnectionState” username=”exifweb” password=”exifweb” driverClassName=”com.mysql.jdbc.Driver” url=”jdbc:mysql://localhost:3306/exifweb”/>