The Taming of the Stack Trace

The Taming of the Stack Trace” by Dionysios Synodinos

Everything you ever wanted to know about the Java Stack Trace, but were afraid to ask.

(I’m thinking of posting all my Java related thoughts on java.net so you can check out my blog there or subscribe to it too.)

Java and PHP interoperability – a web services fable

aesopfox.jpgBy definition Web Services (WS) have been designed to support interoperable Machine to Machine interaction over a network. In order to promote interoperability of Web Services, in 2002 the Web Services Interoperability Organization (WS-I) was founded which basically is an industry consortium that publishes profiles. A profile is a set of core specifications (SOAP, WSDL, etc.) in a specific version (SOAP 1.1, UDDI 2, etc.) with some additional requirements to restrict the use of the core specifications.

One of the three profiles you can actually find in their deliverables is the Basic Profile (official abbreviation is BP), which uses Web Services Description Language (WSDL) to enable the description of services as sets of endpoints operating on messages. Almost everybody is BP compliant: Glassfish Metro (JAX-WS RI), IBM WebSphere, Apache Axis 1.2+, JBossWS, ASP.NET 2.0.

The keyword here is “almost”…

My Project in a Nutshell

There is a team at my workplace that administers the Greek School Network Directory Service which currently contains more than 170,000 entries including school accounts for email and dialup access, teacher accounts and several student accounts. For various reasons that you can find at my colleague’s blog there was a need to perform LDAP operations over WSs – in fact we had to “Move LDAP writes to Web Services”.

The server-point

The server-point would actually perform the LDAP “writes” to the Directory Server and have a PHP WSs interface. For the PHP implementation, NuSOAP was chosen. NuSOAP is probably the most popular PHP SOAP implementation and is widely used, eg. in Amazon Web Services.

It is a group of PHP classes that allow developers to create and consume SOAP web services. It does not require any special PHP extensions. The current release version of NuSOAP at the time supports much of the SOAP specification. It can generate WSDL and also consume it for use in serialization. Both rpc/encoded and document/literal services are supported.

Here follows the skeleton of the PHP configuration for our deployment:


<?php

// The library
require_once('lib/nusoap.php');
// The services exposed
require_once('myinterface.functions.php');


$server = new soap_server();
$server->configureWSDL('Interface',"http://server/interface.php");
$server->wsdl->schemaTargetNamespace="http://server/interface.php?wsdl";

