Tuesday July 31, 2007
Transcript of Sun and Microsoft Interoperability Exchange Forum
A complete transcript of the Sun/Microsoft Expert Exchange Forum is now available. And if you still have questions, feel free to post them to users@metro or Metro Forum.
Try 3 things today:
Technorati: wsit metro webservices glassfish netbeans sun microsoft interoperability
Posted by Arun Gupta in webservices | Comments[1]
|
|
|
|
|
Monday July 30, 2007
Completed San Francisco Marathon 2007
4 hours, 4 mins, 33 secs - yeah, that's what it took me to complete my first San Francisco Full Marathon.
I did First Half Marathon 2 years ago and First Full Marathon last year, but this was the first Full Marathon on the hills of San Francisco. Even though I could not complete within less than 4 hours but I was happy that I took only 3 short walk breaks and maintained my pace as planned. There was San Francisco characteristic-fog all through the course with no Sun shine anywhere at all, and in a way that helped. Here is the complete breakdown from the official results (bib# 1378):
| Distance » | 7.5 miles | Half | 20.7 miles | Finish |
| Time | 1:01:35 | 1:48:49 | 3:03:12 | 4:04:33 |
| Pace | 8:13 | 8:18 | 8:51 | 9:20 |
Some other stats are:
| Place Overall | 1317 out of 4250 |
| Men | 1058 out of 2805 |
| M 30-34 | 178 out of 436 |
| Age Grade | 51.38% |
The fastest male runner clocked 2:25:57 and the fastest female runner was 2:43:41.
The race was very well organized and some of the highlights that I liked are:
|
With my son before Start |
Start Line |
|
Right after the Finish |
In front of the Bay Bridge |
|
2007 Finisher Pose |
With my wife and son after the Finish |
And lastly, my wife and 4-year old son drove me to the race early morning and cheered for me at the start and the finish line. This was the biggest morale booster!
I read it somewhere "The only thing that does not hurt after a Marathon is your Pride". And I completely felt it today right after the race and the massage turned out to be a big blessing :)
Technorati: running runsfm marathon
Posted by Arun Gupta in Running | Comments[8]
|
|
|
|
| As reported earlier jMaki and GlassFish, along with a host of other Sun-led open source technologies (NetBeans, OpenJDK, OpenDS, Project Indiana, etc.), were present at OSCON 2007 last week. I spent my entire 2 days at the jMaki booth which had a consistent stream of visitors on both the days. In case you are interested, here is what I presented:
The videos of other demos shown at the pod will be made available on this blog in the next few days.
I could not attend any of the sessions except some of the keynote sessions on second day. Of all the keynote videos the one I'd like you to watch is Overcoming Bias by Prof Robin Hanson. The professor, an Economic Theorist, talks about how cognitive bias cause software projects to slip. Some of the quotes from his talk are "Be more honest about writing code" and "If you really care about truth, you'll work at it and try to overcome bias".
Here are some pictures.
|
Sign Board |
List of sponsors |
Welcome Sign |
|
jMaki and NetBeans booth |
Sun booth |
Sun booth |
|
Sun booth |
Marguerite @ Sun desk |
Job Board |
|
Mozilla Booth |
An old friend - Tim Riley |
Myself explaining jMaki |
|
Cool give-away |
OpenSolaris and OpenJDK booth |
Joyent booth |
|
Sun Microsystems in the keynote |
Greg @ NetBeans booth |
Ken @ GlassFish booth |
Technorati: oscon sun jmaki glassfish opensolaris openjdk
Posted by Arun Gupta in web2.0 | Comments[1]
|
|
|
|
|
Friday July 27, 2007
![]() |
"Jaane
Bhi Do Yaaron" in the English language means "Let It Go Friends".
The Indian Film Industry
(aka Bollywood) has produced one of the most hilarious movies by this
name. The video snippets below from the movie are meant
for readers who understand Hindi language. Found the link through an internal alias. |
| Ahuja Drunk and Fixing D'Mello's "car" |
| Mahabharat Climax |
Technorati: movies bollywood youtube
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
| jMaki - Accessing External Services
A jMaki widget in a page can communicate with:
service="data.jsp".This blog entry explains how external services are accessed by jMaki widgets.

