Pencarian

Rss Posts

 

 

 

JSR 292 Goodness: Fast code coverage tool in less than 10k

Feb 12, 2011

JSR 292 introduces a new bytecode instruction invokedynamic but also several new kind of constant pool constants. Which means that most of the tools that parse bytecodes like ASM, BCEL, findbugs or EMMA will need to be updated to be java 7 compatible.
EMMA is a code coverage tool, a tool that helps developers to know if their tests cover all the code of the application. While it’s not the only code coverage tool available in Java, it’s the most popular from my personal experience.
In this blog entry, I would like to show how to write a simple code coverage tool indycov that use JSR 292 API to have a runtime overhead close to zero.

How a code coverage tool works ?

A code coverage tool records all paths taken when running the application and checks at the end if all lines of codes was recorded.
By example, if I run the code below with no argument, it will print "foo" and "bar" and the code coverage tool will say that the else branch that prints "baz" will be not covered.

public static void main(String[] args) {
    System.out.println("foo");
    if (args.length == 0) {
      System.out.println("bar");
    } else {
      System.out.println("baz");
    }
  }

To record if an instruction was executed or not, code coverage tools add a probe which is a small amount of bytecodes that will call the runtime of the tool to say: "I have visited this instruction".
In fact, tools, only add probes where necessary, at the begining of each basic block of the control flow. A basic block is a collection of instructions without any jump (return, thow, if, break etc).
By example, the code above has 4 basic blocks: the once printing "foo", the one printing "bar", the one printing "baz" and the one containing the return at the end of the method.

So a code coverge tool is a tool that find basic blocks and add probes at the begining of each one.

Using JSR 292 API to implement a code coverage tool.

Finding basic block is easy with bytecode that come from 1.6 or 1.7 compiler because the compiler is required to add stack maps
in the bytecode flow. Stack maps are used to verify the bytecode in linear time and are inserted at the join points of the control flow.
So finding basic block in a 1.7 compatible bytecode can be done in one pass thanks to the stack maps info inserted by the compiler.

All existing code coverage tools have an impact on the performance of the application because the code of the probe is executed each time you call a basic block even if it should be executed once.
If you are a regular reader of this blog, you already know how to create a probe that will be executed once. The trick is use use invokedynamic, to record the visit in the bootstrap method and
to use a target method handle that is equivalent to no-op. So subsequent call will not execute any code.

