Android Easter Egg

May 17th, 2010 jmguilla 1 comment

Go to http://www.google.co.uk/, type the search “meet android” and click “I am feeling lucky”… They are busy at Google!! ;)

Categories: News Tags: ,

Happiness

May 12th, 2010 jmguilla No comments

Some cause happiness wherever they go; others whenever they go

–Oscar Wilde

Categories: Quote Tags:

Personal Movie Star

May 12th, 2010 jmguilla 1 comment

Say thank you

You want to be the star of your own movie, say somebody thank you or simply make someone laugh?

Visit the site: http://en.tackfilm.se/

Categories: Uncategorized Tags:

VMware Server 2 – Datacenter’s Name

May 11th, 2010 jmguilla No comments

Today I played with jASMINe VMM to compare its features against ProActive VMM. During VMM-Agent configuration, you have to set datacenter’s name and virtual machine’s folder parth. Regarding Virtual Infrastructure SDK Documentation, it seems that only datacenter is defined at the host level ( for an ESX host or a VMware Server 2 for instance ), but I didn’t find anythind about their name in VMware Server 2 doc… Thus, I just modified ProActive VMM a bit to print default datacenter and vm folder’s name:

Datacenter: ha-datacenter

VM-Folder: vm

Java 5 and dependency injection

May 11th, 2010 jmguilla 1 comment

How to dynamically load an implementation using Java 5?

You cannot use Java 6? One of the coolest features brought by this last release is the capability of loading an implementation just using:

ServiceLoader.load(MyInterface.class)

And you were looking for that… I know how boring it is!! It is not public in the API but I found it there. That means that to use ServiceLoader with Java 5 is straight forward:

   CharEncoder getEncoder(String encodingName) { 
       Iterator ps = Service.providers(MyInterface.class); 
       while (ps.hasNext()) { 
           MyInterface myInterface = (MyInterface)ps.next(); 
           MyImpl myImpl = MyInterface.getImpl(implName); 
           if (myImpl != null) 
               return myImpl; 
       } 
       return null; 
   }

That’s it

Categories: Java, Programming Tags: ,