Java Web Services and XML
I decided to write down the answer for some questions which my book's readers email me or ask me via twitter in my weblog so everyone can benefit from the answers. Here is the answer to the first question which involves custom security realms.
GlassFish supports 5 types of security realms out of the box which are sd follow:
File Realm: Usefull for development and testing purposes. GlassFish...
on May 18, 2010
Do you remember the email you got to tell you that your jre had a vulnerability? No? What about the fact that Java 5 is in an end of life phase. Given the time it has taken for Java 7 to appear its has somewhat slowed the normal EOL pace of the Java platforms. You may not know that Java 1.4.2 for business will be supported commercially until April 2018, which is kind of mind-...
on Apr 28, 2010
On Twitter, I saw that an audio-only edition of Justin Kestelyn's February 16 Tech Cast Live interview with Mark Reinhold is now available. To see the interview as well as hear it, visit https://channelsun.sun.com/media/show/15028.
on Feb 24, 2010
Dalibor Topic has posted an updated OpenJDK roundup: The last roundup was two weeks ago, so it's time for another one.
The JDK 7 project released build 79. The list of changes for this build has bug fixes for compressed oops, G1, more work on JSR 292 and build infrastructure for modules. In the Jigsaw project, Mark Reinhold posted a draft for a simple file format for modules. Over in the Da...
on Jan 20, 2010
Last June, Arnold Schwaighofer push a patch to mlvm repository that
allow to transform tail call invocation
of a method to a jump.
Even if this transformation is classical in language like Lisp, Scheme or Caml,
the JVM was not offering any help to optimize this kind of call until this patch.
Recently, Tom Davies
the patch in order to be used with a more recent...
on Dec 18, 2009
Mark Reinhold recently blogs about the renaissance of
closure in Java (*).
In his blog, he also wrote that in order to have closures in Java,
Java will have to include another feature named
As you may already know, I'm a big fan of closures but
the introduction of extension methods in Java really scary me.
* Ok, they are more lambdas than closures.
on Nov 28, 2009
Java VM embodies
(not in production, in a hacking mode :),
This post shows how to write a non-blocking server with continuations.
Why using continuation with non blocking IO
There are two models when you deals with IO:
the thread model: read and write calls block until they at least read one caracter or write the whole buffer,
so one use thread to be able to...
on Nov 22, 2009
Lukas Stadler is my hero, at last JVM summit, he just explain how coroutine and friends can be implemented in the VM and guess what, it now works (currently only with C1).
Let's try to implement something with it.
I have always wanted to have generator in Java. After all, Python have this feature, Ruby and C#(*) too.
A generator is a way to define an iterator but instead of...
on Nov 19, 2009
Today, a tantalizing announcement by Mark Reinhold about closures in Java 7 has made its way through the twittersphere.
On the same day, Neal Gafter updated his closure proposal (known as the BGGA proposal, named after the initials of Bracha, Gafter, Gosling, and von der Ahé, and not at all related to the B. G. G. A. organization).
Presumably the timing is not a coincidence.
on Nov 18, 2009
During the JVM Summit, I was doing some tests for
my presentation with the latest
when I've seen some *BIG* performance improvement between jdk7 b71 and jdk7 b72.
A quick look to the summary of changes, hum,
Escape Analysis is now enabled by default.
On my tests, I got a 3x improvement, Wow !
With a quick micro-benchmark, it's even better, as always :)
on Oct 6, 2009
Yesterday, a Hudson committer Alan Harder discovered an EOFException in Hudson, which only happens on 64bit JVM on Solaris. This was happening in the part of Hudson (or more precisely, in a separate library called Akuma) where we look at the memory space of the process to figure out the command line arguments of the current process (the /proc/ID/as file — an equivalent of /proc/ID/mem in...
on Sep 17, 2009
Joe Darcy has revealed the changes accepted to be included in JDK7 on coin-dev mailing list
And the final Project Coin changes accepted are:
Improved Type Inference for Generic Instance Creation (diamond)
Simplified Varargs Method Invocation
Strings in switch
An omnibus proposal for better integral literals
on Aug 29, 2009
Maurizio Cimadamore has just push a patch that enable to use diamond syntax to instantiate a generics.
The diamond syntax is one of the changes introduced by the
coin project and
is the first one introduced in jdk7 repository.
The diamond syntax allows to instantiate a generic type without specify the
type argument, the compiler will infer them using the context.
on Aug 27, 2009
Two months ago, I was discussing with a friend about
dynamic languages and JSR 292 when he mentions
DLR Expression Trees.
At that time, I had a vague memory,
mostly because I was under the effect of a
persisting jet lag, when I attend the talk of Mads Torgersen
about it at last year JVM Summit.
By the way, I will attend the next
JVM Summit in September,
I have some good...
on Jul 31, 2009
I've just released the first version 1.0.1
(1.0 is compiled for 1.6 only) of the
So you can now test invokedynamic and method handle invocations
without using the latest patch queue from mlvm repository
and some wizard's black magic.
The primary usage of the backport is for dynamic language runtime
developers (JRuby, Jython, Groovy, etc),
they can now use...
on Jul 1, 2009
Here is the text of the message I recently sent to the JSR 255
Expert Group, in my capacity as Specification Lead.
I'm sure that you saw some months ago that our work on JSR 255
will not be part of the JDK 7 release
decision was made here at Sun in order that some of the higher
on Jun 16, 2009
Great news, ASM 3.2 is released (Extended changelog).
This new version includes the support of the new bytecode instruction : invokedynamic, introduced by JSR292.
ASM supports of invokedynamic
From ASM point of view, invokedynamic is a method call instruction emittable/trappable by calling/overriding visitInsnMethod of a MethodVisitor like any other invoke* bytecode...
on Jun 11, 2009
Roman and Mario made a tremendous work on cacio bits in last few days. I personally love that final image with Duke riding the horse. :)
Here are the slides for the talk.
Thanks everyone for joining us that evening!
on Jun 8, 2009
Entry posted to my new blog.
on Nov 9, 2009
Let me introduce a new language named pseudo (Why this name ?
Why another language ? Why God ? all these questions will be answered
in a later blog).
One great feature of this language is that it allows
i.e. you can assign a type to a parameter, a local variable, etc.
If a variable as no type, the compiler consider it as any.
You can assign any value...
on Nov 1, 2009