Monday, November 29, 2004

Article: Transaction Processing in Distributed Service-Oriented Applications

Jon Maron from Oracle has just published an article about transaction processing in distributed SOA. You will learn in this article the challenges that you have when you want to manage transactions in a distributed Services Oriented Architecture running using Web Services.

Friday, November 26, 2004

Some cool stuff about JSP 2.0

J2EE 1.4 introduces a major release of JSP: 2.0. Here some of the cool new features:

  • Direct usage of Expression Language (EL) in your JSP:
    You do not need to put the EL in any tag now, just use it as needed:
         <head><title>JSP 2.0 new features</title></head>
           Hello ${}
    Find more about JSP 2.0 Expression Language in the J2EE 1.4 tutorial.
  • Easy tags creation with .tag files
    It is now easier to create your own tags.
    You just need to create a new .tag file (or .tagx if you want to use XML syntax) in the WEB-INF/tags directory of your Web application; or META-INF/tags if you want to package the Tags in Jar file. So creating a .tag file is easy, using the attribute directive. The following example is a new tag named mytag.tag that prints a title set using the attribute title, in the color specified in the attribute textColor.
    <%@ attribute name="title" required="true" description="Title of the document"%>
    <%@ attribute name="textColor" required="true" description="Color of the Title"%>
    <h1 style="color:${textColor}">${title}</h1>
    Here is the JSP that uses this new Tag:
    <%@ taglib tagdir="/WEB-INF/tags/" prefix="tags"%>
          <tags:mytag title="My new JSP" textColor="blue"/>
          Hello World${}
  • Easy header and footer template using the prelude and coda includes:
    In most of the Web application that I have built, I started by creating template for my HTML pages; most of them to handle header and footer. Oracle JSP implementation provides this for a while using the Global Include feature. JSP 2.0 introduces a standard way of doing that using prelude and coda includes. I *hate* the choice made by the spec to call that prelude and coda. May be good Java developer are necessary musicians, since this is commonly used there? Why not simply header/footer or using a prefix like pre.../post.... Anyway, that is not the point.
    The way you can set a prelude and/or coda include to your JSPs is done with the new Web Descriptor tag: <jsp-property-group>. This new tag allows you to configure a set of JSP that matches a specific URL. Part of the subtags of <jsp-property-group> are:
    • <include-coda> : the path to JSP fragment (.jspf) to include in the beginning all the JSP that matched the URL.
    • ><include-prelude>:the path to the JSP fragment to include in the end all the JSP that matched the URL.
    An example configuration:
This 3 new features of JSP 2.0 are just a very small list of the features introduced in JSP and Servlet in J2EE 1.4, but are my favorites. They are very easy to test.. and to adopt.

Friday, November 19, 2004

New Oracle White Paper: Accelerate Development and Deployment of Service-Oriented Applications

Oracle has published a new white paper about Service Oriented Architecture, and how Oracle Application Server 10g accelerates SOA development and deployment. Read the paper on the Oracle Web Site.

Wednesday, November 17, 2004

Oracle TopLink: Happy 10th Anniversary

In the context of the 10th anniversary of Oracle TopLink, The Server Side published an interview of Mike Keith and Doug Clark, architect and product manager of TopLink. They talk about persistence in J2EE using EJB 3.0, but also the differences between TopLink and other persistence solutions...

Monday, November 15, 2004

Windows User, finally you will be able to use Konfabulator

One of my favorites tools on my Mac is Konfabulator that allows you to create -or use prebuilt- application called Widgets. This Widgets are for example battery level, weather, see the Widget Gallery. The reason why I love it is not necessary the list of existing one, but more because you can very easily develop yours using Javascript. Dowload it and start to develop your widgets, developer guide, javascript reference are available in the Konfabulator Workshop

Monday, November 8, 2004

HTML/Javascript tip: Refreshing an image not the full page

I was discussing with a friend about the creation of a monitoring dashboard in HTML. As any monitoring tool you want to be able to see the information in *real-time*, so you need to refresh the content.... One way of doing it is to refresh the whole page and this is easy, just use the meta tag: <META HTTP-EQUIV="Refresh" CONTENT="5; URL="> where 5 is the number of seconds between each refresh. Javascript allows you to easily refresh a specific image of your page (a chart for example):

  <img src="myChartServlet" name="chart1"/>    <script language="JavaScript">    function loadImage() {      var now = new Date();      if (document.images) {       document.images.chart1.src = 'myChartServlet?time='+now.getTime(); // add the time to avoid caching      }      setTimeout('loadImage()',1000);    }   setTimeout('loadImage()',1000); </script>
You can obviously make the whole think dynamic and configurable...