• RESTful error handling with Tomcat and SpringMVC 3.x

    Updated: 2011-07-31 22:08:59
    Handling errors in a REST way is seemingly simple enough: upon requesting a resource, when an error occurs, a proper status code and a body that contains a parseable message and using the content-type of the request should be returned. The default error pages in Tomcat are ugly. Not only they expose too much of [...]

  • Simple Logging HTTP Proxy with Grinder

    Updated: 2011-07-31 05:37:49
     Sometimes I need to observe HTTP communication between my and another machine. I usually use Eclipse’ integrated TCP/IP monitor for it’s simple and does its job well but today for a large response it just displayed “The HTTP content is too large to display.” so I started searching for alternatives and found the Grinder TCPProxy, written in Java and distributed under the BSD...

  • Do you need to move from Spring to Java EE 6?

    Updated: 2011-07-31 05:00:00
    I read an interesting post last year - “Moving from Spring to Java EE 6: The Age of Frameworks is Over”.  I am sure, everyone would have its perspective on the above blog and here are my views on this. But before that, let’s step back and look and why frameworks like Spring was invented in the first place. In my view, primarily it was created as an alternative to J2EE stack, to keep it...

  • Avoid Escaping Spaces in the Query String in a Solr Query

    Updated: 2011-07-30 18:51:26
    Following up on the previous post about escaping values in a Solr query string, it’s important to note that you should not escape spaces in the query itself. The reason for this is that if you escape spaces in the query “foo bar”, the search will be performed on the term “foo bar” itself, and not with “foo” as one term and “bar” as the other. This will only return...

  • When Will Your Company Move To Java 7?

    Updated: 2011-07-29 07:51:57
    You've waited years for the next release of Java, and it's finally here. The first release under Oracle's watch bring some really nice features into Java, including language changes to simplify code and increase productivity, an API for parallel program execution over multiple cores, some much needed I/O API changes and improved support for dynamic...

  • Java, GlassFish, JavaMagazine ... all one Version-Number up!

    Updated: 2011-07-29 07:27:48
    What a day. It all started roughly two hours ago. I don't know, if it was Mark Reinhold or Henrik Ståhl or Terrence Barr or even the Oracle press release. But no matter who was the first to push the news: Java 7 is now GA. James Sugrue

  • Java 7 has been released!

    Updated: 2011-07-29 07:25:45
    Five years after Java 6, Oracle has just released Java 7 ! This is the first release of Java since Oracle bought Sun Microsystems. This new version of Java introduces a lot of new features, but some of the languages new features will be introduced in Java 8 as stated by the “Plan B”.In this version, there some great new language features, as stated by the JSR 334 : ...

  • Java Tools for Source Code Optimization and Analysis

    Updated: 2011-07-29 05:09:11
    Below is a list of some tools that can help you examine your Java source code for potential problems: 1. PMD from http://pmd.sourceforge.net/ License: PMD is licensed under a “BSD-style” license PMD scans Java source code and looks for potential problems like: James Sugrue

  • After Five-Year Drought, Java SE7 Is Here

    Updated: 2011-07-29 03:26:28
    Java SE 7, the Java Platform, Standard Edition 7 is out. It’s the first major release in five years and took 9,494 bug fixes, 1,966 enhancements, 9,018 changesets, 147 builds and four JSRs to get here. It’s also the first release of the Java platform under Oracle’s stewardship, and threatened not to happen until Oracle put its foot down and went off and wheeled and dealed and leveraged IBM. (Remember the Apache Foundation stalking off and slamming the door?) Still, it’s based on the open source OpenJDK, making it something of a novelty for a commercial release. read more

  • JavaScript: The Definitive Guide

    Updated: 2011-07-28 19:25:40
    All in all I think this a great book. It will be on my desk for the next few years until I need to replace it with the 8th or 9th version. This book has delivered exactly what I was hoping for, an in-depth look into modern day JavaScript. I rarely use JavaScript nowadays in my day to day job. I have been lucky to avoid the messy browser applications it is usually a part of the past few years. That was my primary reason for buying the book. Although I may not like it, JavaScript is here to stay, and I need to keep current with it.read more

  • Thank You, Java Annotation!

    Updated: 2011-07-28 16:45:00
    This was an interesting bug… I was working on a Web application, where Adobe Flex client was sending an instance of an ActionScript WrapperObject to the Java server, which was supposed to invoke some JBDC code to run an SQL Insert statement saving the data from the Java version of WrapperObject in the database. I wrote all the pieces of Flex, Java, and SQL and started Tomcat in Eclipse IDE. The Web browser displayed my window, I filled out the form populating the ActionScript WrapperObject and pressed the button Save. Nothing happened. No errors and no data inserted in the database. read more</p

  • Oracle Gets to Depose Larry Page

    Updated: 2011-07-25 17:38:38
    Oracle is going to get the face time with Google CEO Larry Page that it wanted. Page has been ordered to sit still and answer Oracle’s questions about those Java licensing talks Google had with Sun during a two-hour deposition. Oracle is supposed to limit its questions to “topics relevant to the willfulness of defendant’s alleged patent infringement, and the value of Android” to Google. Google said last week that it rejected Sun’s proposal that Google pay $100 million in royalties to use Java in Android. A Google lawyer described the offer as a co-development deal, rather than a patent license despite an internal e-mail written by Android founder Andy Rubin saying Google needed a Java license. read more

  • Java PaaS Start-up Gets $10.5 Million

    Updated: 2011-07-25 17:38:37
    CloudBees, the Java PaaS start-up founded by former JBoss CTO Sacha Labourey, has gotten a $10.5 million B round eight months after its $4 million A round that had JBoss founder Marc Fleury take a piece of the action. The new round was led by Lightspeed Venture Partners with the participation of existing backer Matrix Partners. CloudBees only launched in November with a platform for developing, running and managing enterprise Java apps in the cloud. The widgetry currently includes DEV@cloud, a service that lets developers take their build and test environments to the cloud, and RUN@cloud, which lets them deploy those apps to production on the cloud. read more

  • ActiveJDBC: New Java ORM

    Updated: 2011-07-18 22:37:00
    When I learned Ruby on Rails, I was first and foremost impressed with ActiveRecord. For those who do not know ActiveRecord, it is a Ruby on Rails’ ORM layer, which is an equivalent to Hibernate in Java. However, ActiveRecord is easier to work with because it is based on conventions rather than configuration, and also it configures itselt at start time based on structure of data in the database. I was so impressed with ActiveRecord, that I was sure someone would implement it in Java, but after waiting a couple of years, I put a stop to wait and implemented it myself (with help of a few friends).read more

  • ★ Enumeration Mapping in Hibernate

    Updated: 2011-07-11 04:25:51
    In this simple tutorial i will show you, how to map a Java 5 Enumeration (enum) to a varchar column in Hibernate. The use-case that i'm going to demonstrate is very simple, I have a User class which has a reference to an Enumeration Gender. Gender Enumeration User Domain: Hibernate Mapping (HBM): By default Hibernate [...]

  • Java 7&#8242;s Fork/Join Framework

    Updated: 2011-07-10 07:24:27
    Eric Bruno: Fork/Join is an enhancement to the ExecutorService implementation that allows you to more easily break up processing to be executed concurrently, and recursively, with little effort on your part. It's based on the work of Doug Lea, a thought leader on Java concurrency, at SUNY Oswego. Fork/Join deals with the threading hassles; you just [...]★

  • Converting JSON to XML

    Updated: 2011-07-06 12:12:48
    I have been working on a validation tool that would allow us to validate JSON messages. I could not any usable JSON validator in Java so I have decided to use RelaxNG. It had one catch. RelaxNG is designed for XML validation, not JSON. That's the reason why I have decided to convert JSON to [...]

Current Feed Items | Previous Months Items

Jun 2011 | May 2011 | Apr 2011 | Mar 2011 | Feb 2011 | Jan 2011