Tuesday, January 03, 2012

strange java hibernate story from today

today I was developing a new request from customer. its not a big issue just adding a new Boolean field will cover the request and will work happly ever after. I added my new "isActive" field into hbm xml then pojo. and started the app in windows with tomcat maven plugin. there was nothing wrong hibernate started up smoothly and update the table and added my new field into the persistent level. I like hibernate more, everyday :)

its just like a dog. best friend of men. which helps for everything and expects only our love :D anyway I decided to deploy our new class to server which runs weblogic 11g. I went to ssh and run "svn up" then "mvn install" then went back to weblogic console for updating our big webapp. then I gave the path of war and said update then started the app. then started waiting log to come and make me smile :) and it said there is no getisactive function in the class. I just added and run in my laptop it was working fine. how the hell it happens I have no idea. java and oracle has a lot issues and terminology and keywords. I probably clash with one of them.

then I convert my field name to XboxActive and changed function names respectively. then without trying in my laptop directly deployed it. and it started working. sometime I dont have the power to investigate all details of a problem. and this is one of them :)

just a simple note dont use "isActive field ine a complex hibernate spring project if it runs on weblogic" :)

Sunday, January 01, 2012

publishing and reading from jms

simple java class for reading and writing to weblogic jms.

swt and maven example

Swt does not come from maven repo with the latest version. but you can use this pom to use latest swt version  from nexus testing repo.

pom.xml:

for a working example eclipse project visit this

Sunday, December 04, 2011

chrome code completion ability for canary

I just learned google chrome canary. its kind of an experimental version of google chrome browser. anyways while I was checking out. I saw new code completion ability and I love it.

chek this out:

chrome used to have code completion but not like this selecting from list I love it.

Wednesday, July 06, 2011

java turkish currency

I was implementing some stuff in java and there I needed to show number as currency in turkish. here it comes


NumberFormat nf = NumberFormat.getCurrencyInstance(new Locale("tr","TR"));
System.out.println(nf.format(123));


output:

123,00 TL

in default jvm thinks you choose US or it will check the system current environment. but if you like to change it. you can do the code above.

Saturday, June 18, 2011

history of email

this is a lovely picture. its about invention of email how it comes till today.

Thursday, June 02, 2011

java regex pipe problem

I was trying to split a string to an array. and the special character was | (pipe).

String[] incomings=income.split("|");


and here is the out for income="abcd|efg"


{"a","b","c","d","e","f","g"}


then I understand that this pipe char turns this issue an regex one and doing some strange stuff :) after some research I found the solution. here is the solution for regex pipe


incomings=income.split(Pattern.quote("|"));


this makes the output for same situation like this:

{"abcd","efg"}


lovely

speed test hyperoptic