« April 2006 »
SunMonTueWedThuFriSat
 
2
3
4
6
7
8
9
10
11
14
15
19
20
22
23
24
25
26
27
28
29
30
31
   
       
Today
XML

Blog::Navigation

GetJava Download Button
Get the Source
Personal Blog

Blog::Referers

Today's Page Hits: 293

Powered by Roller Weblogger.
« Previous month (Mar 2006) | Main | Next month (May 2006) »
20060521 Sunday May 21, 2006

JavaOne 2006, May 18 and May 19

Sorry about not being able to write on the next day - as I was doing for the first 2 days. Reasons:

Anyway, here is the summary of the last 2 days:

Thursday - May 18

I attended the following talks/BOFs:

Dynamically Typed languages on the Java platform

Gilad Bracha talked about invokedynamic and how that could be useful when compiling dynamically typed languages to JVM bytecodes. The terminology "dynamic languages" is wrong ("With statically typed languages everything is static so that nothing moves?" - as usual Gilad spoke well!). "dynamically typed languages" is the correct way of speaking.

Summary: JVM's invoke instructions [invokeinterface (calling interface methods), invokestatic (call static methods), invokespecial (used to call private methods, constructors), invokevirtual (invoke any other method)] require method signature and target class (or interface) to be specified. But, when operating with dynamic types, you would know what types are to be used. invokedynamic would accept such "typeless" method spec. (just method name) and search appropriate method at each invocation. When matching method is not found a user specified handler will be called -- which can receive some reflective parameter to specify callsite and method called. Also, in the context of the JSR 292 more flexible hotswap will be investigated (for dynamically typed languages).

Secure coding Anti-patterns: Avoiding vulnerabilities

Nice talk that summarized important anti-patterns to watch out while writing secure code. One important example I liked: do not assume that after throwing exception from constructor (may be after checking for security) will make the object useless. The user can extend the class, define finalize() method and resurrect the partially constructed (unsecure) instance from there. And then, user code can call instance methods -- which assumed that security check has been done already by constructor. Solution is to check a flag in every sensitive instance method - the flag should be initialized by the constructor after security check is successful.

One minor comment about this talk : I had to sit in overflow room and the video quality was poor. Folks in overflow room couldn't see the speakers properly!

Solaris Dynamic Tracing (DTrace) and Java Technology

This is DTrace talk. I liked (and was amazed!) at the way Jarod Jenson was typing D-scripts and Adam followed him to explain the scripts!. This is one of the talks where you have to be physically present to fully appreciate/enjoy the talk (like the Click and Hack, the Type-It brothers talk).

Memory Leaks in Java(TM) Technology-Based Applications: Different Tools for Different Types of Leaks

The speaker explained that there are two ways to detect memory leaking:

  1. Using heap walkers, memory dumpers/analyzers. i.e., using snapshot heap analysis.
  2. Using bytecode instrumentation (BCI) to instrument classes (like the NetBeans profiler

The speaker explained how to use the object "age" (the number of garbage collections the object survived) to detect slow memory leaks. Nice talk.

Using the tools in JDK 5 and Java SE 6 Platform to diagnose problems and monitor applications

I spoke in this BOF along with Alan Bateman and Kelly O'Hair. So, I should not be evaluating the talk ;-) We had starting trouble in this talk - mostly due to my fault. I'm sorry :-(

We covered the serviceability tools, in particular jhat in depth.

Friday - May 19

I could participate in only one talk in which I spoke - "scripting for the Java platform". Mike Grogan explained what JSR 223 is all about.

I covered the implementation aspects:

After the scripting talk, I had to run to the airport to catch my evening flight. I am back to Chennai. Still having jet lag and writing this blog at 11.30 PM :-)



( May 21 2006, 11:27:40 PM IST ) Permalink Comments [2] del.icio.us | furl | simpy | slashdot | technorati | digg

20060518 Thursday May 18, 2006

JavaOne 2006: Wednesday, May 17

Today I attended the following talks:

Blu-Ray: Java Technology Goes Hollywood!

I am a big fan of interactive TV -- atleast the kids can have something to do when watching TV rather than just sitting and watching passively :-) I don't know much about interactive TV standards or Java standards in this space - although I know a bit of MPEG-4. Main points I learned from this talk:

Superpackages: Development Modules in Dolphin

As usual, Gilad Bracha presented nicely. JSR is in it's infancy. He explained the current strawman proposal of the development module. Someone asked why do you need two JSRs for module system for Java (development modules - JSR 294, deployment modules - JSR 277). Answer: Language design JSRs are different from other kind of JSRs. The focus of these JSRs are different.

Integrating XML into the Java programming language

This is XML literal support for Java. Mark Reinhold summarized why ad-hoc XML programming is hard in Java - he compared existing XML APIs such as DOM, JDOM, dom4j, XOM, StaX. Two proposals for XML literal syntax -- XML-like angular bracket or # to demarcate tags (he calls this Java-like). He did a "show of hands" poll for XML language support in Java. I voted for "no" -- I must admit that I am with the minority :-)

Java Memory Model: The building block of concurrency

Main take-aways of this talk:

Understanding Mysteries of Java SE classloading

Nice summary of classloaders from JDK standpoint and HotSpot JVM standpoint. Only 2/3 people were interested in "loader constraints". Main take-aways:

It is difficult to describe "loader constraints" late in the night :-) -- that too without using paper/pen or blackboard :-) -- may be you can read my blog :-)



( May 18 2006, 10:02:34 PM IST ) Permalink Comments [2] del.icio.us | furl | simpy | slashdot | technorati | digg

20060517 Wednesday May 17, 2006

