Friday, February 27, 2015

It's cool to be Oracle Certified Specialist

You can stick this diploma on your bedroom's wall and impress your friends...





After all it cost me only like 250 USD....



Thursday, February 26, 2015

RDF, OWL, SPARQL....


I post these interesting Wikipedia articles, it's always good to learn something new to impress girls in conversations on the train (hahaha just kidding) :

these readings are about the "web metadata"  story (the need to embed relational [a is father of b] statements in web documents, so that an agent can parse them and build a DB of facts).

http://en.wikipedia.org/wiki/Resource_Description_Framework

http://en.wikipedia.org/wiki/Semantic_Web

http://en.wikipedia.org/wiki/SPARQL

http://en.wikipedia.org/wiki/Web_Ontology_Language


For some "semantic repositories" DBs:
http://en.wikipedia.org/wiki/Sesame_%28framework%29

http://www.oracle.com/technetwork/database/options/spatialandgraph/overview/index.html on Oracle Spatial and Graph

http://www.systap.com/ Systap Bigdata

http://www.ontotext.com/products/ontotext-graphdb/  Ontotext GraphDB




Also interesting reading:

ever wondered about the difference between a Type 1 and a Type 2 Hypervisor? Here goes the story:

http://en.wikipedia.org/wiki/Hypervisor





Tuesday, February 10, 2015

Garbage Collection Resources

If you are confronted with a JVM crash in PROD, you might want first to read some documents on GC.

http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html for Java 6, very well explained conceptually.

http://www.fasterj.com/articles/oraclecollectors1.shtml brillant lookup of the main flags available, and possible combination of GC for yound and old generation (Java 7)

http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html list of all JDK 7 options.

To test the options, you can run InfiniteLoop.java :

public class InfiniteLoop {
    public static void main(String[] args) throws Exception {
        for (;;) {Thread.sleep(1000);}
    }
}


and run jconsole....in the "threads" tab you have a nice summary of the Eden Space, Survivor Space, Old Gen.

you can also run jinfo:
jinfo -flag UseParallelGC 3797
jinfo -flag MinHeapFreeRatio 3797
jinfo -flag UseSerialGC 3797



where 3797 is the process PID.

Attempts to change GC strategy runtime :

jinfo -flag +UseSerialGC 3797

will miserably fail:

Exception in thread "main" java.io.IOException: Command failed in target VM
 at sun.tools.attach.BsdVirtualMachine.execute(BsdVirtualMachine.java:208)
 at sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:217)
 at sun.tools.attach.HotSpotVirtualMachine.setFlag(HotSpotVirtualMachine.java:190)
 at sun.tools.jinfo.JInfo.flag(JInfo.java:129)
 at sun.tools.jinfo.JInfo.main(JInfo.java:76)



On a different topic, read also:

1 - http://www.oracle.com/technetwork/java/javase/crashes-137240.html this document about troubleshooting system crashes

2 - http://www.oracle.com/technetwork/java/hotspotfaq-138619.html this interesting FAQ list

3 - this document http://www.oracle.com/technetwork/java/jdk50-ts-guide-149808.pdf (a bit outdated) about jmap, jinfo, jstack etc

4 - http://www.oracle.com/technetwork/java/javase/index-137495.html this one repeats more or less - with more details - the info in the above document n. 3

Priceless are these commands:
jmap -heap 3843
jmap -histo 3843
jmap -permstat 3843
jmap -dump:file=dump.map 3843
jhat -port 7401 dump.map (at this point open your browser at localhost:7401)

jstat -gc 3843
jstat -printcompilation 3843

jstat -gcutil 3843 250 7




Friday, February 6, 2015

Installing Oracle SoaSuite 11g pre-built VM on A Mac Pro (OS-X)

Unfortunately all the instructions on the Oracle site are FOR WINDOWS ONLY (bleah).

On a Mac, installing Virtual Box Manager is just as easy. Download the 6 files (7z split file). Here comes the tricky part, 7Zip is not supported on a Mac. I personally PURCHASED for 2 CHF the "Keka" application, and it was very easy to unpack the 6 files into a oel6-64bit-soasuite-11gr1-ps6-otn.ova file. A free alternative is "The Unarchiver", I have installed it but not tested.

At this point, in Finder, right-click on the oel6-64bit-soasuite-11gr1-ps6-otn.ova file, choose "Open with..." and then "Virtual Box (default)".

I "Start" the VM image, and get an error message about the missing support for USB 2.0. I just remove this option from the VM settings and all runs smoothly (this is explained also in the pre-built VM box instructions).

Login as oracle/oracle and enjoy. You can use also Mac's own terminal to connect: "ssh -X oracle@localhost -p 2222"

Using the -X switch will allow you to use the pre-installed firefox on the VM.... so you avoid fastidious settings on your host machine.

Run firefox, then enter:

http://10.0.2.15:7001/console

or

http://soabpm-vm.site:7001/console

If you find X11 too slow (it was slow on my machine), you can access from the host machine browser:

sudo vi /private/etc/hosts


add this line:

127.0.0.1 soabpm-vm soabpm-vm.site localhost


then enter http://soabpm-vm.site:7001/console/ in your browser, and login as weblogic/welcome1. OSB console available at http://soabpm-vm.site:7001/sbconsole/

eventually also exclude from the proxy settings the 127.0.0.1 and localhost...