Cross-posted from Zolo Labs.

There is a spectrum of productivity when it comes to programming languages. I don’t really care to argue how much more productive dynamic languages are… but for those who buy that premise and want to learn a hyper-productive language, Clojure is a good choice. And for someone who has a Java background, the choice Clojure becomes the best one. Here’s why:

  • Knowing Java – obviously useful: class-paths, class loaders, constructors, methods, static methods, standard libraries, jar files, etc. etc.
  • Understanding of the JVM – heap, garbage collection, perm-gen space, debugging, profiling, performance tuning, etc.
  • The Java library ecosystem – what logging framework to use? what web-server? database drivers? And on and on….
  • The Maven situation – sometimes you have to know what’s going on underneath lein
  • Understanding of how to structure large code-bases – Clojure codebases also grow
  • OO Analysis and Design – similar to…

View original post 175 more words

SOA Community Blog

Beginning next week, SOA Proactive Support will begin posting a series of introductory blogs here on working with JMS in a SOA context. The posts will begin with how to set up JMS in WebLogic server, lead you through reading and writing to a JMS queue from the WLS Java samples, continue with how to access it from a SOA composite and, finally, describe how to set up and access AQ JMS (Advanced Queuing JMS) from a SOA/BPEL process.

The posts will be of a tutorial nature and include step-by-step examples. Your questions and feedback are encouraged.

The following topics are planned:

  • How to Create a Simple JMS Queue in Weblogic Server 11g
  • Using the QueueSend.java Sample Program to Send a Message to a JMS Queue
  • Using the QueueReceive.java Sample Program to Read a Message from a JMS Queue
  • How to Create an 11g BPEL Process Which Writes a Message…

View original post 146 more words

Stumbling into Java

Well, if your WAR file is too big (thanks to generous inclusion of jar files from all opensource projects you could find) … and deployments take too long … this is what you do.

  1. Remove the jar files from /WEB-INF/lib from your project, so they are no longer a part of the WAR file
  2. Copy the jar files to say, {TOMCAT_HOME}\common\lib\myprojlibs
  3. edit catalina.properties file in {TOMCAT_HOME}\conf … add to class.loader this path … ${TOMCAT_HOME}\common\lib\myprojlibs\*.jar
  4. Remember to add the $ and no ;s etc.
Regenerate the war (will be too small now … don’t worry) … deploy the new war file and restart Tomcat
That’s all there is to it. Don’t panic it your hour long deployment process now only too 2 minutes.

View original post

How to do in JAVA

All of us have come among situations when we have to parse user input for validation. Other fields such as text or numeric are rather easy, but date date validation is little bit difficult and a small error can leave the application in unstable state.

Usually, SimpleDateFormat‘s parse() method is used for validation. If parse() method is able to parse the date, then it is considered that input is valid. Well, it might be incorrect. See below a use case.

Strange for two reasons. First, it should have flagged the validation error, and second the date object obtained is completely useless. So, what went wrong here.

Well, error is in parsing logic. parse() method uses positions of pattern keywords in DATE_PATTERN and uses it to parse input string. It is not intelligent by default to use the right characters for parsing and it uses what comes on its way…

View original post 173 more words

Krishna's Blog

Typically you do HTML parsing in Java for various reasons like JUnit testing, Web Crawling and others. I stumbled across JSoup and tried few things to understand its capabilities. If you do some googling you can come across few good articles in Stackoverflow like, What is a good java web crawler library? and JSoup vs HttpUnit.

I had already worked with HttpUnit extensively. I felt that JSoup is better than HttpUnit. Let me demonstrate few of the capabilities of Jsoup in this blog,

Connecting to any website and parsing the data from that website into a DOM tree is as simple as,

Where the integer value passed in the parse method is the timeout period set to return downloading from the site if it takes more time.

If you want to retrieve a table or a div from the DOM tree you do as below,

If you want…

View original post 234 more words


My last employers software development team recently took up the challenge of writing their tests before writing the functionality for which the test was written. In software development, this is known as Test Driven Development or TDD.

TDD is a hard concept to get developers to embrace. It’s often as much of a paradigm shift as persuading a procedural programmer to start creating Object Oriented designs. Some never get it. Fortunately we had a very talented bunch of developers, and they’ve taken to it like fish to water.

The first thing to clear up is that TDD is not primarily about testing, but rather it forces the developer to write code that is testable (the fact the code has tests written for it and running regularly is a side effect, albeit a very positive one).

This is why there is often some confusion about TDD and the fact it or…

View original post 520 more words

Business & Money

The ability to motivate employees is one of the greatest skills an entrepreneur can possess. Two years ago, I realized I didn’t have this skill. So I hired a CEO who did.

Josh had 12 years in the corporate world, which included running a major department at Comcast. I knew he was seasoned, but I was still skeptical at first. We were going through some tough growing pains, and I thought that a lack of cash would make it extremely difficult to improve the company morale.

I was wrong.

With his help and the help of the great team leaders he put in place, Josh not only rebuilt the culture, but also created a passionate, hard-working team that is as committed to growing and improving the company as I am.

Here are nine things I learned from him:

  1. Be generous with praise. Everyone wants it and it’s one of the easiest…

View original post 602 more words