Wednesday, April 11, 2012

Ant reset property value

Ant works with "first setter wins principle"  Ant properties accept the FIRST setting of the property as the definitive one. Thereafter, future attempts to set the property will be ignored. Properties therefore are not variables, but more like manifest constant definitions.

Monday, March 19, 2012

Jboss Logger

If you want to add a new category to your Jboss Log4j logger, you need to define a log variable in your code like:

>LogFactory.getLog("application-name");

and you should add a new category in jboss-log4j.xml file like:






and may be you can define a appender for log management :









Friday, March 16, 2012

Maven quick tips

mvn ant:ant                     ==> generate build.xml
mvn archtype:generate   ==> generate maven project ---->'generate archtype.goal'
mvn help:effective-pom ==> parent pom included

maven ====> has  3 lifecycle (1=clean 2=default 3=site)
               
clean has 3 phases
                1.1 pre-clean
                1.2 clean
                1.3 post clean

                       
mvn help:system variables can be accessed via ${env.key}

Sunday, March 11, 2012

Oracle XE: Changing the default http port

Need to run following command only:

SQL>connect user/pass@xe

SQL> -- set http port and ftp port
SQL> begin
2 dbms_xdb.sethttpport('80');
3 dbms_xdb.setftpport('2100');
4 end;
5 /

http://daust.blogspot.com/2006/01/xe-changing-default-http-port.html

Friday, March 9, 2012

How to export a schema to local Oracle XE

1-exp sourceUserName/sourcePassword@SID STATISTICS=NONE
2-imp destUsername/destPassword@xe file=expdat.dmp fromuser=sourceUserName TOUSER=destUsername

Change "tnsnames.ora"

Damn. I was trying to upgrade my local 10g XE to 11g. And suddenly I found myself in this situation. I could not change tnsnames.ora file because of a silly privilege. I inspected all the possible processes that might be using this file and googled for half an hour. So the solution is just as easy as right click and add modify privilege to the current user.

Tuesday, May 17, 2011

Hudson to Jenkins


After evil company acquired SUN, Hudson became a servant of them. So the good people thought that we have to survive in peace and be confident. And they re-branded our hardworking crew to Jenkins.
Long live new friend Jenkins!