main([Ljava/lang/String;)V
    INVOKEDYNAMIC probe ()V [fr/umlv/indycov/RT#bsm, 1]
    GETSTATIC java/lang/System.out : Ljava/io/PrintStream;
    LDC "foo"
    INVOKEVIRTUAL java/io/PrintStream.println (Ljava/lang/String;)V
    ALOAD 0
    ARRAYLENGTH
    IFNE L0
    INVOKEDYNAMIC probe ()V [fr/umlv/indycov/RT#bsm, 2]
    GETSTATIC java/lang/System.out : Ljava/io/PrintStream;
    LDC "bar"
    INVOKEVIRTUAL java/io/PrintStream.println (Ljava/lang/String;)V
    GOTO L1
    L0
    FRAME SAME
    INVOKEDYNAMIC probe ()V [fr/umlv/indycov/RT#bsm, 3]
    GETSTATIC java/lang/System.out : Ljava/io/PrintStream;
    LDC "baz"
    INVOKEVIRTUAL java/io/PrintStream.println (Ljava/lang/String;)V
    L1
    FRAME SAME
    INVOKEDYNAMIC probe ()V [fr/umlv/indycov/RT#bsm, 4]
    RETURN

A no-op, is a method handle that takes nothing and return void. This method handle can be retrieved with Methodhandles.identity(void.class).
So the bootstrap method is the following. The first line records that the basic block with number ‘index’ is visited.

  public static CallSite bsm(Lookup lookup, String name, MethodType type, Object index) {
    classValue.get(lookup.lookupClass()).cover((Integer)index);
    return new ConstantCallSite(MethodHandles.identity(void.class));
  }

The code of the prototype is freely available (as attachment of this blog)  and works like an agent.
It relies on ASM 4 (still in beta) to do the bytecode transformation.

Side note: This prototype doesn’t handle exception correctly. If an exception is thrown, it will escape from the basic block without ending it.
How to modify the prototype to take care of exception is let to interrested readers.

Running the code with one argument "foo"

  java -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -javaagent:lib/indycov.jar -cp test-classes/ TestCoverage foo

will print

  foo
  baz
  TestCoverage: no coverage for line(s) 2 to 2
  TestCoverage: no coverage for line(s) 5 to 6

line 2 is the declaration of the class, it’s because javac adds a default constructor which is not used.
lines 5 to 6 are the ones that print "bar".

If you want to play with it don’t forget to compile your sources with the debug flag on. Otherwise, the generated bytecodes will not contain mapping information between opcodes and line numbers.

Cheers,
Rémi

Attachment Size
indycov.zip 681.84 KB

Calling invokedynamic in Java

Jan 07, 2011

DynamicIndy

There is no way to invoke invokedynamic using the Java language. So testing invokedynamic is not that obvious if you don’t have your own dynamic language.
I’ve developed a small class DynamicIndy that uses ASM 4.0 (not an official release) to generate a static method that calls invokedynamic. These static method is after converted to a MethodHandle that can be called in Java
The code is available at the bottom of this post

How to use it ?

DynamicIndy defines a method named (judiciously :) invokedynamic that takes a name and a MethodType, a way to specify a bootstrap method (a triple class, method name, method type ) and some optional arguments for the bootstrap method.
The following code shows how to create a BigDecimal constant using invokedynamic.

This code shows how to use it:

 public class DynamicIndyTest {
  public static CallSite bsm(Lookup lookup, String name, MethodType methodType, Object arg) {
    System.out.println("construct the BigDecimal constant "+arg);
    return new ConstantCallSite(
        MethodHandles.constant(BigDecimal.class, new BigDecimal(arg.toString())));
  }

  public static void main(String[] args) throws Throwable {
    DynamicIndy dynamicIndy = new DynamicIndy();
    MethodHandle mh = dynamicIndy.invokeDynamic("_", MethodType.methodType(BigDecimal.class),
        DynamicIndyTest.class, "bsm", MethodType.methodType(CallSite.class, Lookup.class, String.class, MethodType.class, Object.class),
        "1234567890.1234567890"
        );
    System.out.println((BigDecimal)mh.invokeExact());
    System.out.println((BigDecimal)mh.invokeExact());
  }
}

If you run this code

java -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic
  -cp .:asm-all-4.0-beta1.jar DynamicIndyTest

it will print

construct the BigDecimal constant 1234567890.1234567890
1234567890.1234567890
1234567890.1234567890

As you see the bootstrap method is called once and the constant reused.

cheers,
Rémi

Attachment Size
dynamic-indy.zip 289.49 KB

New Leonardo Sketch Release: Ruby Red Remixed

Jan 02, 2011

Josh Marinacci has announced that a new version of Leonardo Sketch is now available: Ruby Red Remixed. Leonardo is:

an open source vector drawing program named after the 15th century painter, but aimed for the 21st century user. It focuses on common tasks like mockups, prototyping, quick vector sketches, and presentations with a clean and consistent user interface. Leo is designed to be augmented by internet webservices and plugins created in several scripting languages.

Ruby Red Remixed is an interim release along the path to the next major Leonardo release, Glowing Green. The release was pushed out to make the recent progress on the Leonardo platform available to the community, within the context of a formal, stable version. Ruby Red Revisited includes “tons of bug fixes,” as well as many significant new features.

Key new features include:

  • Infinite Canvas: The canvas will automatically grow as you add new objects to your drawing, even if they are beyond the edges of the document. Never run out of space again.
  • Draggable guidelines: create guidelines by dragging them out from the ruler. Objects will snap to them automatically.
  • Flickr upload support: Now you can upload your creations directly to Flickr as well as Twitter.
  • Improved SVG Import: Lots of Illustrator symbols can be imported now by exporting them as SVG from Illustrator.
  • New Rectangle UI: set rectangle corner radius and gradients directly with handles instead of with a palette. Much easier to use.
  • Improved translations, including Japanese. Edit or create new translations easily using the debug menu in the preferences.

See Ruby Red Remixed for more details on the latest release, and visit the Leonardo Sketch home page for additional information about Leonardo, the underpinning Amino library, and more.


Java Today

JUG Chennai (India) celebrated the New Year with Java User Group – Chennai JUGChennai Unconference meet, 1st January 2011 at Adams Studio India:

Agenda: JVM Langauges ? Rajmahendra. * 10:10AM Program started with Devraj talk on Flex and Java; * 10:30AM Talk on JVM Langauges. Why JVM Languages, Idea behind, Pros and Cons,Different types of Languages and introduction Gorrvy, Scala, JRuby, Fantom. JavaFX Script; * 11:30AM Product of JVM Languages Grails,Gradle, Lift, Tales; * 12:30PM Grails and Grails Demo…

Alexis Moussine-Pouchkine reviews GlassFish in 2010 – What a year!

A lot has happened over the past 12 months! For the GlassFish team as for many people that came from Sun, it’s been a challenging, yet exciting year. It all started in January with…

Hildeberto Mendon?a has a 2011 New Year’s Resolution – CEJUG: Commitment with My Homeland -

I will start this post making a promise for 2011: I will write at least a post per week in this blog. Last year I could not keep that promise because it was one of the toughest years for me. 2010 was the year of conclusions and analysis of future steps. I was in the last year of the PhD and I spent almost the whole year thinking about what to do next…

Jean-Fran?ois Bonbhel announces JCertif 2011 the biggest Java Community Event in Central Africa ! Save the dates : 27-28 August 2011 -

Hi All, I’ll like to let you know the dates of JCertif 2011 the biggest Java Community Event in Africa. About 800+ attendees from many countries.
We will be happy to have you as Speaker on Developer Tools, Java, Open Source, Mobile Apps…or Business solutions. tools. Still hesitating to join JCertif 2011 ? See The past event : JCertif 2010 and this blog post


Spotlights

Our latest java.net href="http://www.java.net/archive/spotlight">Spotlight is Micha Kops’ latest article, Enterprise Java Bean / EJB 3.1 Testing using Maven and embedded Glassfish:

Are you playing around with the shiny new 3.1 EJBs? Using Maven for your Java projects? Need an easy way to write and execute tests for your EJBs that depends on an Java Application Server? No problem using Maven Archetypes, the Maven EJB Plugin and the GlassFish embedded Application Container…

We’re also featuring JUG Chennai’s online newspaper, The JavaUserGroupChennai Daily. Recent headlines included New Year’s Eve wishes, a 2011 Android wish list, an article on SOA and MDM, and “Java EE Productivity Report 2011.”


Poll

Our current java.net poll asks Are you more optimistic today about Java’s future than you were a year ago? Voting will be open until Monday.


Subscriptions and Archives: You can subscribe to this blog using the java.net Editor’s Blog Feed. You can also subscribe to the Java Today RSS feed and the java.net blogs feed. You can find historical archives of what has appeared the front page of java.net in the java.net home page archive.

Kevin Farnham

Twitter: @kevin_farnham

Kai Toedter: Dynamic modular Web Applications with Vaadin and OSGi

Jan 02, 2011

I am a big fan of both OSGi and GWT (Google Web Toolkit). Unfortunately these two technologies don?t fit together very well. When you want to run OSGi on the server, RAP (Rich Ajax Platform) is one proven approach to go. While I like RAP a lot, you have to have quite a lot of Eclipse RCP know how for using it. Another alternative, if your want to run OSGi on the server and provide a modular, dynamic UI is Vaadin. Btw, Vaadin is the Finnish word for female reindeer. Vaadin is a server side RIA framework that uses GWT as rendering engine. In the last couple of days a played a bit around with Vaadin and I have to admit, I like it a lot. So, I wrote a little dynamic OSGi Vaadin demo (Download link and instructions are below). My goals for the demo were:

  • Provide Bundles that contribute directly to the web application?s UI
  • Just starting and stopping bundles should contribute/remove UI elements and functionality
  • I wanted to implement something similar to my dynamic Swing OSGi demo

Before I started with Vaadin, I found a few interesting reads and code sample regarding OSGi and Vaadin:

But back to the demo, here is a screen shot running the application in Firefox:

The idea is to support two kinds of UI contributions: views and actions. The views are inserted in a tab folder, the actions appear in the toolbar and the Action menu. I implemented a little OSGi agent as a view (Bundle View). This view shows a selection of bundles currently available. By checking/unchecking a bundle, it will be activated/stopped on the server side. If you press ?Deselect All?, all bundles go to resolved state and all the UI contributions disappear immediately:

Of course you could start and stop bundles from the OSGi console directly, then you would have to refresh the browser to get the changes displayed. To get the demo running on your local machine, follow these steps:

  • Make sure you have an Eclipse IDE installed
  • Download the demo sources and target platform osgi-vaadin-demo.zip (6.8 MB)
  • Import all projects from the zip file into Eclipse
  • Open the project ?com.siemens.ct.osgi.vaadin.target?
  • Double-click vaadin.target (That opens the target platform definition in an editor)
  • Click on ?Set as Target Platform? in the right top corner of the editor
  • Now everything should compile
  • Start the Run Configuration ?OSGi Vaadin Demo?
  • Open the following URL in your favorite browser ?http://localhost/com.siemens.ct.osgi.vaadin.pm.main?
  • If everything went well, you see the demo in your browser
  • Play around with it, activate/stop bundles and watch the console log

In the next weeks I plan to go a little bit more into details of the demo, how OSGi declarative services are used, how to contribute to Vaadin Themes, etc.

Stay tuned and have fun!

Kai

Follow me on Twitter

flattr this!

Hendy Irawan: How to Dump/Inspect Object or Variable in Java

Dec 26, 2010

Scala (console) has a very useful feature to inspect or dump variables / object values :

scala> def b = Map("name" -> "Yudha", "age" -> 27)
b: scala.collection.immutable.Map[java.lang.String,Any]

scala> b
res1: scala.collection.immutable.Map[java.lang.String,Any] = Map((name,Yudha), (age,27))

Inside our application, especially in Java programming language (although the techniques below obviously works with any JVM language like Scala and Groovy) sometimes we want to inspect/dump the content of an object/value. Probably for debugging or logging purposes.

My two favorite techniques is just to serialize the Java object to JSON and/or XML. An added benefit is that it’s possible to deserialize the dumped object representation back to an actual object if you want.

JSON Serialization with Jackson

Depend on Jackson (using Maven):
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.6.3</version>
</dependency>
Then use it:
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

..
Logger logger = LoggerFactory.getLogger(getClass());

@Test
public void level() throws ServiceException, JsonGenerationException, JsonMappingException, IOException {
MagentoServiceLocator locator = new MagentoServiceLocator();
Mage_Api_Model_Server_HandlerPortType port = locator.getMage_Api_Model_Server_HandlerPort();
String sessionId = port.login("...", "...");
logger.info(String.format("Session ID = %s", sessionId));
Map[] categories = (Map[]) port.call(sessionId, "catalog_category.level", new Object[] { null, null, 2 } );
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
logger.info( mapper.writeValueAsString(categories) );
}

Example output :

6883 [main] INFO id.co.bippo.shop.magentoclient.AppTest - [ {
? "position" : "1",
? "level" : "2",
? "is_active" : "1",
? "name" : "Gamis",
? "category_id" : "3",
? "parent_id" : 2
}, {
? "position" : "2",
? "level" : "2",
? "is_active" : "1",
? "name" : "Celana",
? "category_id" : "5",
? "parent_id" : 2
} ]

XML Serialization with XStream

As a pre-note, XStream can also handle JSON with either Jettison or its own JSON driver, however people usually prefer Jackson than XStream for JSON serialization.

Maven dependency for XStream:
<dependency>
<groupId>xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.2.2</version>
</dependency>
Use it:
import java.io.IOException;
import java.rmi.RemoteException;
import java.util.Map;

import javax.xml.rpc.ServiceException;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.thoughtworks.xstream.XStream;
...
@Test
public void infoXml() throws ServiceException, RemoteException {
MagentoServiceLocator locator = new MagentoServiceLocator();
Mage_Api_Model_Server_HandlerPortType port = locator.getMage_Api_Model_Server_HandlerPort();
String sessionId = port.login("...", "...");
logger.info(String.format("Session ID = %s", sessionId));
Map category = (Map) port.call(sessionId, "catalog_category.info",
new Object[] { 3 } );
XStream xstream = new XStream();
logger.info( xstream.toXML(category) );
}

Sample output:

5949 [main] INFO id.co.bippo.shop.magentoclient.AppTest - <map>
? <entry>
??? <string>position</string>
??? <string>1</string>
? </entry>
? <entry>
??? <string>custom_design</string>
??? <string></string>
? </entry>
? <entry>
??? <string>custom_use_parent_settings</string>
??? <string>0</string>
? </entry>
? <entry>
??? <string>custom_layout_update</string>
??? <string></string>
? </entry>
? <entry>
??? <string>include_in_menu</string>
??? <string>1</string>
? </entry>
? <entry>
??? <string>custom_apply_to_products</string>
??? <string>0</string>
? </entry>
? <entry>
??? <string>meta_keywords</string>
??? <string>gamis, busana muslim</string>
? </entry>
? <entry>
??? <string>available_sort_by</string>
??? <string></string>
? </entry>
? <entry>
??? <string>url_path</string>
??? <string>gamis.html</string>
? </entry>
? <entry>
??? <string>children</string>
??? <string></string>
? </entry>
? <entry>
??? <string>landing_page</string>
??? <null/>
? </entry>
? <entry>
??? <string>display_mode</string>
??? <string>PRODUCTS</string>
? </entry>
? <entry>
??? <string>level</string>
??? <string>2</string>
? </entry>
? <entry>
??? <string>description</string>
??? <string>Gamis untuk muslimah</string>
? </entry>
? <entry>
??? <string>name</string>
??? <string>Gamis</string>
? </entry>
? <entry>
??? <string>path</string>
??? <string>1/2/3</string>
? </entry>
? <entry>
??? <string>created_at</string>
??? <string>2010-12-24 11:37:41</string>
? </entry>
? <entry>
??? <string>children_count</string>
??? <string>0</string>
? </entry>
? <entry>
??? <string>is_anchor</string>
??? <string>1</string>
? </entry>
? <entry>
??? <string>url_key</string>
??? <string>gamis</string>
? </entry>
? <entry>
??? <string>parent_id</string>
??? <int>2</int>
? </entry>
? <entry>
??? <string>filter_price_range</string>
??? <null/>
? </entry>
? <entry>
??? <string>all_children</string>
??? <string>3</string>
? </entry>
? <entry>
??? <string>is_active</string>
??? <string>1</string>
? </entry>
? <entry>
??? <string>page_layout</string>
??? <string></string>
? </entry>
? <entry>
??? <string>image</string>
??? <null/>
? </entry>
? <entry>
??? <string>category_id</string>
??? <string>3</string>
? </entry>
? <entry>
??? <string>default_sort_by</string>
??? <null/>
? </entry>
? <entry>
??? <string>custom_design_from</string>
??? <null/>
? </entry>
? <entry>
??? <string>updated_at</string>
??? <string>2010-12-24 11:37:41</string>
? </entry>
? <entry>
??? <string>meta_description</string>
??? <string>Jual baju gamis untuk muslim</string>
? </entry>
? <entry>
??? <string>custom_design_to</string>
??? <null/>
? </entry>
? <entry>
??? <string>path_in_store</string>
??? <null/>
? </entry>
? <entry>
??? <string>meta_title</string>
??? <string>Gamis</string>
? </entry>
? <entry>
??? <string>increment_id</string>
??? <null/>
? </entry>
</map>

Which one is better?

I personally prefer JSON, but fortunately, you always have a choice. :-)

Dave Carver: Developer Culture Shock

Dec 15, 2010

Corporate developers seem to struggle a bit more when a company open sources their internally developed code. It’s not so much the development or coding aspect of it, but more the interaction and community building aspects they struggle with.

Some common items they struggle with:

  1. No knowledge silos. An open source project can’t afford to have knowledge silos. A successful project needs a team that can work on any piece of the project. This goes against most corporate training where people have very specific roles and responsibilities.
  2. No Testing Team. Developers are required to write their own unit tests, and integration tests. Many corporate developers seem to struggle with this. They have never had to do it, it’s always been the responsibility of the QA team to write the tests.
  3. Maintaining the Build. Again, many are used to just writing and submitting the code. Another team takes care of building the software. Note: This isn’t just a corporate problem, many open source projects struggle with this as well.
  4. Answering and Responding to forum/mailing lists. Typically a developer may never actually communicate with the person that filed a bug report. Part of growing a community is timely responses to questions and bugs.
  5. Marketing and Promotion. That’s the job of everybody on the team, not just the team leader. Again many aren’t used to having to do this, as the Marketing Department will handle promotion, press releases, etc.

None of these are simple things to address, but when choosing the initial team, look for those team members that may already be involved in open source projects. Seed the team with some of these people, and the initial growing pains for the project will be less severe. The biggest thing though, the team has to be willing to adapt and change, what they did in the corporate environment more than likely will not work with their open source project.

Rails or Grails?

Dec 02, 2010

I was recently asked the question: Rails or Grails? I needed to summarize the key differences and industry sentiment. This was my response.

Before I make any subjective comments, let me start with some objective metrics I found:
http://www.expectationgap.com/posts/13

Now for my sentiments, I believe there are three key-dimensions: momentum, cloud-support, and people.

Momentum

Rails has the momentum as evidenced by the number of committers and plugins available. Many of the rockstar developers I know are all now developing in Rails, supporting that community, etc. The underlying Ruby language is incredibly expressive and allows dramatic productivity improvements. (write less code that can do more)

Only a handful of rockstars I know are developing on Grails. Typically, those developing on Grails are in enterprises or markets that are comfortable with Java and they want to continue leveraging that investment. (infrastructure, app servers, production support, etc.) Grails/Groovy does have the advantage that It can continue to leverage the output of the Java community (e.g. Spring). The better projects within the Java community are quickly integrated into Grails. For example, Grails uses Hibernate and Spring Security under the hood. As those projects improve, so will Grails.

Cloud Support

Rails and the cloud go hand in hand. Again, of the rockstar Rails developers I know, nearly all of them are running on virtual hardware owned and managed by others. Some of those let others manage the entire application server / platform (e.g. EngineYard). In contrast, all of the Grails development I know of is running on hardware (virtualized) owned and managed by the company itself in their own data centers (or rented space). As mentioned before, this may actually have been the motivating factor to select Grails. That is not to say that there isn’t cloud support for Grails. And now that VMWare owns SpringSource, this may change rapidly now that enterprises will have a trusted name (in VMWare) to host their Grails applications.

People

Rails has the momentum, more committers and potentially a more active community, but lets not fool ourselves — there is an army of labor out there to sling Java code. Offshore resources are readily available. The market for Rails is developing, but demand isn’t yet high enough to drive consulting companies to substantially increase their supply. As one of my good friends put it, “I’d love to develop in Ruby, but Java pays the bills.”. It is that sentiment, that has may limit the availability of resources.

However, even with readily available Java resources, that doesn’t guarantee the availability of Groovy resources. Both Grails and Rails require a slightly different mindset. If you take a Java developer and tell them to code in Groovy or Ruby, you’ll end up with Java code using Ruby/Groovy syntax. (not good) But at least the tooling, debugging practices, and libraries will all be familiar.

And just to stoke the fire…

Here are my entirely subjective scores:
Momentum: Rails (9) vs. Groovy (4)
Cloud Support: Rails (8) vs. Groovy( 5)
People: Rails (6) vs. Groovy (8)
—————————————————
Rails (23) vs. Groovy (17)

Excited about cite

Nov 13, 2010

There are times in career when you get excited about having an experience for the first time. I well remember how I got excited about seeing my first self-coded shell node popping up in the Windows Explorer (a.k.a custom shell namespace). A bit of excitement I noticed seeing my first reader’s comment printed in iX. And I was really excited about receiving my first printed articles in JavaMagazin and iX. Or when heise.de published my first online article on their well-known site. I really got excited when I was asked by the JAX management to speak there, which was an honour back then in the first days of that conference. I got excited when I got told that I was nominated as the CEO for an affiliate. And certainly I was excited when I was awarded the "GAP" (GlassFish Community Award).

So today once again was one of these days when I got excited about a new experience. This time, it was about someone citing and discussing a blog article of mine (Even when it was just in a blog rollup. Hey, they picked up MY blog entry for that!). And it was not just someone. It was JavaWorld. So I not only was excited, but also proud. A bit, at least.

While obviously all of these is nothing compared to being nominated for an Oscar(R) or a Nobel Prize, it actually is really fun to see myself getting excited still. Ain’t this part of that abstract idea of "worth living for"? I do think so. Excitement drives live (at least mine) and development of people, companies, products and markets. So I do hope that I will get excited again soon. Let’s see what comes next. :-)

Regards, Markus.


An overview of all my different publications and products can be found on my personal web site Head Crashing Informatics (http://www.headcrashing.eu).

Can Java as we know survive in Oracles eco system?

Nov 03, 2010

Many people were concerned when Oracle acquired Java.

The concern seems warranted in light of lawsuits, Gosling & Lea leaving important positions, Apple dropping support, the death of JCP, and Oracle no longer providing TCK for Apache going forward.

Unlike IBM, Sun, and others, I have never used any open source of free products produced by Oracle.  (I’ve tested numerous Oracle products like JDeveloper, but everything I touched fell way short of expectations)

The conflict steams from the core of Oracle existences.

Oracle makes their money from selling the corporate manager, not a software developer that actually has to write code every day.

It is apparent with recent revelations that Oracle’s corporate approach in impacting Java, and is the mindset is having a negative impact on Java.

During the War Between the States, generals applied old style Napoleonic war techniques with modern weapons.  The results of applying the Napoleonic system were disastrous. 

Oracle shouldn’t think that the same internal processes that made RDBMS a success can simply be applied to Java.   

For Java to continue thrive and grow, Oracle needs for realize the impact, develop an internal eco system separate than the present approach, and fix some burnt bridges. 

Gosling thinks Java has too much momentum for Oracle to do real harm.  Give Oracle a chance, Gosling may be surprised how much damage Oracle can cause Java.

Polls: Oracle, IBM, OpenJDK; Java on Mac

Oct 25, 2010

According to the latest java.net poll, the Java community is reacting positively to the news that IBM will be collaborating with Oracle on the OpenJDK project. A total of 267 votes were cast in the poll, which ran for the past week. Here is the actual poll question and the results:

What’s your view of the news that Oracle and IBM will collaborate in the OpenJDK project?

  • 18% (48 votes) – It’s the best Java news I’ve heard in a long time
  • 30% (81 votes) – It’s definitely positive
  • 34% (90 votes) – We’ll see how it works out
  • 2% (6 votes) – Makes no difference
  • 10% (27 votes) – I consider it a negative development
  • 4% (10 votes) – I don’t know
  • 2% (5 votes) – Other

Summing the first three options tells us that 82% of the voters think or hope that IBM collaboration in OpenJDK will produce positive results. Only 10% of the voters consider the collaboration to have a downside (unfortunately, no one took the time to post a comment describing the downsides they see).

New poll: Apple’s Java announcement and the future of Java on Mac

The new java.net poll focuses on the Apple announcement that its Java port is being deprecated. This new poll perhaps has a relationship with the previous poll, if one considers the OpenJDK as potentially filling the Java gap that will be left on Mac platforms due to Apple’s decision.

The new poll asks What does the announced deprecation of Java from Mac OS X mean for the future of Java on Mac platforms? Voting will be open for the next week.


Java Today

Dustin Marx provides Ten Tips for Using Java Stack Traces:

Most Java developers are somewhat familiar with Java stack traces and how to read and analyze stack traces. However, for beginning Java developers, there are some areas of stack traces that might be a little confusing. In this post, I look at some tips for reading Java stack traces and responding appropriately based on what the stack trace reports…

Alexis Moussine-Pouchkine introduces A practical guide to configuring and testing GlassFish 3.1 Clustering:

The main theme for GlassFish 3.1 is clustering which really encompasses centralized admin, load-balancing and in-memory state replication (HA). These features are all available in the 2.x family and are now being introduced in the OSGi-based and JavaEE6-compatible GlassFish product. While a lot of engineering time has been spent on making the clustering configuration as easy as possible…

Adam Bien recalls Steve Jobs at JavaOne, Mac OS X and Java, then fast-forwards to today:

Scott McNealy and Steve Jobs at JavaOne. “…One of the big surprises was the presence of the venerable Steve Jobs. Jobs underscored the commitment by Apple Computer to ship the Java 2 Standard Edition (J2SE) with their upcoming MacOS X release later this year. This is great news for Mac users and Java developers alike…”

The JCP Program Office announces the availability of the JCP EC Elections Discussion Board:

The final phase of the 2010 JCP program EC Elections is going on now and ends November 1 at midnight PST (November 2 at 8:00 AM UTC). This is an opportunity to have your thoughts, views, and opinions heard-all while helping shape the future of Java technology. There is a discussion board on jcp.org for community members to post questions to the candidates for the 2010 JCP EC Elections…


Spotlights

Our latest java.net Spotlight is the DEVOXX Supporting JUGs page:

67 Java User Groups have registered as supporting DEVOXX this year. The java.net Java User Groups Community notes that the “official” annual Java User Group leaders networking BOF at DEVOXX is scheduled for November 18 at 20:00.

We’re also highlighting Jim Weaver’s “Eye on Visage: Compiler Preview #1 Available”:

The Visage Programming Language is moving forward, with Compiler Preview #1 available now.  This preview features Default Properties, which create a simplified syntax that makes it easier to read nested data structures.  A logo has also been chosen for the project as well…


Poll

Our current java.net poll asks What does the announced deprecation of Java from Mac OS X mean for the future of Java on Mac platforms? Voting will be open through next Monday.


Subscriptions and Archives: You can subscribe to this blog using the java.net Editor’s Blog Feed. You can also subscribe to the Java Today RSS feed and the java.net blogs feed. You can find historical archives of what has appeared the front page of java.net in the java.net home page archive.

Kevin Farnham

Twitter: @kevin_farnham