Shaaf's blog

A technical blog about Java, Kubernetes and things that matter

Logging with log4J isDebugEnabled

Excerpt: Alot of times I have seen the questions popping up whether to use isDebugEnabled property or not. Arguably most of the times or rather always about performance. Some of the stuff that I feel important about using it follows.

Alot of times I have seen the questions popping up whether to use isDebugEnabled property or not. Arguably most of the times or rather always about performance. Some of the stuff that I feel important about using it follows.


Keep it simple, short and stupid (KISS)

everything should be made as simple as possible, but no simpler - Albert Einstein

I am sitting in a design room today designing a simple requirement for a client. He wants me to enhance the transfer money from one account to another. Just that it happens that I have my best friend Yuky sitting right next to me. He is damn good in Maths and extra ordinarily knows all the calculations on his tips. I am sure if I had asked him what was the angle of sight to the light on the wall he could just tell me in a few seconds looking with 10 eyes at his 12 fingers, trust me it will be correct.


Automation with Selenium,Junit, Ant

Much of the technologies above do not or will not need an introduction if you already know them or can read them from the links above.

More over today’s article is more about how we can use all the three selenium, ant and junit to come up with an automated solution for regressive testing.

Please refer to the documentation links above for the basic knowledge on any of the used tools.


Calling wsadmin scripts from ant

You can simply add the following to a target. For the following wsadmin should be in your PATH env.

< exec dir="." executable="wsadmin.bat" logError="true" failonerror="true" output="wsconfig.out" >
	< arg line="-lang jython -f ../../createQFactory.py"/ >
< /exec >

All output will be logged to wsconfig.out


Generate XML - DBMS_XMLGEN

On my way to my solution store just found this nice to use, old and easy feature. Possibilities endless, usage typically very easy.

I used the following to generate XML from sqlplus:

select dbms_xmlgen.getxml('select * from user') from dual;

Output: < ROWSET > < ROW > < TNAME >Employee< / TNAME > < TABTYPE > TABLE < / TABTYPE > < / ROW > < / ROWSET >