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 # see also # Follow this (works with Ubuntu 16.04 too): # # systemd oracle.service (working when only one db is automatically started with /etc/oratab) [Unit] Description=Oracle 12c [Service] Type=forking User=oracle Group=oinstall […]

JPA performance 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 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 tar xvzf phpMyAdmin- mv phpMyAdmin- 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 mv -v myadmin/config/ myadmin/ sudo chown ************ myadmin/ rmdir myadmin/config sudo service php5-fpm […]

Create mysql system db

# see also #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 for building environment, 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”/>