Saturday June 30, 2007
23.3 miles this morning - 5th long run
3hours, 41 min, 16 secs - Approx 9 minutes extra than my
last run. I ran exactly the same route as last time, but I developed a shooting pain in right abdomen around mile 19 which slowed m down. I'm still not able to figure what caused the pain cause I was going with a steady pace, drinking fluids and ate a bar too. I had a good night sleep and yesterday's dinner was nothing special. But 9 minutes is a BIG difference :(
This is the 5th long run (23.3, 18.8, 18.5, 17 so far) getting ready for the
race. I'll do
Rancho next weekend and then my last big run in 2 weekends from today and
then taper down.

Miles to go ...
Posted by Arun Gupta in Running | Comments[0]
|
|
|
|
|
Friday June 29, 2007
Screencast #WS6: Eclipse Europa and GlassFish
Eclipse 3.3 (codename Europa) was released earlier today. As mentioned earlier, we have an exciting news for GlassFish developers!
| Starting today, Eclipse IDE for Java EE developers has the capability to register GlassFish V1, V2 and V3 containers from within the IDE. It supports web application directory deployment and has a fully integrated debugger. Ludo published detail instructions on how to configure Eclipse 3.3 for GlassFish, deploy a Web project and debug a JSP. You can also watch the same steps in this screen cast with an additional detail on how to deploy a JAX-WS compliant Web service on GlassFish using Eclipse IDE. |
|
Enjoy it here!
Technorati: eclipse europa glassfish webservices jax-ws screencast
Posted by Arun Gupta in webservices | Comments[28]
|
|
|
|
| As reported earlier, Eclipse Europa was scheduled to launch at Jun 29th, 6am PT. I decided to get up early (I'm a morning person anyway) and watch the countdown.

And it was indeed a countdown on eclipse.org. At 6:10am PT, Europa went live!

Congratulations to the Eclipse community for yet another timed release. Europa has a download targeted for Java EE developers

It seems like all the changes in website have not propagated yet because when I click on "Eclipse IDE for Java EE Developers" then I get a 404:

I guess, it's still some more wait! And then I'll work on making this release useful for GlassFish developers!
Technorati: eclipse europa glassfish
Posted by Arun Gupta in webservices | Comments[1]
|
|
|
|
| Video Footage of San Francisco Marathon
15,000 runners will be running the "Coolest Summer Marathon" - San Francisco Marathon - in exactly a month from today. After 4 more weeks, all my training will be put to use.
Watch the entire course of full marathon in the video footage that follows a group of runners, led by Dean Karnazes (the ultra marathon man).
|
Part 1 |
|
Part 2 |
Posted by Arun Gupta in Running | Comments[1]
|
|
|
|
|
Thursday June 28, 2007
Eclipse Europa is launching tomorrow and we have an exciting news for you.
Stay tuned ...
Technorati: glassfish eclipse europa
Posted by Arun Gupta in webservices | Comments[4]
|
|
|
|
| WS-I and WSIT - What's the difference ?
Before I explain the differences between WS-I and WSIT, let me point out the similarities:
And that's where the similarity ends, now the differences.
| WSIT (Web Services Interoperability Technology) | WS-I | |
| Goal | An open source product-quality implementation of key enterprise Web services technologies, commonly known as WS-*, from Sun Microsystems and is targeted to achieve interoperability with Microsoft .NET 3.0 framework. | An industry organization to promote Web services interoperability across platforms, operating systems and programming languages. |
| Focus | Interoperability between Metro (where WSIT is a key component) and Microsoft .NET 3.0 framework | Vendor-neutral and produce profiles that contains clarifications on existing specifications to promote interoperability |
| Specifications | Provides an implementation of WS-Metadata Exchange, WS-Transfer, WS-Reliable Messaging, WS-Reliable Messaging Policy WS-Atomic Transaction, WS-Coordination, WS-Security 1.0 and 1.1, WS-Security Policy, WS-Trust, WS-Secure Conversation, WS-Policy, WS-Policy Attachment interoperable with .NET 3.0 | Only use recommendations approved by standards bodies such as W3C and OASIS. Currently available profiles from WS-I cover only WS-Security 1.0 from the different specifications implemented by WSIT. There is a WG charter to profile OASIS WS-Reliable Messaging and WS-Secure Conversation that is already running late. |
| Owner | Sun Microsystems | WS-I, A non-profit corporation registered in New York. |
| Audience | Sun and Microsoft customers | Web service stack providers and End user companies |
| Deliverable | Implementation of key WS-* specifications integrated in GlassFish V2 Application Server | Profiles, Sample Applications and Testing Tools |
| Membership | Free and Open Source, Join and Participate today! | Contributing Member must pay $2000 annually, Standards Development Organization may become Associate Member. |
As is evident from the table even though both WS-I and WSIT working towards Web services interoperability, there are clear differences between them.
Sun is a current Board Member of WS-I and has actively participated in the production of Basic Profile 1.0, 1.1 and 1.2, Simple SOAP Binding Profile 1.0, Attachments Profile 1.0, Basic Security Profile 1.0, Sample Applications Use Cases, Architecture, Scenarios and Implementation 1.0, Attachment Profile Usage Scenario 1.0, SAML Token Profile 1.0, REL Token Profile 1.0, Kerberos Token Profile 1.0. As the specifications supported by WSIT are endorsed by standards bodies in future, WS-I may decide to profile them as well.
The WSIT bits are integrated in GlassFish V2 and comes with a seamless integration with NetBeans IDE. WSIT is built as an extension to JAX-WS RI that provides a Core web services implementation compliant with several of the profiles mentioned above.
WSIT and JAX-WS are the two key components of Metro - the Web services stack in GlassFish. That gives you the best of both world - a product-quality implementation of WS-* specifications and compliance with industry-standard profiles.
Technorati: wsit ws-i metro webservices glassfish
Posted by Arun Gupta in webservices | Comments[2]
|
|
|
|
|
Wednesday June 27, 2007
Yet Another Microsoft Interop Plugfest
Microsoft announced a 3-day Web services interoperability plugfest from Jul 10-12, 2007. At Sun Microsystems, we love to Tango with Windows Communication Foundation component of .NET 3.0 framework and so we'll be participating using GlassFish V2. This may be the last plugfest before GlassFish V2 is released later this year.
As in earlier events, attendees implement a set of pre-defined scenarios based on WS-* specs using their Web services stack. They participate with implementation on their laptops and interoperate using their client and Microsoft endpoint and vice versa.
The set of scenarios are based on the following specifications:
Microsoft is also looking for interop testing with pre-release version of .NET Framework 3.5 (codename Orcas) with the following versions of specifications:
We run the interop tests regularly with our builds. The results for Tango M5 milestone build shows details for each technology.
Microsoft still need to work out some kinks before the real work can begin:
But we are still going to participate :) Sun's participation in the previous plugfests can be followed here.
Technorati: webservices wsit plugfest glassfish microsoft interoperability
Posted by Arun Gupta in webservices | Comments[7]
|
|
|
|
|
Monday June 25, 2007
A lively discussion happened on GlassFish Forums where a user asked for pros/cons for GlassFish vs JBoss. A community user explained his reasons to choose GlassFish over JBoss. Here are they key points:
Some other quotes are:
And if these are not enough for you to choose GlassFish, here is a more detailed list of Why Use GlassFish ?.
And we see GlassFish as "GlassFish is WebLogic Features and Performance at JBoss's price" except we are shooting for better Features and Performance than WebLogic!
Technorati: glassfish jboss opensource
Posted by Arun Gupta in webservices | Comments[1]
|
|
|
|
|
Sunday June 24, 2007
Week 19 Mileage - 5 more weeks
Mon: Rest
Tue: 7 miles
Wed: 3.5 miles
Thu: 7 miles
Fri: Rest
Sat: Rest
Sun: 12 miles
Here are the good reads of this time:
Technorati: running fitness runninglog
Posted by Arun Gupta in Running | Comments[2]
|
|
|
|
|
Saturday June 23, 2007
Audio and Transcript for TS-4865
Audio and transcript synchronized with the slides for JavaOne 2007 session TS-4865 (Takes two to Tango: Java Web Services and .NET Interoperability) is now available. Read a review of the session by an attendee.
WSIT is now part of Project Metro and is integrated in GlassFish V2.
Technorati: wsit webservices glassfish javaone metro
Posted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Friday June 22, 2007
Dynamic Data in jMaki Widgets Using JPA
![]() |
jMaki provides a rich set of data widgets that can be embedded in a web application. For most of the widgets to be useful, they need to be tied a database backend. For example consider a Table widget displaying data about your favorite stock tickers. This blog explains the steps to create such a Web application, deployed on GlassFish V2, that contains a jMaki-wrapped Yahoo Data Table widget pulling data from JavaDB. |
If you are using a jMaki build higher than 0.96 (or dated after jul 30) then some steps in this entry need to be updated and described here. These steps are marked with "SEE THE UPDATED ENTRY".
Web Application' project and
name it as 'jmaki-jpa'.
jMaki Ajax Framework' by clicking on 'Next' button while
creating the project.Standard' layout as shown below:
Finish'.Runtime' tab, expand Databases, connect to the
default database (with the URL 'jdbc:derby://localhost:1527/sample [app
on APP]'). Specify the username 'app' and password 'app'.Execute
Command...' and enter the following query to create the table definition:create table COMPANY (id int,
companyName varchar(255),
price float,
change float,
percentChange float,
lastUpdated varchar(50),
PRIMARY KEY (id))Refresh' to see the
newly created table in the Tables tree. Select the 'COMPANY' table,
right-click and select 'Execute Command...' and enter:insert into COMPANY values (1, 'A Co', 71.72, 0.02, 0.03, 'Jan 1, 2007,
10:00am' );
insert into COMPANY values (2, 'B Inc', 29.01, 0.42, 1.47, 'Feb 1, 2007,
10:00am' );
insert into COMPANY values (3, 'C Group Inc', 83.81, 0.28, 0.34, 'Mar 1,
2007, 10:00am' );
insert into COMPANY values (4, 'D Company', 52.55, 0.01, 0.02, 'Apr 1,
2007, 10:00am' );
jmaki-jpa', right-click
and select 'New' and choose 'Entity Classes From Database...'.jdbc/sample' as 'Data Source'.COMPANY' in 'Available Tables' and click on 'Add' and enter
the values as shown below:
Next'.server' as shown below:
Create Persistence Unit...' to create the persistence unit
and enter the values as shown below:
Create'.and click on 'Finish'.
Configuration Files' and open 'persistence.xml'.Add Class' button and click on 'Cancel'
button. For some reason the entity classes are not loaded during the first
time.Add Class' button and choose 'server.Company'
class and click 'OK'. This will ensure that the generated
entity class is explicitly recognized by the EntityManagerFactory.Web Pages', select 'New' and then 'JSP...'.
Give the name as 'data' as shown:
Finish'.data.jsp' with the following:<%@ page import="java.util.*" %>
<%@ page import="server.Company" %>
<%@ page import="javax.persistence.*" %>
<%
EntityManagerFactory emf = Persistence.createEntityManagerFactory("jmaki-jpaPU");
EntityManager em = emf.createEntityManager();
List<Company> list = em.createQuery("select c from Company
c").getResultList();
out.println("[");
for (int i=0; i<list.size(); i++) {
Company c = list.get(i);
out.println("['" + c.getCompanyname()
+ "'," +
c.getPrice()
+ "," + c.getChange() + "," +
c.getPercentchange() + ",'" + c.getLastupdated() +
"']");
if (i < list.size()-1)
out.println(",");
}
out.println("]");
%>index.jsp', drag-and-drop a 'Yahoo Data Table'
widget from the jMaki Palette in the 'Main Content Area'.<a:widget name="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="[
['A Co',71.72,0.02,0.03,'9/1 12:00am'],
['B Inc',29.01,0.42,1.47,'9/1 12:00am'],
['C Group Inc',83.81,0.28,0.34,'9/1 12:00am'],
['D Company',52.55,0.01,0.02,'9/1 12:00am']
]" /><a:widget name="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'}
]}"
service="data.jsp" />
data.jsp' instead
of the static data.
UPDATED: SEE THE UPDATED ENTRY - Based upon a user request, a NetBeans project for this sample can be opened via Java WebStart here. Alternatively, you can download the project and view at your own ease. Thanks to Geertjan for the tip!
Technorati: jmaki glassfish jpa netbeans
Posted by Arun Gupta in web2.0 | Comments[33]
|
|
|
|
| Sun Keynote @ TheServerSide Java Symposium
![]() |
Eduardo will be giving a keynote (From Tomcat to GlassFish - An Update on OpenSource Server-side Java at Sun) at TheServerSide Java Symposium - Europe next week. |
He is the Editor-in-Chief for TheAquarium so go talk to him and tell him how you like GlassFish or would like us to improve.
Technorati: theserverside glassfish opensource conf
Posted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Thursday June 21, 2007
Project Metro was announced 2 days ago and got picked up my multiple sites:
Here is a comment from the community:
Great job, I asked couple of weeks ago in the jaxws-jaxb forum if JWSDP
(the bundle idea) was dead. Metro is the best answer to that I guess :) I just
hope it will be updated more frequently than JWSDP bundles. We (the community)
should support this move with our feedback and bug reports. Thanks
Posted by: marlor on June 20, 2007 at 02:25 AM
Added:
Technorati: metro webservices
Posted by Arun Gupta in webservices | Comments[2]
|
|
|
|
|
Wednesday June 20, 2007
After much discussion, I was able to finally create a simple "Hello JPA World" example that uses Java Persistence API (JPA) to store and retrieve data from JavaDB from a Servlet deployed on GlassFish V2 b50 using NetBeans IDE 5.5.1. This blog describes the steps, in detail, on how to create this sample.
HelloJPA".New', 'Entity
Class ...'. Specify the values as shown below:
Create Persistence Unit ...'
and entering values as shown below:
Create'.and click on 'Finish'.
Configuration Files', open 'persistence.xml', click 'Add Class
...', select 'server.Company' and click on 'OK'. The 'persistence.xml'
will look like:<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="HelloJPAPU" transaction-type="RESOURCE_LOCAL">
<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
<non-jta-data-source>jdbc/sample</non-jta-data-source>
<class>server.Company</class>
<properties>
<property name="toplink.ddl-generation" value="drop-and-create-tables"/>
</properties>
</persistence-unit>
</persistence>Company.java':private String companyName;
private float price;
private float change;
private float percentChange;
private String lastUpdated;Refactor',
'Encapsulate Fields ...' and choose the getter/setters for each field as
shown below:
Company' class as follows:public Company(String companyName, float price, float change,
float percentChange, String lastUpdated) {
this.companyName = companyName;
this.price = price;
this.change = change;
this.percentChange = percentChange;
this.lastUpdated = lastUpdated;
}return "server.Company[id=" + id + ", lastUpdated=" + lastUpdated +
"]";Servlet
...' as shown below:
Finish'.protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
beginHTML(out);
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("HelloJPAPU");
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
out.println("<h1>Hello JPA World!</h1>");
Company c = new Company("AAA Co", (float)10.0, (float)2.0, (float)10.0,
new Date().toString());
em.persist(c); // persisting to the source
em.getTransaction().commit(); // now committed
List list = em.createQuery(
"select c from Company c where
c.companyName = :companyName")
.setParameter("companyName",
c.getCompanyName()).getResultList();
out.println("<b>Total Companies: " + list.size() + "</b><br>");
for (int i=0; i<list.size(); i++) {
out.println((Company) list.get(i) +
"<br>");
}
endHTML(out);
}
void beginHTML(PrintWriter out) {
out.println("<html>");
out.println("<head>");
out.println("<title>Hello JPA World!</title>");
out.println("</head>");
out.println("<body>");
}
void endHTML(PrintWriter out) {
out.println("</body>");
out.println("</html>");
out.close();
}Alt+Shift+F' default keyboard shortcut.Properties', 'Run'
Categories, change the Relative URL to '/Hello'.F6'. After re-loading the page twice, the following output
will be seen in the browser window:
Technorati: jpa glassfish netbeans
Posted by Arun Gupta in web2.0 | Comments[23]
|
|
|
|
|
Tuesday June 19, 2007
Announcing Metro - Naming the Web Services stack in GlassFish
The GlassFish V2 Web services stack consists of JAX-WS as the core platform and Project Tango (aka Web Services Interoperability Technology, WSIT) as an implementation of key WS-* specifications on top of it. This stack, so far referred as "JAX-WS RI + Project Tango", now has a new name - Project Metro.
Why name Project Metro ? - JAX-WS, the core platform, uses Tube as a basic processing unit that represents SOAP-level protocol handling code such as MustUnderstand and WS-Addressing processing. Multiple tubes are put together in a sequential fashion to complete the SOAP message handling. Project Tango uses this extensible architecture to implement they key WS-* specs, such as Reliable Messaging and Atomic Transactions, as Tubes as well. Effectively, all your SOAP messages are moved from one point (client) to another (endpoint), potentially spanning intermediaries, through Tubes. This is a direct correlation to Metro (aka Rapid Transport) that exists all over the world.
What is Metro ? - A picture is worth a thousand words - this shows all the components of Metro.

The two main components of Metro are:
The Core Web services that provides all the SOAP message functionality, including WS-Addressing and MTOM, is available from JAX-WS. Project Tango implements Security, Reliability and Transactions on this Core layer that interoperate with Windows Communication Foundation. All the applications on Metro can be easily developed using NetBeans 5.5.1 and deployed on GlassFish V2.
How does Metro provide interoperability with .NET 3.0 ? - Metro provides a complete Web services solution for both homogeneous and heterogeneous architectures. For any Web service, there is a Client that invokes an Endpoint. The Endpoint advertises the metadata which the Client uses to bootstrap communication with the Endpoint. This metadata indicates which of the capabilities - security, reliability and transactions - are supported at the Endpoint. For a Metro Client or Endpoint, NetBeans IDE 5.5.1 or later takes care of processing all the details.

The figure shows a pair of Client and Endpoint - one using the Metro Web services stack and the other using .NET 3.0. The Metro Client and Endpoint can be deployed on any of the GlassFish V2 supported platforms (Solaris Sparc, Solaris X86, Windows, Linux and MacOS). The .NET 3.0 Client and Endpoint can be deployed on any of the .NET 3.0 supported platforms (Windows Vista, Windows 2003 Server and Windows XP + SP2).
For a homogeneous architecture, where both Client and Endpoint are using Metro, the arrow labeled 1 shows a Metro Client invoking a Metro Endpoint. If this serves your purpose, then all you need is GlassFish V2 for WSIT runtime, NetBeans IDE for tooling and WSIT tutorial.
For a heterogeneous architecture, where only one of Client or Endpoint is using Metro and the other is based on .NET 3.0, the arrow labeled 2 and 3 shows a Metro client can invoke a .NET 3.0 endpoint and a .NET 3.0 client can invoke a Metro endpoint respectively. This use case has been extensively tested as well by participating in multiple plug-fests with Microsoft.
What is the change ? - The biggest change you'll notice is a unified single name for what was called "GlassFish Web services stack" or "JAX-WS RI + Tango" so far. This is only a consolidation of our multiple offerings and is backed up high quality, high-performance and production-ready Web services stack integrated in GlassFish V2. This stack is also tested on Tomcat and has been reported to run on Jetty and JavaSE as well.
Metro Binary 1.0 M5, aligned with Tango Milestone 5, already integrated in GlassFish V2 b50, is available for download. The JAX-WS and Tango binaries and documentation are still available for download but will be aligned with Metro over time.
Technorati: webservices glassfish metro wsit jax-ws
Posted by Arun Gupta in webservices | Comments[5]
|
|
|
|
|
Today's Page Hits: 4676
Total # blog entries: 1002