$server->register('ExistsUser',
      array('SubsystemID' => 'xsd:integer', 'UserNumber' => 'xsd:string'),
      array('Status' => 'xsd:integer', 
	  'ErrorMessage' => 'xsd:string', 'UserName' => 'xsd:string'),
      "http://server/interface.php",false,false,'literal',
      'ExistsUser will return Status=0 if user does not exist, 
	  Status=1 if user exists and set UserName accordingly, 
	  Status=-1 and set ErrorMeessage if an error occurs. It 
	  should be used to check if user exists before creating 
	  username. UserNumber is the number the user has in the 
	  subsystem. SubsystemID is the numerical ID of the subsystem');

$server->service($HTTP_RAW_POST_DATA);

?>

<Spoiler/>

NuSOAP was not BP compliant until a few days ago when CVS revision 109 of nusoap.php was introduced. The motivation for this article was the hard way we had to find out…

The client-point

The system my team was responsible for was the client which would have to wrap the WS related code into Java POJOs that would either be used as library code or through portlets. Implementing the functionality we needed in Jetspeed portlets was another issue but it goes beyond the scope of this post.

For the Java WS framework there were several candidates like Apache Axis and JAX-RPC but we choose JAX-WS 2.1, both because of its elegant programming model and the fact that in the newly published Java EE 6 proposal JAX-RPC will be proposed for future deprecation.

Our development platform was NetBeans 5.5 which provided a powerful wizard that starting from the WSDL that NuSOAP published, created the necessary Java stub code for our operations.

This is a small portion of the WSDL for the operation ExistsUser:


…
<message name="ExistsUserRequest">
<part name="SubsystemID" type="xsd:integer" />
<part name="UserNumber" type="xsd:string" />
</message>
<message name="ExistsUserResponse">
<part name="Status" type="xsd:integer" />
<part name="ErrorMessage" type="xsd:string" />
<part name="UserName" type="xsd:string" />
</message>
…
<operation name="ExistsUser">
<soap:operation soapAction="http://server/interface.php/ExistsUser" style="rpc"/>
<input>
<soap:body use="literal" namespace="http://server/interface.php"/>
</input>
<output>
<soap:body use="literal" namespace="http://server/interface.php"/>
</output>
</operation>
… 

Of course to debug Web Services you need tools like:

Of course the fact that the above development stack was found appropriate for our project doesn’t mean that it is suitable for every WS project. BTW a nice introduction on making similar technical decisions for Java projects can be found in the book Expert One-on-One J2EE Design and Development (AKA “The J2EE Bible”) by Rod Johnson in chapter 2 entitled “J2EE Projects: Choices and Risks”.

Holder <T> and Java’s heavy burden from C

Java Web Services make use of the Holder concept that was introduced since WSDL can specify interfaces that return multiple parameters (rather than just one single return value). In Java you can only return directly a single new object through a return value. To return multiple objects you have to return a collection object (which is still only a single object) or some other "container" object. To return a new object through a parameter, you need a holder object. Java’s object reference parameters only allow the modification of existing object instances.

Holders are necessary because the Java language designers stuck with the "pass-by-value" semantics of the C-family of languages. If a parameter is a simple type its value is copied, if it is an object instance the reference (value) to it is copied. As a result you are unable to modify the value in the original simple type or the reference (value) to the object from the called method (while you can change the passed instance, you cannot replace the passed instance). The holder mimics "pass-by-reference" semantics which in C/C++ is is done with a pointer-to-a-pointer and in C# directly through the ref keyword.

Some consider attempts to imitate call by reference in OO languages a sign of poor object-oriented design. Dale King points out that attempts to fake call by reference are usually a sign of poor object-oriented design: “a function should not be trying to return more than one thing”. He uses the term thing because it is proper to return more than one value (e.g. returning a Point that contains two values). If you are trying to return two values, the test he like to apply is whether you can come up with a logical name for the values as a group. If you can’t, you had better look to see if maybe you what you have is really two functions lumped together. WSDL never strived towards OO so that is where this mismatch comes from. It may have been a better idea for Java to wrap the WSDL method return value and all of the OUT parameters into a single wrapper object which becomes the return value of the Java interface method.

For our implementation we had the WS method:

@WebMethod(operationName = "ExistsUser", action = "http://server/interface.php/ExistsUser")
public void existsUser(
@WebParam(name = "SubsystemID", partName = "SubsystemID")
BigInteger subsystemID,
@WebParam(name = "UserNumber", partName = "UserNumber")
String userNumber,
@WebParam(name = "Status", mode = Mode.INOUT, partName = "Status")
Holder status,
@WebParam(name = "ErrorMessage", mode = Mode.OUT, partName = "ErrorMessage")
Holder errorMessage,
@WebParam(name = "UserName", mode = Mode.OUT, partName = "UserName")
Holder userName);

This method would return the status in the client:

BigInteger status = new BigInteger("0", 10);
Holder statusHolder = new Holder(status);
…
// Actual call of the WS
port.existsUser(subsystemID, userNumber, statusHolder, errorMessage, userName);
…
status = statusHolder.value
System.out.println(status);

If you fire up the JAX-WS wizard in NetBeans and feed it with the WSDL you get 100% of the necessary code for an “almost” working demo.

Again the keyword is “almost”…

Bumps on the Road

If you have Java SE 6 installed and start of with NetBeans and JAX-WS there is a big chance you’ll run into problems. Java 6 ships with JAX-WS 2.0 API in rt.jar (so as we had to find out) you need to download the latest stable version of JAX-WS (2.1.1) and copy jaxws-api.jar and jaxb-api.jar into JRE endorsed directory. Obviously you still need other JAX-WS jars in your classpath.

The above problem was relatively simple to solve compared to the fact that statusHolder.value would not alter after the WS invocation no matter what!

Although the WS would get invoked properly on the server and we would receive a SOAP response:


<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope …>
<SOAP-ENV:Body>
<ExistsUserResponse xmlns="http://server/interface.php">
<Status>1</Status>
<ErrorMessage></ErrorMessage>
<UserName>john</UserName>
</ExistsUserResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


the @$%$# statusHolder.value would remain the same!

Weeks of debugging passed during which we had to dig into specs, JAX-WS RI code and forums to find out that:

  1. The SOAP response we got from NuSOAP was not compliant with BP since according to WS-I “An ENVELOPE described with an rpc-literal binding MUST place the part accessor elements for parameters and return value in no namespace.” In our case "Status" is in http://server/interface.php&quot; namespace instead of no namespace, and
  2. Since JAX-WS RI 2.1 would encounter a response not valid according to BP, would simply ignore it without even spawning an error message.

Number one (1) has been reported to NuSOAP mailing list and we can confirm that it been fixed in CVS revision 109 of nusoap.php that should now conform to the WS-I Basic Profile (thanks Scott).

Number two (2) has been filled as an “enhancement” of JAX-WS RI for the version 2.1.3: “Ignore rpc/lit part accessors’ namespace, there are quite a few implementations that do not obey BP”.

The Morale of the Story

At this point I cannot help but to quote Dave Podnar’s Five Stages of Dealing with Web Services:

  1. Denial – It’s Simple Object Access Protocol, right?
  2. Over Involvement – OK, I’ll read the SOAP, WSDL, WS-I BP, JAX-RPC, SAAJ, JAX-P,… specs. next, I’ll check the Wiki and finally follow an example showing service and client sides.
  3. Anger – I can’t believe those #$%&*@s made it so difficult!
  4. Guilt – Everyone is using Web Services, it must be me, I must be missing something.
  5. Acceptance – It is what it is, Web Services aren’t simple or easy.

 

 

Social Bookmarks:

10 reasons why Javascript is the ultimate scripting language

Start counting:

1.) C-like syntax

