Thursday, November 1, 2012

Fun at Java One in San Francisco and after

Beside having fun in San Francisco, I've presented at Java One with my more experienced colleague Mitesh Meswani! Recording of our BOF2737 "Developing Multitenant Applications with HK2 2.0 and EclipseLink" session is available here, see Media on right pane.

It was my first talk, and it went quite smoothly, due to small audience :) But the number (20) matched our expectations! HK2 is definitely not so known and sexy, as HTML5, NoSQL and Scala. But we've got something to go on.

Looks like there is no much demand for sharing run-time between tenants. However data isolation draws big interest, so including EclipseLink, was useful for the audience.

From other hand many people think of multi-tenancy in the same way - running single instance of the application for multiple clients. That's great! And everybody tries it differently.

It's worth to mention IBM's CON6465 - JVM Support for Multitenant Applications
talk about multi-tenant JVM. But beside IBM there is Waratek that does very good job in context of multi-tenancy in JVM too, but I have not seen their session, if there was any. And there might be more of course.

Other, not related to multi-tenancy but to CDI, CON7780 - Designing Java EE Applications in the Age of CDI, draw my interest. And caused to check that it's also possible to @Inject Logger with HK2! See my git commit#4dcad7b6e3 for example!. However, it brought rather difficult problem, multi-tenant logging. Well, there are much more problems like this, of course.

Also, I liked Venkat Subramaniam the most! And again, his CON3454 - Concurrency Without Pain in Pure Java makes me to highlight that HK2 also provides STM without pain in even more pure Java. In order to change any configuration element, one must start a configuration transaction that ensures restricted access to the configuration. The following demonstrates transaction invocation for mutating injected configuration object:

@Inject
HttpListener httpListener;

ConfigSupport.apply(new SingleCodeCode<HttpListener>() {
        public Object run(HttpListener wListener) {
                wListener.setPort("8080");
        }, httpListener);


Hopefully there will be something more, stay tuned!