JavaOne 2006: Tuesday, May 16

On Tuesday, I attended the following talks.

  1. general session (keynotes)
  2. Java and REST -implementing ATOM (session)
  3. Deployment Modules for Java (BOF) JSR-277
  4. Dynamic scripting languages for Java (BOF)
In addition, I had to be at Sun booth for "Java Performance and Diagnostics".

Key points on keynote

Java and REST

If you have been following Tim Bray on WS-*, you'll appreciate REST. I liked this talk. The speaker (Dave M Johnson) explained how to ROME based framework is used to create REST based service for blogging. I need to learn more on this area.

Deployment modules for Java

The speaker (Stanley Ho) mentioned about "Jar hell, classpath hell" and what is the other one -- I forgot :-). It is difficult to manage complex java apps that use many jar files, different version of it and native code, many resources. The deployment modules JSR tries to solve module dependency, versioning, repository, native code management etc. for Java. It is expected to work closely (and compatibly) with Development modules for Java.

Dynamic languages BOF

This was a very lively interactive discussion on scripting languages in Java space. Frank Cohen presented a very nice summary. Many heavyweights of scripting world (JRuby, Jython folks for example), Tim Bray, Roberto Chinnci attended this talk. I had chance to meet these people (and few Sun folks with whom I just had email contact!).

Someone asked about Lisp on Java -- there are few -- I like SISC - Scheme implementation for Java - http://sisc.sourceforge.net/. And if you want to try out JSR-223 API for your scripting language, you may want to check out http://scripting.dev.java.net

Few freqeuent questions (and answers) in "Performance and Diagnostics" booth.

Where can I find "Visual GC"?
http://management.netbeans.org/visualgc/index.html
http://java.sun.com/performance/jvmstat/
Does jconsole for JDK 6 works against application running on JDK 5?
Yes
How do I get heapdump of a running Java application?
With Mustang, there are many ways to get Java heap dump of a running process.
  • using the new -dump option with jmap tool
  • using JVM command line option -XX:+HeapDumpOnOutOfMemoryError
  • using hprof profiler with application
How do I analyze the heapdump?
use jhat tool.
Where is jconsole?
Starting from JDK 5.0, it is shipped with JDK. Look for "jconsole" in your $JDK_HOME/bin directory.
I am running 1.4.2_xx. How can I use heapdump?
jmap has been backported to 1.4.2 and 5.0 update releases. Please use latest update releases. And yes, Mustang's jhat can analyze dumps from older JDK releases. There is no need to run your application on JDK 6 (although we would recommend that :-) ) to get heap dump. You can get your heapdump from older JDK release and use Mustang's jhat.
Do I need to make application modifications to use jconsole?
To use platform observability (like observing GC, classloading, threads etc.), you don't need to make any changes to Java application. But, if you want to make your application observable, you have to instrument it with suitable JMX MBeans.
Do I need to any special flag to use jconsole against my application?
Yes and no. If you running Mustang and you want to observe a local Java process, you don't need. If you are using Tiger, you need to start the app with -Dcom.sun.management.jmxremote option.
You showed me DTrace with Java. It is great! How do I try it?
You need to use Solaris 10. If you want to try it out without installing, you may want to try Belenix - an OpenSolaris distro that can boot straight from CD. So, you can boot it from CD and play with Solaris 10! I am sure you'll like it..



( May 17 2006, 09:11:49 PM IST ) Permalink del.icio.us | furl | simpy | slashdot | technorati | digg

20060516 Tuesday May 16, 2006

The day before JavaOne

I am here in San Francisco to attend JavaOne 2006. I hope to attend all language related (scripting or otherwise) and few other Java SE talk sessions and BOFs this time. And I hope to post comments as I attend. Stay tuned...



( May 16 2006, 12:16:34 AM IST ) Permalink del.icio.us | furl | simpy | slashdot | technorati | digg

20060513 Saturday May 13, 2006

JavaScript @ java.sun.com, developers.sun.com

Sun launches JavaScript and AJAX developer hubs. Check it out ...



( May 13 2006, 01:09:41 AM IST ) Permalink del.icio.us | furl | simpy | slashdot | technorati | digg

20060512 Friday May 12, 2006

BigAdmin Java Observability articles

We (Jim Holmlund and I) have written an article on Java Observability on Solaris. Well, two articles - one focusing on Tiger (Java 5.0) and another one focusing on Mustang (Java SE 6). Check it out at...



( May 12 2006, 09:38:34 PM IST ) Permalink del.icio.us | furl | simpy | slashdot | technorati | digg

20060505 Friday May 05, 2006

Meet you @ JavaOne 2006

Meet you @ JavaOne 2006! JavaOne 2005 feels like just yesterday. JavaOne 2006 is nearing! (May 16) I'll speak in the "Scripting in Java™ SE 6" (TS-1382) session along with Mike Grogan (the spec. lead for JSR 223) and participate in troubleshooting BOF. I've proposed a java.net mini talk on the Scripting java.net project as well.

I am excited -- except for the loo...ong flight journey from Chennai, India to US -- I hope to spend time by reading a fat book (or two)! For some reason, I can't sleep during flight journeys :-)



( May 05 2006, 07:28:08 AM IST ) Permalink del.icio.us | furl | simpy | slashdot | technorati | digg

20060501 Monday May 01, 2006

JSR-223 script engine for the Java language

I've implemented JSR-223 script engine for the Java programming language. Check out http://scripting.dev.java.net! [Read More]



( May 01 2006, 10:09:55 AM IST ) Permalink del.icio.us | furl | simpy | slashdot | technorati | digg

Copyright (C) 2005, A. Sundararajan's Weblog