The basic Javascript syntax fairly resembles C and since this language is an integral part of Computer Science curriculums all over the world, this means that developers are familiar with it, hence an easy leaning curve.

2.) OO syntax mimics Java

Again because Javascript was designed to have a similar look to Java, but be easier for non-programmers to work with its syntax is (fairly) understood by the vast majority of programmers.

I use the word “mimics” because the prototypical nature of JavaScript makes it very-very different from languages with class based inheritance (like Java or C++). Actually JavaScript is the only prototypical language that has managed to become mainstream, so JavaScript mastery is actually quite hard and requires lots of work!

3.) Omnipresent in HTML scripting

You know it for more than a decade: if you want even the simplest form of dynamic functionality on a web page you need to write some Javascript. For a pop-up window, for client-side form validation, for a calculation, everything melts down to Javascript. There is the alternative of VBScript on IE but since it is not compatible with all the browsers its application is minimal.

The fact that Javascript has been ubiquitous for a decade in web development means that its basic syntax can be considered a common knowledge for developers, and the advanced features have an easy learning curve.

4.) AJAX

In the world of Web2.0 it is essential for a developer to understand advanced Javascript. There might be various other approaches for RIAs but still Javascript and XMLHttpRequest is king.

5.) Adobe AIR

Currently there is a big effort to provide web developers with tools that ill allow them to build lightweight desktop applications, blurring the line between the two realms. In that direction Adobe has released AIR (Adobe Integrated Runtime) formerly code-named Apollo which is a cross-operating system runtime that allows developers to use their existing web development skills to build and deploy rich Internet applications to the desktop. Although you can use Adobe Flex for AIR applications my guess is that developers will favor the Javascript approach.

6.) Google Gears

As I have pointd out in an older post, Google has rolled out Google Gears their open source browser extension that enables web applications to provide offline functionality using…. what else? JavaScript.

7.) Mozilla Rhino

