JNDI lookup Wildfly and Spring

A quick reference to load JNDI resource from Wildfly application server. Let’s do this with java api and spring.

Adding JNDI resources to wildfly

First, edit standalone/configuration/standalone.xml and add this lines into subsystem.

<subsystem xmlns="urn:jboss:domain:naming:2.0">
        <simple name="java:global/MyString" value="MyValue"/>
        <simple name="java:global/MyNumber" value="100" type="int"/>

Seguir leyendo

Prevent execute apps when do login in MAC OS X

Some applications in OS X are launched by default even if you disabled in the preferences on that app.

To prevent some of this apps are executed when you login you must edit a file with extension plist.

Go to the launch agent folder and after the tag RunAtLoad set tag <true/> to <false/>

cd /Library/LaunchAgents/


SAP PI AES encryption in Message Mapping

I developed a simple UDF (User Defined Function) in Java to crypt  and decrypt some text data in my message mapping, first into section ‘Attributes and Methods‘ I setted static constants for AES and I used a method to “normalize” the string text for crypt and decrypt with the method fixedLengthString.

I don’t know why but if I didn’t this the decryption does not work, the method only get the first 16 characters and apply a String format.

This is the code: Seguir leyendo

Oracle change initial password with sqlplus

A quick tip, at the first login in DB you must to change the initial password but some tools cannot do this, for example dbeaver.

Then you need to download sqlplus from oracle and unzip it in some place:


Open an terminal and go to sqlplus folder and execute:

sqlplus.exe /nolog

And connect witth one of this:


conn USER/PASS@host:port/SID


Mac OS X set Terminal color theme

A few days ago I had been upgrading my OS X with a fresh install, the default theme in terminal is very poor if you work with the console, to change the theme you can configure the colors.

First, edit your  “~/.bash_profile“, if don’t exists create new one, and add this content:

export TERM="xterm-color"
alias ls="ls -G"
export PS1="\e[1;30m\][\e[\e[1;30m\]\e[1;33m\] \u@\H \[\e[1;32m\]\w\[\e[0m\] \e[1;30m\]]\n[\[ \e[1;31m\]\T\[\e[0m\]\e[1;30m\] ] > \e[37m\]"

Now, you can download a preconfigured themes from:


Select one and open it with double click (files with “.terminal” extension), now change the terminal preferences, in Profiles section select your profile and set as Default.

I use the Nova theme in my laptop: