If your system has more than one version of Java, configure which one your system uses by entering the following command in a terminal window
$ sudo update-alternatives --config java
I'm dedicated agile security architect/system architect/developer with specialty of open source framework.
If your system has more than one version of Java, configure which one your system uses by entering the following command in a terminal window
$ sudo update-alternatives --config java
Current implementation of Hibernate are:
Do not set logging level in persistence.xml (hibernate.show_sql, hibernate.format_sql), instead use Log4J for changing logging level.
# Log all hibernate SQL DML statements as they are executed
log4j.logger.org.hibernate.SQL=TRACE
# Log all hibernate JDBC parameters
log4j.logger.org.hibernate.type=TRACE
# Log all hibernate second-level cache activity
log4j.logger.org.hibernate.cache=TRACE
You can put this in you src/test/resources/log4j.properties if you want more logging when writing or debugging your test cases.
It is the possible replacement for Virtualization.
So the difference between Virtualization and Docker is that everything runs locally on the same server, without the Virtualization overhead.
Example. Lets download a ready image from the Docker Hub (https://hub.docker.com/). You can either browse the Docker Hub via web browser or via command line.
$ sudo docker search tomcat
...
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
tomcat Apache Tomcat is an open source implementa... 203 [OK]
consol/tomcat-7.0 Tomcat 7.0.57, 8080, "admin/admin" 12 [OK]
consol/tomcat-8.0 Tomcat 8.0.15, 8080, "admin/admin" 10 [OK]
...
Lets pick the official docker image. The first time you run a new Docker Image, it will download it and that will take a little while.
$ sudo docker run -it --rm -p 8888:8080 tomcat:8.0
...
10-Aug-2015 18:52:33.409 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
10-Aug-2015 18:52:33.413 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
10-Aug-2015 18:52:33.413 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 658 ms
And now try it by open http://localhost:8888.
So what happened? We started a new process.
$ ps -aux | grep -i docker
...
root 29569 0.0 0.0 222512 10728 pts/25 Sl+ 21:19 0:00 docker run -it --rm -p 8888:8080 tomcat:8.0
...
And a new tomcat process.
$ ps -aux | grep -i java
...
root 29578 1.7 1.2 7172840 200552 pts/1 Ssl+ 21:19 0:04 /usr/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
...
And for network. A new virtual bridge was created, which is basically a virtual router.
$ ifconfig
...
docker0 Link encap:Ethernet HWaddr 56:84:7a:fe:97:99
...
Docker makes use of proven mature Linux technologies:
# Lists all docker process
$ sudo docker ps -a
# Print detailed information of a Docker proccess
$ sudo docker inspect <ContainerID>
# List all local Docker images
$ sudo docker images
# Run Docker image
$ sudo docker run -p <host_port1>:<container_port1> -p <host_port2>:<container_port2>
# Search for a ready Docker image at Docker Hub (https://registry.hub.docker.com/)
$ sudo docker search <SearchString>
Install docker.
$ sudo apt-get install docker.io
Test the installation.
$ sudo docker run hello-world
Hello from Docker.
This message shows that your installation appears to be working correctly.
...