Last time I blogged about the relevance of monitoring and diagnostics in production to solve incidents quickly and prevent future problems. This time I'll talk about tuning based on evidence.
If an application turns out to be too slow, tuning can provide a solution. Tuning can take place on multiple levels. Adding hardware can be a cheap solution. However, when you add hardware at a place where the bottleneck is not located, this has little use.
(more...)
Tags: Java, Performance, tuning
Filed under Java, Performance, Tools | 1 Comment »
If you happen to be in the business of writing software serving XML documents or consuming XML documents - and if you read this post, then there is a fair chance you are - then there is always one big challenge: how do you make sure your service or client is capable of dealing with all of the XML documents you could possibly expect to be passed around?
And if you happen to come from the test-driven world, the answer is obviously: by testing it. However, if you try to do that, things might be harder than you expect at first.
What about schemas?
Tags: Java, XML, XML Schema
Filed under Java | 5 Comments »
Maven archetypes are an excellent way of allowing people to create instances of a particular type of project without having them to know or worry about all of the peculiarities and details. (And the latest incarnations of the Maven Archtetype Plugin are actually way better than I realized: somewhere down the line, they introduced the ability to use Velocity templates for parameterizing the output. Nice!)
(more...)
Tags: Java, Maven, Maven archetype
Filed under Java, Maven | No Comments »
Last time I blogged about the importance of representative performance testing. Having production-like properties for hardware, OS, JVM, app server, database, external systems and simulated user load are essential to prevent bad performance surprises when going live. In addition, I described how cloud computing can be utilized to generate high loads on-demand without having to worry about the infrastructure.
Continuous performance testing
With a representative test as one of the last steps before going live we prevent that expensive bad-performance surprises will pop up in production. However, the same surprises will pop-up, only earlier and with less impact. To save costs and prevent large architectural refactoring, it is crucial to test for performance as soon as possible. This is just like any other software defects and Quality Assurance: the later in the development process defects are detected, the more costly these defects are.
At a popular web shop I had the following challenge: (more...)
Tags: Java, Performance, Quality Assurance
Filed under Agile, Architecture, Java, Performance, Quality Assurance, Testing | No Comments »
Recently, I was writing an Annotation Processor for the @Composite project. In good TDD fashion, that first and foremost meant writing some tests.
Although I in the end come across something that was fairly workable, it was trickier than one might have hoped for.
Tags: annotation processor, Java, model api, Testing
Filed under Java, Testing | 3 Comments »
Recently I had to get JAX-WS based webservices running on Weblogic 10.3. However instead of using the default Weblogic 10.3 stack (Metro), the Apache CXF stack had to be used. Why? We required SOAP over JMS capabilities and that is possible with CXF without much effort.
(more...)
Tags: Java
Filed under Deployment, Frameworks, Java, Maven | 3 Comments »
This entry is about JAVA_HOME. (Yep, you read that right.) I never imagined I would ever write a post on an environment variable, but - hey - I have been breaking my jaws on this one for a while, so I figured there are probably a couple of other people happy to learn about the solution.
Tags: Java, java_home, macos
Filed under Java | 3 Comments »
A while ago, I compared Preon with Erlang's bit syntax. I looked at one one of the examples from "Programming Erlang" in particular; an example that illustrates how to decode MPEG headers using Erlang. However, this is not the only example in that chapter, so I decided to take a stab at one of the other examples as well.
Tags: annotations, bit syntax, erlang, Java
Filed under Java | No Comments »
Geertjan Wielenga has been trying to pull me back into the NetBeans community for a couple of years in a row now. I admire his perseverance; if this is typical for the whole NetBeans team, then Eclipse is going out of the window some day soon.
Tags: fluent interface, Java, netbeans
Filed under Java | 11 Comments »
Some months ago I attended a presentation at which Wilfred Springer demonstrated his very cool Preon binary codec library. Defining binary file formats in Preon requires quite a lot of fairly repetitive sets of annotations, and during a chat after the talk Wilfred mentioned (in fact, he blogged about it) how much more convenient it would be if one could just define "shortcuts":
@RequiredEnumProperty(column = "AGENT")
for
@NotNull @Column(name = "AGENT") @Enumerated(EnumType.STRING)
for instance - and use those instead. Sort-of "macro annotatations" for Java, if you like.
A thought that has presumably also occurred to many frequent users of Hibernate, JAXB or other annotation-heavy frameworks.
Well, it took me rather longer than the couple of days it would probably have taken a developer of Wilfred's skill, but finally @Composite is here! (more...)
Tags: annotation, composite, Java, macro
Filed under Java, Spring | 6 Comments »