While many sweat to develop their scripting interfaces to Java, Mozilla Rhino has been there for ages and works! Again Rhino uses Javascript.

It just listened to a podcast this weekend from the founder of Alfresco the Open Source Alternative for Enterprise Content Management (ECM), that emphasized on the fact that they are slowly abandoning their direct Java development model and are increasingly using Javascript (Rhino) for scripting and interfacing with Java libraries.

8.) Editing XML via DOM

Javascript has a robust, time proven implementation of DOM that makes it a worthy candidate for handling all kinds of XML vocabularies that a developer encounters.

9.) JSON

Although nowadays you can find language specific implementation of this elegant data interchange format in many languages, it was originally used in Javascript and still most applications involve Javascript-based AJAX applications.

10.) Prevalent support and acceptance

Even though it was the child of Netscape and its name “Javascript” is a Sun trademark, it enjoys acceptance by most vendors and has several implementation in various domains. Even MS has an implementation that bears the name JScript in order to avoid trademark issues

For all the above reasons I suppose it would be a good investment for a developer to brush up on his Javascript knowledge, going beyond basic syntax and applying methodologies like unit testing.

UPDATE: More stuff from Stevey’s Blog Rants: Rhino on Rails:

11.) Performance

“Rhino, in contrast, has a great deal of momentum. It’s been around even longer than Jython; it began life as a port of the SpiderMonkey (Netscape/Mozilla) JavaScript C engine, and it was written with an eye for performance. The Rhino code base reads almost like C code: it avoids allocation and does as much as possible with jump tables to avoid the overhead of virtual method lookups. It has two code paths: a bytecode interpreter that runs in a tight loop, and an optimizing Java bytecode compiler that turns many expensive-ish JavaScript property lookups into Java local or instance-variable lookups.”

12.) Specs

Unlike ALL mainstream scripting languages like Perl, Python, etc.Ruby Javascript actually has a real specification.

13.) JDK Support

Bundled in Java 6 it will be javax.script.

UPDATE #2: While going through the book “Understanding .NET” (by David Chappell) I found out something I didn’t know:

14.) JScript.NET

Visual Studio also supports JScript .NET and because it’s based on the CLR, the .NET version of JScript also implements CLR-style classes, which can contain methods, implement interfaces, and more. JScript can be used for creating essentially any .NET application!

Social Bookmarks:

Lightweight, time-proven approach to Java scripting

While recovering from mild surgery, I stumbled upon a post from Paris Apostolopoulos regarding the fact that the name Javascript is a bit misleading. I know there is a lot of media driven support towards Ruby, Groovy and similar “new” scripting languages, but I still find it natural to use Javascript as my preferred scripting language if I need Java libraries.

For this I use Mozilla Rhino, an open-source implementation of JavaScript written entirely in Java. Basically with Rhino you can import Java classes in your in your scripts and create objects.Here is a piece of Javascript (Rhino) code that uses the JasperReports (java) libraries:

importPackage(Packages.net.sf.jasperreports.engine);
importPackage(Packages.net.sf.jasperreports.engine.data);
importPackage(Packages.net.sf.jasperreports.engine.xml);
importPackage(Packages.net.sf.jasperreports.engine["export"]);
…
var jasperDesign = new JRXmlLoader.load(getInputStream(documentURI));
var jasperReport = new JasperCompileManager.compileReport(jasperDesign);
var jasperPrint = new JasperFillManager.fillReport(jasperReport,
           new Packages.java.util.HashMap(), dbConn);
