submited by krishnas on Thu Nov 29th, 2007
xml
This article introduces a Java-XML binding technique based on VTD-XML and XPath. This approach doesn't mandate a schema, takes advantage of XML's inherent loose encoding, and avoids needless object creation, so it is much more efficient for lightweight data binding....
more »
submited by krishnas on Thu Nov 29th, 2007
j2me soa
S3 is a file storage and serving service offered by Amazon. In this article, Eric Heuveneers demonstrates how to use Amazon S3 via its simple REST API to store and serve your own documents, potentially offloading bandwidth from your own application....
more »
submited by krishnas on Thu Nov 29th, 2007
xml
tried to find a solution for customizing an XStream instance for my ActiveMQ XStream message transformer that would be better than currently used (extending a base transformer and providing a custom factory method that will…...
more »
submited by krishnas on Thu Nov 29th, 2007
xml groovy
Groovy builders concept for handling (mostly creating) hierarchical documents. On the other hand I find StAX, pull-based processing API, to be one of my favorite methods for dealing with simple XML processing. It's simple and fast, so…...
more »
submited by krishnas on Thu Nov 29th, 2007
java
Having introduced SwingLabs' JXMapViewer and JXMapKit in a previous article, Joshua Marinacci puts these components to work by showing how you can bring in geographic data from external sources and use Painters to create custom geodata GUIs....
more »
submited by krishnas on Thu Nov 29th, 2007
java
I am glad to say that in most cases, I do not write a persistence.xml file any more. No, I am not using any IDE to generate it for me, nor has the spec relaxed any requirement. We will discuss some other time why persistence.xml is a necessary evil. Then what has changed? Well, my compiler creates it for me - yes, I said javac creates it for me. When I execute
javac -d . -classpath ... FooEntity.java BarEntity.java Main.java...
more »
submited by krishnas on Thu Nov 29th, 2007
java
I've bumped into consistent hashing a couple of times lately. The paper that introduced the idea (Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web by David Karger et al) appeared ten years ago, although recently it seems the idea has quietly been finding its way into more and more services, from Amazon's Dynamo to memcached (courtesy of Last.fm). So what is consistent hashing and why should you care?...
more »
submited by krishnas on Thu Nov 29th, 2007
java5
Recently I was writing an annotation processor that would generate a persistence.xml file when I compile my JPA entity classes. If you are a Java Persistence API user, then you may actually be interested in that annotation processor. OK, enough of shameless self promotion. Coming to the issue I want to discuss in this blog... While writing the annotation processor, certain things did not happen as per my expectation. I will share them with you so that you won't waste time as I did. All those issues are generic in nature....
more »
submited by krishnas on Thu Nov 29th, 2007
spring java java5
It is now possible to configure Spring's dependency injection with annotations. This means that annotations can be used in Spring to mark fields, methods and classes that need dependency injection. Spring also supports auto-wiring of the bean dependencies, that is, resolving the collaborating beans by inspecting the contents of the BeanFactory. Now there are annotations that can be used to indicate fields that are to be auto-wired. Furthermore, auto-detection of annotated components in the classpath is also supported now. When these capabilities are combined, the amount of configuration and dependency mapping in the Spring configuration files is reduced drastically....
more »
submited by krishnas on Wed Nov 28th, 2007
groovy
Inserting variables into templates and then generating files from them, via Ant, is not new. Groovy has support for this too. How does it compare to the alternatives?...
more »