Building a simple java client for forecast.io
I like to be outdoors when life allows so weather is always an interest for me. So i was very pleases to see forecast.io becoming available with global coverage after being jealous of the US only "DarkSkys" app. It was also nice to see that there is a nice (more...)
wadl2java 1.1.4 released
We have released a new version of the wadl2java tool today with a bunch of new features and bug fixes. Again thanks for Pavel Bucek from the Jersey team for his continual help, and for the contribution from my JDeveloper team mate Michael Bachand.
New Features:
New Features:
- Added support for generating (more...)
Using UriTemplate to change path parameters in a URI
I have been recently working on a client generator in the wadl.java.net project and I was solving a bug where I wanted to change path parameter on a URI. This turned out to be quite easy with existing classes that are part of the Jersey project.
First of (more...)
First of (more...)
A little temporal feedback when running tests
I have been working a lot recently with a bunch of test jobs that are intermittently getting stuck. Now it is possible to work out the point where the problem is occurring by looking at the date labels on the LOG output; but it is hard visually to pick these (more...)
Proxying a request to localhost in Java
It can be very convenient when developing to server based application to run them using "localhost" in order to maintain consistency between developer machines. This is normally a good idea but there is a small case where this can cause problems.
Consider if you are running a local http proxy (more...)
Consider if you are running a local http proxy (more...)
JSON-Schema generation in Jersey
So in my previous post I talked about a proposal to allow the use of JSON-Schema in a WADL, this post looks at how to get this working with a recently build of Jersey. You are going to have to download / reference 1.16SNAPSHOT until 1.16 is released.
(more...)
(more...)
JSON-Schema in WADL
In between other jobs I have been recently been reviewing the WADL specification with a view to fixing some documentation problems with a view to producing an updated version. One of the things that because apparent was the lack of any grammar support for languages other than XML - yes (more...)
Using Hudson/Jenkins to diagnose that intermittent failure
I have been working on one of those intermittent bugs that just won't reproduce on my machine; but will reproduce intermittently on other machines while they are running automated testing. I filled the code with trace statements, now I suspect the problem is in code that I don't control and (more...)
wadl2java 1.1.3 released
So after a little bit of a pause we now have a new release of the wadl2java client generation tool. This is a wide range of improvements in this release; but the main feature is the new support for generating JAX-RS 2.0 client code.
This generated code is nearly (more...)
This generated code is nearly (more...)
So what credentials do you need?
One of the features that I am very proud of in the HTTP Analyzer in JDeveloper is the ability to test a SOAP service with the minimum of fuss. Rather than having to configure security headers and understand WS-Policy we make use of the WLS JAX-WS client to read and (more...)
Changing delay, and hence the order, in a DelayQueue
So I was looking at building a simple object cache that expires the objects after a given time. The obvious mechanism for this is the use the DelayedQueue class from the concurrency package in Java; but I wanted to know if it way possible to update the delay after an (more...)
Catch a StackOverFlowError by its tail
One of the more annoying situations you might have to deal with when working with a Java program is a StackOverFlowError, if you have a nice producible test case then there are few options with regard to playing with the stack size, or setting a conditional breakpoint / trace (more...)
try/with/resources refactoring that isn’t
So I was looking at refactoring some code to use the new try/with/resources construct and found that perhaps it is not as simple as it first appears.
class Close implements AutoCloseable
{
@Override
public void close() {
System.out.println("Close");
}
}
System.out.println("Normal version");
Close close = new (more...)
try/with/resource context class loaders
For various reasons I seem to end up writing a lot of code that fiddles with the context class loader in order to get non-module code running in the OSGi environment that JDeveloper runs in. This leads to a whole bunch of code that looks like this:
public void doSomething() (more...)
Ignoring the return value of a command in Hudson/Jenkins sh task
So I was was trying to run pylint and nosetest running on a Jenkins instance; but these python commands tend to return a non zero status code if they see a non zero return code. This is a problem as it means that any further steps are ignored. The most (more...)
Common try-with-resources idiom won’t clean up properly
So I was re-reading some blogs on the JDK 7 language changes and I noticed the following idiom seems popular:
That seems all well and good; but consider what happens should something goes (more...)
//
try (BufferedReader br = new BufferedReader(
new FileReader("/tmp/click.xml"))) {
System.out.println(br.readLine());
}
That seems all well and good; but consider what happens should something goes (more...)
Off-loading test execution using Hudson part 2
Previously I have written about using Hudson to perform pre-flights using branches on source control systems; but sometimes you just have a patch file that you want to run your tests against.
It turns out this can be quite simple, you just need to make use of a job parameter (more...)
RSS