new JasperExportManager.exportReportToHtmlFile(jasperPrint, “myreport.html");

There are a lot of things to consider when choosing a scripting language and I’m sure that there will be people saying that Ruby is better in this way or Groovy in another way but Javascript/Rhino feels natural and has the minimal learning curve due to the similar syntax.

BTW the Rhino engine is an integral part of Apache Cocoon that supports continuations.

UPDATE: Read Stevey’s blog on “Rhino on Rails”

Google Gears and others bite the dust..?

In an era where everybody has to offer something shiny for the development of the next generation rich internet (or rather networked) applications Google has released the beta version of Google Gears, their open source browser extension that enables web applications to provide offline functionality using JavaScript.

At first their product seems to have similar target audience with Java Web Start, that as we know never really took off. It is also interesting that Google’s proposal for offline apps is based on the traditional web development paradigm with:

  • A local server that allows a web application to cache and serve its HTTP resources locally, without a network connection and
  • A relational DB based on the open source SQLite that provides browser-local relational data storage to a JavaScript web application.
  • The API also provides a module called WorkerPool that provides mechanism for running intensive operations on the background without making the UI slow.

You can either install Google Gear beta and check out the samples or visit this blog that features a nice set of screen shots.

Delving into the 3 separate sub-APIs (1, 2, 3) my overall impression is that Google Gears seems like a wining product. Actually I have no doubt that we’ll see several implementations. What I cannot predict is whether Google will choose to develop a Gear’s version of GMail that will shift the balance in the Email client market, inevitably hurting Mozilla’s Thunderbird.

(off topic) Farewell Amalia

Today (1st of June) is “Amalia’s Day” for Greek bloggers.

“Before dying, she managed to document her experience and share it with us in her blog http://fakellaki.blogspot.com. The promising literature graduate named in there each and every one of the doctors she had to bribe, praising at the same time the ones that honoured the Hippocratic Oath. Her testimony moved thousands of people that stood by her side all the way to the end.”

“Amalia passed away on Friday, May the 25th, 2007. She was just 30 years old.”

Details in English | Περισσότερα

Not so well targeted Google Ads

Recently I had an interesting discussion with a colleague of mine about the dangers of importing dynamic content in your web pages with AdSense.

Google suggests that since AdSense crawls the content of your pages it delivers ads that are relevant to your audience and your site content—ads so well-matched, in fact, that your readers will actually find them useful. My colleague was worried about the cases where the bot didn’t work as efficiently as it should and the ads that are included are irrelevant or even “damaging”.

Visiting mqseries.net a couple of minutes ago reminded me of this conversation:

mq.jpg
mqseries.jpg

… and Gosling said: “You can use JavaFX for anything that you would use AJAX for”

With JavaOne heating up the news of yet another RIA product TM from Sun hit us. Only a short period of time after MS announced Silverlight, Sun seems to have rebranded the internal F3 project into something that looks like a declarative scripting language that will target desktop, web, and mobile devices.

Frame {

    visible: true

    content: Canvas {

        content: Mouse1d {

            width: 200

            height: 200

        }

    }

}

There is an article on infoworld with more details.

The battle for RIA is raging and for the first time since the launch of Java and the introduction of applets in the ’90s, that Sun has something new to offer.

XML aware front-ends and the talented MS Silverlight

As a small update on an earlier article about how XML-based front ends favor the adoption of XML technologies throughout the stack, I would like also to mention a newcomer: Silverlight from Microsoft.

Silverlight is a cross-platform, cross-browser web client runtime which facilitates a lightweight subset of XAML for building rich media experiences on the web.

For a demo visit Silverlight homepage and install the demo plugin.

What will be the answer from Sun? Here is an interesting suggestion from Yakov Fain…

Google uses “Roswell technology”

It is a fact: Google is using alien technology or I have just had a vision from the future.

Let me explain:

One of the Google services I use is Google Alerts to track newly published material in a variety of fields that interest me. As advertised on their page: “some handy uses of Google Alerts include: monitoring a developing news story, keeping current on a competitor or industry, getting the latest on a celebrity or event, keeping tabs on your favorite sports teams”.

Egocentric as it may seem, I also keep an alert on my name. Most results come from articles published or cross-published. Usually it takes days or at best several hours from their publication time, for new web pages to appear.

When I just posted my last article on Flex and saw it online, I visited my Gmail page and clicked on the tag for the Google alerts. Guess what:

In less than 90 seconds from posting to WordPress, Google Alerts had managed to find out about my new post and send me an email about it!!!

How the #@%&*% can you index the web so fast?!?

Social Bookmarks:

Developers ask, Adobe hears: Flex going open source

In older posts (or rather comments) I have mentioned that one of the biggest turn-offs for me regarding Flex was the fact that it was completely proprietary and closed… water-tight!

It seems that I wasn’t the only one with a problem so I just found out that Adobe plans to release source code for Flex as open source!

I don’t know how well this will work but it looks promising and as Yakov Fain mentions on his blog “there is already a decent number of developers who are interested in Flex and Adobe hopes that open sourcing Flex will bring more developers on board

RIAs favour XML technologies throughout all Web Application Tiers..?

Some years ago we witnessed the spur of XML frameworks that aimed to accommodate XML front ends for WAP enabled application. This trend passed as the “multichannel dream” faded away but I see this fashion forming again.

Today RIAs either using Javascript–based AJAX or Flex front-ends have become heavy XML consumers and there are many that advocate that the use of XML technologies throughout the development stack gives a competitive advantage, as long as there are no serious performance issues. This involves the use of native XML DBs, XML aware protocols and XML based frameworks like Oracle’s XSQL or Apache’s Cocoon.

I have experimented with a “full XML stack” and found that there are certain benefits like the fact that you avoid the typical domain mismatch etc.

Will we see again an XML frenzy like back in 2001? I’m not sure…

What happened during the “Enterprise Java Tech Day” event in Athens

For one more time the Java Hellenic User Group (JHUG) has provided the Greek developer’s community with an excellent event, where we had the opportunity to hear and learn from leading java experts. It was held in the “Park Hotel” and the facilities proved adequate even though the turnout was significant. The event was kindly sponsored by i-docs (IDEAL), which also held a lottery for an iPod at the end.

For those that couldn’t make it I will try to give an outline of the presentations using my notes. Since one of the things that stood out in this event was the authority of the speakers, the format will try to focus both to the subject and the presenter himself. I would like to notice that it is not feasible to write about everything that a speaker said, not to mention about the discussions that emerge during Q&A or the dialogs that take place during the breaks. That is why attendance to these kinds of events is irreplaceable! Posts like mine can only scratch the surface and give you a vague overview of the subjects presented.

The JHUG Intro

Paris Apostolopoulos opened the event and spoke on behalf of the JHUG.

Summury was:

  • 4th and best JHUG event [yes Paris it was great!]
  • Thanked the speakers and the sponsor
  • Javapolis 2006 bags will be given to attendees that give good questions [thanks BeJUG]
  • Introduced the new JHUG logo… wearing it on his t-shirt [tshirt.clone();]
  • JHUG site will port from PHP CMS to Java based solution (Confluence by Atlasian)
  • 5’ minutes about Javapolis 2006 memories:
    • BeJUG supports JHUG with some free passes
    • 2.800 developers, many speakers, 5 days non-stop [!]
    • The cost is not high
    • Location and venue were very nice
    • “Meet your java idols”
    • See you at the next Javapolis 2007 10-14 Dec

this.is.the.end(); [by Paris]

Dr Heinz Max Kabutz (Java Specialists)

Who is he..?

Dr. Heinz Kabutz is a Java Champion living in Greece. He consults, holds courses, programs, and – writes a weekly newsletter in which he shares some rather unconventional insights about Java. Things that push the envelope; make Java do things you thought it could not; dirty tricks and such. In other words, stuff you do not usually find in Java periodicals or newsletters.

You can find his newsletter at: http://www.javaspecialists.co.za/

His presentation: “Productive Coder”

It is always valuable to hear from Heinz. Every time I learn something new:

  • “Programming with ‘enjoyment’ in java”
  • “I know… in Greece no one gets paid to program”
  • Gave some nice HCI tips and views
  • Touch typing [haven’t seen anyone type code or bilingual that way]
  • Avoid the mouse [vi lovers rejoice]
  • Use IDE shortcuts [actually that was my latest post Heinz]
  • Gave a great demo with IntelliJ. Even Rod Hardwood (IntelliJ evangelist) learned something new J
  • If fingers are getting faster than brain -> think in higher level, eg. Patterns. “Patterns are like good red wine: as you get to know them you appreciate them more”.
  • Have good overall development processes
  • Use Doclets
  • Use proper comments. Excellent example of bad practise with java.awt.color.ColorSpace code
  • At this point my friend Panagiotis won a Javapolis bag for his question 🙂
  • Make everything as private as possible
  • Use immutable fields (generational garbage collectors treat short lived objects nicely)
  • Use proper exception handling
  • Careful with stuff like reflection and contemporary static analysis tools

Dr. Alexis Giotis and Mr. Pafsanias Ftakas (i-docs)

Their Presentation: “Java open source technologies applied on a mission critical business application (What we use, what we don’t and why?)”

The speakers gave a very interesting presentation in Greek regarding the various products, technologies and technical decisions they had to take to implement the i-docs product. Although at the beginning I feared that this presentation might end up a marketing hoax, as it went along, it kept my interest high and actually it gave me a motive to check out a couple of things they have used. I would like to see more of this kind of presentations from the Greek developer’s community.

Tom Baeyens (JBoss – RedHat]

Who is he..?

Tom Baeyens is the founder and lead of JBoss jBPM.

You can find his blog at: http://blogs.jboss.com/blog/tbaeyens/

His presentation: “jPDL: Simplified Workflow for Java”

-“Aaaaare youuu ready for some W O R K F L O W ?”
-…”yep”…
-I travelled all the way from Belgium to talk about workflow, and all I get is a “yep”??????

  • Workflow ~= state machines
  • What is a process language? (practically expresses execution flow) [continuations?]
  • Why use a process language?
  • When to use one?
  • Intro to JBoss jBPM (process virtual machine + langs)
    • Multiple process langs (jPDL, BPEL, PageFlow, XPDL)
  • Example: The door (open, close, lock etc.)
    • Java implementation
    • jPDL implementation: lots of state management = more nicely expressed with processes)
  • Task management in jDPL
  • Natural binding to Java
  • jPDL use cases:
    • Orchestration of asynchronous architectures
    • Orchestration of workflows
    • Sending email (is a wait state after all)
    • …..
  • Example of jPDL Persistence
  • jPDL features:
    • simple
    • powerful
    • embeddable
  • Not tight to JBoss AS