This image shows a Web application with multiple pages (Page1, Page2, Page3) where one of the page (Page2) contain at least one jMaki widget. For a BlockList widget, the generated code fragment looks like:
<a:widget name="jmaki.blockList" value="[
{title : 'jMaki Project Home', link : 'https://ajax.dev.java.net',
description : 'Where to go for the latest jMaki.' },
{title : 'jMaki Widgets Home', link : 'https://widgets.dev.java.net',
description : 'The source for the latest jMaki widgets.' },
{title : 'jMaki-Charting Home', link : 'https://jmaki-charting.dev.java.net',
description : 'Enables complex charts rendered on the client in any modern
browser.' }
]" />
This code fragment populates the widget with static data specified in the
value attribute. In order to populate the widget with data from an
external service, such as an RSS feed, the value attribute needs to be replaced
with service="/xhp?id=rss". Let me explain how that works.
If any page consists of a jMaki widget then the jMaki runtime is bundled with
the application. The runtime consists of jmaki.xhp.XmlHttpProxyServlet
class that maps to "/xhp" URL pattern within the application
context. The id specified in the URL, "rss", is configured in a
configuration file named "xhp.json". This file consists of a list
of default external services that can be accessed by the widgets in a page. Each
entry in this file can can be specified using up to 5 different parameters:
So if BlockList widget needs to access the RSS feed, then the code fragment needs to look like:
<a:widget name="jmaki.blockList" service="/xhp?id=rss" />
The corresponding entry in xhp.json is:
{"id": "rss",
"url":"http://weblogs.java.net/blog/ludo/index.rdf",
"xslStyleSheet": "rss.xsl"
}
The tag and the default entry tells the jMaki runtime to fetch the RSS feed
from http://weblogs.java.net/blog/ludo/index.rdf, apply the 'rss.xsl'
stylesheet (that understand the multiple RSS/Atom formats) to the received
response and convert the data into into a common JSON data format of the type
"dataType" : "jMakiRSS". The BlockList widget knows how to convert
jmakiRSS data to its specific data model.
This approach allows all widgets, that take a "value" attribute,
to consume data from external services.
Technorati: jmaki rss services web2.0
Posted by Arun Gupta in web2.0 | Comments[2]
|
|
|
|
|
Thursday July 26, 2007
What is jMaki ?
If you have been following my blog, then you know it already. But a picture is worth a thousand words so here it is.

One-liner: jMaki is a light-weight framework for building Web 2.0 applications. The "j" is for JavaScript and "Maki" means to wrap in Japanese. The logo is a Kanji symbol that means to wrap.
Three key points about jMaki:
This is my "speedgeeking" @ OSCON 2007.
And for those with a "serious" interest, I'm showing how some of the cool mashups are empowered by jMaki. Couple of them are available as screencasts at:
And more videos will be available later.
Technorati: jmaki netbeans oscon oscon07
Posted by Arun Gupta in web2.0 | Comments[6]
|
|
|
|
|
Wednesday July 25, 2007
Ready For San Francisco Marathon
4 - days to
San Francisco Marathon
24 - weeks of Training (including this one)
2 - weeks of Taper Down (including this one)
656 - miles of Running (excluding this week,
once
again jMaki helped me calculate the
total mileage)
6 - long
runs
4 - Personal Records (PG&E,
PG&E again,
7-mile,
PG&E yet
again)
4 - fellow runners from Family & Friends
And I'm ready.
For friends who'd like to cheer me up in person, here is some information:

For fellow runners, wish you all good luck and here are few references:
And for those whose wishes are always with me and will not be able to participate in person:
Wish me luck, my goal is to finish the marathon in less than 4 hours.
Posted by Arun Gupta in Running | Comments[1]
|
|
|
|
| Total Running Mileage Mashup with jMaki
I updated the running log filter to the one given below. This allows me to generate the total running mileage of all the weeks. The changes are highlighted in this color:
jmaki.namespace("jmaki.filters");
myDays= ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
oneDay = 24*60*60*1000;
function addDays(myDate, days) {
return new Date(myDate.getTime() + days*24*60*60*1000);
}
function formatDate(myDate) {
var dateString = String (myDate.getDate());
dateString = (dateString.length == 1 ? "0" + dateString :
dateString);
return (myDate.getMonth()+1) + "/" + dateString + "/" +
myDate.getFullYear();
}
// convert Running blog feed to the jMaki table format
jmaki.filters.tableModelFilter2 = function(input) {
var startDate = new Date();
startDate.setFullYear(2007,1,12); // Feb 12, 2007
var _columns = [
{title: 'Title'},
{title: 'Day of The Week'},
{title: 'Date'},
{title: 'Mileage'}
];
var _rows = [];
var totalMileage = 0;
for (var _i=0; _i < input.channel.items.length;_i++) {
var weekNumber =
input.channel.items[_i].title.split(' ')[1];
var weekStartDate = addDays(startDate,
(weekNumber-1)*7);
var desc =
input.channel.items[_i].description;
desc = desc.slice(0, desc.lastIndexOf("</span"));
var spanArray = desc.split("<span");
for (var _j=1; _j < spanArray.length;
_j++) {
var span =
spanArray[_j].split("</span>")[0];
if (span.search(/run/)
== -1)
continue;
var runDay =
myDays[_j-1];
var runDate =
addDays(weekStartDate, _j-1);
mileageInt = parseInt(dayMileage);
totalMileage
+= mileageInt == "nan" ? 0 : mileageInt;
var row = [
'Week ' + weekNumber,
runDay,
formatDate(runDate),
span.split(': ')[1]
];
_rows.push(row);
}
}
var summaryRow = [
'Final Week',
'Last Day',
formatDate(new Date()),
totalMileage
];
_rows.push(summaryRow);
return {type : 'jmakiModelData', columns : _columns, rows :
_rows};
}
The updated web page looks like given below. Notice the first row of the table gives the total mileage:

