Java development blog (tips, notes, …)
“First, solve the problem. Then, write the code.” (John Johnson)

    discoBit Centralized Configuration Management

    2015-01-15 09:07:00 +0100

    discoBit is a Centralized Configuration Management.

    The configuration is stored as a key value pair in a central application.

    http://discobit.com/

    Java Client https://github.com/v3rticle-oss

    Article “Central Configuration Management in JavaMagazin 2.15”

    JEKYLL - Transform your plain text into static websites and blogs

    2014-12-21 20:09:02 +0100

    MOUNT LUKS ENCRYPTED DRIVES AT STARTUP

    2014-12-14 12:09:02 +0100

    Create a keyfile to automatically decrypt hard drives:

    Premise:

    Disc /dev/sdb Ubuntu -> otherwise minor adjustments are necessary

    Create Keyfile

    sudo su
    cd /root
    mkdir keyfiles; cd keyfiles
    dd if=/dev/urandom of=keyfile bs=256 count=1
    cryptsetup luksAddKey /dev/sdb ~/keyfiles/keyfile

    Mapper at startup

    sudo nano /etc/crypttab

    Add the following line

    sdb_crypt /dev/sdb /root/keyfiles/keyfile luks

    Automount

    Get the UUID of the disc

    sudo blkid
    Add entry to /etc/fstab
    /dev/mapper/sdb_crypt /mnt/sdb_crypt ext4 defaults 0 2

    Explanation fstab

    /mnt/sdb_crypt : It’s the mountpoint. You need to create it.

    ext4 : The partitiontype.

    USING EXISTING GIT REPO WITH OPENSHIFT

    2014-07-27 14:09:02 +0200

    Clone your git repository
    git clone
    Add openshift git repository as remote
    git remote add openshift -f
    Merging
    git merge openshift/master -s recursive -X ours
    Pushing your code to openshift repository
    git push openshift HEAD

    Setting endpoint address in cxf generated client

    2014-07-11 00:00:00 +0200

    Sometimes you have to work with somewhat broken WSDL files. Here’s a little code snippet to override the service location:

    import javax.xml.ws.BindingProvider;
    import java.net.URL;
     
    final MyService service = new Service(new URL("http........?wsdl")).getMyService();
    BindingProvider bp = (BindingProvider) service;
    bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http......");  //without ?wsdl

subscribe via RSS