Patrick Linskey (BEA)

Who is he..?

Patrick Linskey is also a Java Champion that has been working with Java Data Objects for over 3 years and has been involved in object/relational mapping for 5+ years. As the founder and past CTO of SolarMetric, Patrick drove the technical direction of the company. Patrick has been the primary evangelist for JDO, having publicly spoken to rave reviews in numerous cities worldwide over the past three years. He is an active member of both the JDO 2.0 and EJB 3.0 expert groups. He has also worked for TechTrader, MIT’s Media Lab, Bank One, and MIL 3 in various technical roles. Under Patrick’s leadership, SolarMetric has developed the market leading JDO implementation with over 300 customers throughout the world spanning all industries. Now at BEA.

You can find his blog at: http://www.jroller.com/page/pcl

His presentation: “Introducing JPA (Java Persistence API)”

  • Intro to the EJB3 specs
  • JPA driving forces:
    • Ease of use
    • Pluggability (eg. persistence providers)
    • Testability
  • Change in Entities in EJB3
  • JPA Metadata:
    • Most have “intelligent” defaults
    • Still value to having XML configuration (along side annotations)
  • ORM Metadata:
    • Annotations- style (tends to clutter code)
    • XML style
  • JPA Example: A Session Bean
  • APIs for J2SE
  • JPQL syntaxt examples (bulk updates/deletes cool!)