Technorati: jmaki mashup running web2.0
Posted by Arun Gupta in Running | Comments[3]
|
|
|
|
|
Tuesday July 24, 2007
Screencast #Web4: Creating Mashups with jMaki - Display RSS feed in jMaki Widgets
![]() |
jMaki provide a flexible
framework to create
mashups very easily. Today, I'm starting a series of screencasts
that will focus on this aspect of jMaki. The first one in the series is a very simple mashup that pulls RSS feed from a blog entry and display it in two different widgets, without any extra effort. The NetBeans IDE is used for tooling and the jMaki-enabled Web application is deployed on GlassFish. |
Enjoy it here!
The key message is jMaki + NetBeans IDE + GlassFish provides a complete platform for creating and deploying powerful mashups, quickly and effectively!
Technorati: jmaki mashups netbeans screencast glassfish jmakimashups
Posted by Arun Gupta in web2.0 | Comments[9]
|
|
|
|
|
Monday July 23, 2007
jMaki on Rails - Updated for NetBeans 6 M10
Based upon a user request, this is a follow up entry to show how jMaki on Rails For Dummies work on NetBeans 6 Milestone 10. Some of the steps are simplified and more details are provided. The updates from the previous blog entry are highlighted in this color.
Tools', 'Plugins',
select 'Downloaded', click on 'Add
Plugins ...'.Tools', 'Plugins',
select 'Installed'. It should show 'jMaki
Ajax support' with today's installation date.jmaki_ror'.
Take everything else as default.Generate ...', select 'controller',
specify the Name as 'jmaki' and Views as 'yahoo'.http://jmaki-goodies.googlecode.com/svn/trunk/rails_plugins".
This adds the plug-in registry to the list of repositories used for
searching plug-ins. jmaki_core and
jmaki_yahoo and press "Install". Follow the instructions and the
two plug-ins will be installed. After the installation is complete,
you'll see the following:
Views', right-click on
'layouts', select 'New', select
'RHTML file ...'.
Enter the 'File Name' as 'standard'.
This will add 'standard.rhtml' in layouts
sub-tree. Enter the following fragment before <body>:<head>
<%= stylesheet_link_tag "jmaki-standard", :media
=> "all" -%>
<%= javascript_include_tag "jmaki" -%>
<%= jmaki_setup -%>
</head><%= @content_for_layout %>Controllers', 'jmaki_controller.rb',
add the following fragment before 'def yahoo'
line:layout "standard"mysqld-nt --user root'.mysqladmin -u root create
jmaki_ror_development'. You need to make sure that the database
name in this script is changed to match the project name.Generate',
select 'model', specify the arguments as 'grid',
click 'OK'. This will
generate, in NetBeans project, Database Migrations, migrate,
001_create_grids.rb.001_create_grids.rb,
change self.up
helper
method such that it looks like:def self.up
create_table :grids do |t|
t.column :company, :string
t.column :price, :float
t.column :change, :float
t.column :percent_change, :float
t.column :last_updated, :string
end
end Run
Rake
Target', 'db', 'migrate'.
This generates the database
table. mysql --user root'.
use
jmaki_ror_development' to see the following interaction:mysql> use jmaki_ror_development;
Database changedinsert into grids values (1, 'A Co', 71.72,
0.02, 0.03, 'Jan 1, 2007, 10:00am' );
insert into grids values (2, 'B Inc', 29.01, 0.42, 1.47, 'Feb 1, 2007,
10:00am' );
insert into grids values (3, 'C Group Inc', 83.81, 0.28, 0.34, 'Mar 1,
2007, 10:00am' );
insert into grids values (4, 'D Company', 52.55, 0.01, 0.02, 'Apr 1,
2007, 10:00am' );Views',
'jmaki', 'yahoo.rhtml',
drag-and-drop 'Data Table' widget from the 'Yahoo'
category of jMaki palette.
yahoo.rhtml' with the
following:<%= jmaki_widget 'yahoo.dataTable',
:args => {
:columns => [
{ :title => 'Company', :width => 200, :locked =>
false },
{ :title => 'Price', :width => 75, :renderer =>
'usMoney' },
{ :title => 'Change', :width => 75, :renderer =>
'change' },
{ :title => '% Change', :width => 75, :renderer =>
'pctChange' },
{ :title => 'Last Updated', :width => 85, :renderer
=> 'italic' }
]
},
:value => @table_data
-%>@table_data' is defined
in 'jmaki_controller' in 'def yahoo'
as:def yahoo
@table_data = []
Grid.find_all().each do |data|
@table_data
<< [ data.company, data.price, data.change,
data.percent_change, data.last_updated]
end
endhttp://localhost:3000/jmaki/yahoo'.
Now jMaki-wrapped Yahoo DataTable widget is picking data from the MySQL
database. And as a next step, you can WAR'up this RoR application and deploy it on GlassFish V2 using these instructions.
Technorati: jmaki rubyonrails ror netbeans mysql glassfish
Posted by Arun Gupta in web2.0 | Comments[12]
|
|
|
|
|
Sunday July 22, 2007
Rama described how to run JAX-WS samples with Tomcat 6.x. JAX-WS is part of Metro - the Web services stack in GlassFish. Another key component of Metro is WSIT (aka Project Tango) that provides Secure, Reliable, Transactional and Interoperable Web service. Read more about Project Tango in this 26-page article.
A stable version of Metro is integrated in
GlassFish V2 and the
latest nightlies of stand-alone bundle are also available. The stand-alone
bundle comes with an install scipt (wsit-on-tomcat.xml) that allows
it install on Tomcat 5.x. I followed the steps in
Rama's blog to install Metro on Tomcat 6.x. But first, a little bit of
explanation and then the actual code fragments.
Tomcat's classloading mechanism has changed slightly between
5.x
and
6.x. The first change is that Tomcat 5.x used to have shared/lib
directory to share classes across all web applications. This directory in turn
used to be specified as value of shared.loader property in
conf/catalina.properties. In Tomcat 6.x, the property still exists
but it's value is set to nothing and shared/lib directory no longer
exists in the default installation. I see the motivation behind this change as
it keeps the Tomcat installation directory clean and any shared resources can
still be specified in conf/catalina.properties. But this means that
wsit-on-tomcat.xml script, that copies the files in
shared/lib directory, will work on Tomcat 5.x only. In order for this
script to work on Tomcat 6.x, the value of shared.loader property
need to be changed to include Metro jars.
Now, the code fragments! The value of shared.loader property in
Tomcat 5.x is:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
And in Tomcat 6.x is the value of this property is:
shared.loader=
If Metro is installed in c:\metro then changing its value to:
shared.loader=file:///c:/metro/lib/*.jar
will enable Tomcat 6.x to host Secure, Reliable, Transactional and .NET 3.0-Interoperable Web services. And this mechanism will work for Tomcat 5.x too, so changing the value of this property in Tomcat 5.x installation to:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar,file:///c:/metro/lib/*.jar
instead of copying the files in shared/lib will be sufficient as
well.
The second change in Tomcat's classloading mechanism is required if you are
using Java SE 6. Tomcat 5.x used to have common/endorsed directory
which no longer exists in Tomcat 6.x. Java SE 6 is bundled with JAX-WS 2.0 and
Metro needs JAX-WS 2.1. So if you are using Java SE 6 then copy
webservices-api.jar in c:/jdk6/jre/lib/endorsed directory.
Read
Endorsed Directory Mechanism for more details.
Several screencasts are available that show how to develop Secure, Reliable and Transactional and Interoperable Web service. All the screencasts use NetBeans IDE but if you are more of a command-line user then follow this entry that shows how to develop a reliable endpoint and invoke it from WCF and vice versa.
Technorati: metro webservices wsit jax-ws glassfish tomcat
Posted by Arun Gupta in webservices | Comments[34]
|
|
|
|
| Week 23 - Improved PR on Rancho by > 2 minutes
Mon: Rest
Tue: 3.5 miles
Wed: Rest
Thu: 7 miles
Fri: Rest
Sat: Rest
Sun: 9 miles
Here are good reads of this time:
Technorati: running fitness runninglog
Posted by Arun Gupta in Running | Comments[0]
|
|
|
|
|
Friday July 20, 2007
![]() |
Sun Microsystems is a platinum sponsor
of OSCON 2007
(Jul 23-27, Portland, OR). There are
tutorials,
sessions,
bofs,
expo
hall and other
events. Sun's continued commitment to Open Source is reflected in its leadership and key contributions to the many projects including OpenSolaris, OpenOffice.org, GNOME, Grid Engine, java.net, Jini, JXTA, GlassFish, NetBeans, and Mozilla. |
jMaki is another such commitment! It's an open source lightweight Ajax framework to build Web 2.0 applications that will be shown at the Expo Hall. We will show how jMaki enables cool and useful mashups. Previous Posts show some of the capabilities of jMaki.
And of course there is a booth on GlassFish - an open source, production quality and Java EE 5 compatible application server.
You can sign up for a free pass.
A complete list of Sun sessions is listed below.
| Session Title | Speaker | Time | Location |
| Performance Whack-a-Mole | Josh Berkus, PostgreSQL Lead, Sun Microsystems | 10:45AM - 11:30AM | Portland 251 |
| Better Desktop Java Development Using the Beans Binding and Swing Application Frameworks | Chet Haase, Sun Microsystems | 11:35AM - 12:20PM | D137-138 |
| Project Indiana: The Road to Solaris Next | Ian Murdock, Chief OS Platform Strategist, Sun Microsystems | 11:35AM - 12:20PM | E141 |
| OpenJDK: The First Eight Months | Mark Reinhold, Java SE Chief Engineer, Sun Microsystems | 4:30PM - 5:15PM | Portland 252 |
| Apache OFBiz, a Real-world Open Source ERP: Using the Power of Business to Your Benefit | Bruno Souza, NetBeans Community Manager, Sun Microsystems, Ean Schuessler, CTO, Brainfood Media Systems | 4:30PM - 5:15PM | D133 |
| Memory Leaks in Java Applications: Different Tools for Different Types of Leaks | Gregg Sporar, Technology Evangelist, Sun Microsystems | 10:45AM - 11:30AM | Portland 251 |
| State of Lightning Talks | Josh Berkus, PostgreSQL Lead, Sun Microsystems | 10:45AM - 12:20PM | Portland 252 |
| Why Observability Matters - How DTrace Helped Twitter | Adam Leventhal, Solaris Kernel Engineer, Sun Microsystems, Brendan Gregg, Sun Microsystems | 10:45AM - 11:30AM | Portland 255 |
| How to Build, Run, and Develop Code with the phoneME Open Source Project | Roger Brinkley, Senior Staff Engineer, Sun Microsystems | 11:35AM - 12:20PM | Portland 251 |
| Refactoring to Seam | Brian Leonard, Senior Software Engineer, Sun Microsystems, Inc. | 11:35AM - 12:20PM | D139-140 |
| RIA Platforms and Open Source |
Nathan Torkington, Conference Chair, O'Reilly Media, Inc. Nandini Ramani, Co-Chair, W3C SVG Working Group, Sun Microsystems James Ward, Technical Evangelist, Adobe Systems |
1:45PM - 3:20PM | Portland 252 |
| Kitchen Sink Language | Peter von der Ahé, javac Tech Lead, Sun Microsystems | 2:35PM - 3:20PM | F151 |
Technorati: jmaki glassfish sun oscon conf
Posted by Arun Gupta in web2.0 | Comments[3]
|
|
|
|
|
Thursday July 19, 2007
PR for 7 miles & Running Pace Calculator
Here is a tool that calculates your running pace per mile or kilometer.
And it tells me I ran 7:33 min/mile pace for my 7 mile run this morning, my best timing for that distance, yipppee! One Rancho PG&E over the weekend and couple of more speed bursts next week and then the race!
Posted by Arun Gupta in Running | Comments[0]
|
|
|
|
| Fourth Microsoft Interop Plugfest Report
As reported earlier, Metro team from Sun participated in the fourth (third, second, first) Microsoft Interop Plugfest. Microsoft is working on .NET 3.5 (codename Orcas) and the focus this time was to ensure that there are no regressions with WSIT 1.0. Read Harold's report for more details.
Technorati: webservices metro plugfest glassfish microsoft interoperability
Posted by Arun Gupta in webservices | Comments[6]
|
|
|
|
|
Today's Page Hits: 4869
Total # blog entries: 1002