RedHat & CentOS

Change hostname hostnamectl set-hostname redhat7.localdomain hostnamectl status Change in /etc/sysconfig/network HOSTNAME=redhat7.localdomain Change in /etc/hosts (otherwise Oracle won’t start -> when using Oracle …) 127.0.0.1 redhat7 redhat7.localdomain reboot Static ip setup [root@localhost ~]# cat /etc/sysconfig/network NETWORKING=yes GATEWAY=172.16.148.2 HOSTNAME=redhat7.localdomain [root@localhost ~]# cat […]

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 in persistence.xml or javax.persistence.sharedCache.mode property when creating the EntityManagerFactory. See javax.persistence.Cacheable used […]

Mount DAV directory

see http://linux.die.net/man/5/davfs2.conf # see http://www.freebsd.org/cgi/man.cgi?query=mandoc_char&sektion=7&apropos=0&manpath=NetBSD%2B6.0 -> for cq character # see http://passwordsgenerator.net/ # edit /etc/updatedb.conf: # PRUNEFS=”… davfs davfs2″ adrhcbImpl() { # sudo mkdir -p /mnt/adrhc # sudo chmod g+rw /mnt/adrhc # sudo chmod u+s /sbin/mount.davfs # sudo usermod […]

Ubuntu and Windows domain

wget http://de.archive.ubuntu.com/ubuntu/pool/main/l/likewise-open/likewise-open_6.1.0.406-0ubuntu5.1_amd64.deb wget http://de.archive.ubuntu.com/ubuntu/pool/main/libg/libglade2/libglade2-0_2.6.4-2_amd64.deb wget http://de.archive.ubuntu.com/ubuntu/pool/universe/l/likewise-open/likewise-open-gui_6.1.0.406-0ubuntu5.1_amd64.deb sudo dpkg -i 1.likewise-open_6.1.0.406-0ubuntu5.1_amd64.deb sudo dpkg -i 2.libglade2-0_2.6.4-2_amd64.deb sudo dpkg -i 3.likewise-open-gui_6.1.0.406-0ubuntu5.1_amd64.deb sudo domainjoin-gui sudo domainjoin-cli query sudo dpkg -l likewise* sudo dpkg –purge likewise-open-gui sudo dpkg –purge libglade2-0 sudo dpkg –purge likewise-open sudo […]

How to create a debian package

method 1 see also http://ubuntuforums.org/showthread.php?t=910717 supposing anything-sync-daemon-5.76 contains all package’s files Than simply create anything-sync-daemon-5.76/DEBIAN/control file with a similar content: Package: anything-sync-daemon Version: 5.76 Section: Utilities Priority: optional Architecture: amd64 Maintainer: Gigi Kent Description: anything sync daemon then run dpkg-deb […]

Compiling anything sync daemon

Environment variables NEW_BUILD_NAME=anything-sync-daemon NEW_BUILD_VER=5.76 NEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER ls -l /tmp/$NEW_BUILD_NAME- ls -l ~/ubuntu_packages//$NEW_BUILD_NAME-* NEW_BUILD_NR=0 # rm -r $HOME/temp/$NEW_BUILD_NAME_AND_VER Download and unpack cd $HOME/compile wget http://repo-ck.com/source/anything-sync-daemon/anything-sync-daemon-5.76.tar.xz tar xpvf anything-sync-daemon-5.76.tar.xz Compilation cd $HOME/compile/anything-sync-daemon-5.76 with systemd use export DESTDIR=$HOME/temp/$NEW_BUILD_NAME_AND_VER;make V=1 install-systemd-all with upstart use export […]

Make ubuntu or applications run faster

See also https://doc.ubuntu-fr.org/optimisation Check ubuntu startup times systemd-analyze blame /etc/fstab http://www.lgqyc.com/move-tmp-to-ram/ http://jsmylinux.no-ip.org/performance/improving-performance/ http://askubuntu.com/questions/173094/how-can-i-use-ram-storage-for-the-tmp-directory-and-how-to-set-a-maximum-amount http://www.digitalinternals.com/unix/linux-io-performance-tuning-noatime-nodiratime-relatime/388/ mount | grep -P “^tmpfs.+/(tmp|var/run)” sudo du -sh /tmp /var/tmp; du -sh /****/apps/tmp /****/apps/var/run /run/user/id -u /tmp/tomcat 2>/dev/null tmpfs /tmp tmpfs defaults,relatime,mode=1777,size=4G 0 0 tmpfs /var/tmp […]

JAXB 2.2.10

see also http://docs.oracle.com/javaee/5/tutorial/doc/bnbbf.html see also https://jaxb.java.net/tutorial/index.html see also https://jaxb.java.net/guide/index.html – Unofficial JAXB Guide see also How to get simple and better typed binding in https://metro.java.net/guide/ch03.html globalBindings fixedAttributeAsConstantProperty fixed attributes will be generated as a java constant. @XmlSchemaType(name = “NMTOKEN”) public […]

XSD schema

https://www.w3.org/TR/xmlschema-2/#built-in-datatypes http://www.xml.com/pub/a/2001/08/22/easyschema.html -> best article That leaves us with with , which ensures that there will not be any data content in the element. -> the default syntax for complex types is complex content that restricts anyType http://stackoverflow.com/questions/5457217/xsd-for-simplecontent-with-attribute-and-text Apparently, you […]