You can find more information on “Using the Java Persistence API” presentation (video) by Patrick Linskey and Mike Keith.

Rod Hardwood (Jetbrains – -Intelli JIDEA)

Who is he..?

Rod Hardwood is a lead developer and evangelist for the IntelliJ IDE “the most intelligent java IDE” as advertised by JetBrains.

His presentation: “Tools for Agile Teams”

  • Outlook of trends in Java development (methodologies, dynamic langs, etc.)
  • Agility
  • “Flow” & tool UI
    • Avoid context switching!
  • IntelliJ IDEA is:
    • Code-centric
    • Keyboard friendly
    • Predictive
    • Support “intelligent” refactoring
    • Nice Navigation
  • InteliJ IDEA demo:
    • Quite impressive (smart completion and static analysis together!)
  • TeamCity intro
  • TeamCity demo [looked interesting].

UPDATE: Photos from the event (thanks papo)

UPDATE #2: Event got mentioned in java-champions.dev.java.net: “Dr. Heinz Kabutz ‘busy’ preparing for his talk at Hellenic JUG sponsored ‘Enterprise Java Tech Day’ in Athens Greece – Mar 10th, 2007 “

.

NetBeans Cheetsheet

This is a list of some facilities the current NetBeans editor offers, that help me reduce the number of keystrokes I have to do when typing code. Basically it consists of my favorite abbreviations that generate code from templates, plus some shortcuts to commands and actions available in the source editor. Some of these abbreviations and shortcuts are ubiquitous in contemporary java IDEs and some are specific to NetBeans.

These type of tools along with some macros that suit your specific needs (either from within NetBeans or from an external macro utility), can speedup the task of getting the stuff from your head to the computer. Usually I have a bunch of cheetsheets printed on small pieces of paper and pinned on the frame of my monitor so there are available whenever I need them with out having to loose focus from the window I’m working on.

Abbreviations

dowhile do {} while (condition);
forc for (Iterator it = collection.iterator(); it.hasNext();) {Object elem = (Object) it.next();
ifelse if (condition) {} else {}
sout System.out.println(“|”)
trycatch try {} catch (Exception e) {}
!cd <![CDATA[|]]>

Shortcuts

Ctrl-G Jumps to any specified line.
Ctrl-Minus (-) Collapses the block of code the instertion point is on.
Ctrl-Plus (+) Expands the block of code the instertion point is next to.
Ctrl-E Deletes the current line.
Ctrl-Shift-T Comments out the current line or selected lines.
Ctrl-Shift-D Removes comment from the current line or selected lines.
Ctrl-F2 Sets or unsets a bookmark at current line.
F2 Goes to next bookmark.

Social Bookmarks:

(Got blogtagged) 5 things you didn’t know about me

For those who might not know it, there is a game called “blogtagging” going around the blogosphere in which bloggers are sharing five things about themselves that relatively few people know, and then “tag” other bloggers to continue in turn.

I’ve been blogtagged by ppkp so here’s 5 things you (probably) didn’t know about me:

  1. I have a black female Standard Schnauzer, that keeps my feet warm whenever I have to spend a cold night working in my home office. Her name is Frida and she has a marvelous temperament.
  2. More than a year has passed since I finished my military service, something that adult men in Greece are obliged by law to do for 12 months. During that period I had basic training in Patras in the Technical Corps, served in Kos island (few miles from Turkish shores – 80 ΑΔΤΕ), got transferred to the “School for Technical Corps Officers” (ΣΤΕΑΤΧ) and finally ended up serving in staff of the Minister of defense (ΕΠΥΕΘΑ) just a few blocks from my home.
  3. Although it sometimes gets difficult, I try to have a healthy life-style. I don’t smoke, I rarely drink alcohol or coffee and most of the times I prepare my lunch from home and take it with me. Also I train with weights about 3 times every week and occasionally with kick boxing, rafting, latin/ballroom dancing.
  4. I am the type of person that keeps notes, schedules meetings, holds to-do lists and never misses contact information. Therefore since 1999 I daily use a PDA to manage all this information. This year I switched to Palm Treo 680 which is a marvelous device.
  5. In 2004 we got together with 3 of my friends and married the 4th one from the gang. People at the wedding where surprised to see 3 best-men… especially considering our outgoing nature. For a single guy back then, marrying a best friend sure changes the way he views life…

Now I pass the ball to Thodoros G. Karounos, Dimitris Andreadis and Spiros Tzavellas and Andreas Andreou

Social Bookmarks: