Jouw toekomst als Oracle professional – AMIS informatieavond over jouw ontwikkelingspad
Jan 24th
Als je dit leest en je bent Oracle professional – ontwikkelaar of administrator – is de kans groot dat je jouw carriere bent gestart in de jaren ‘90, in het tijdperk van Oracle7, Oracle Forms en Client/Server applicaties – net voor de opkomst van Java, internet, mobiel en SOA. Misschien ligt je start daar nog wel voor en misschien ben je van een tikje later. Maar in elk geval: je hebt een solide fundament en al vele jaren ervaring in Oracle technologie.
Nu is het 2012. En de afgelopen jaren is de technologie in hoog tempo ontwikkeld. Web 2.0 applicaties en multi-tier architecturen dienden zich aan en SOA, Service Bus en BPM zijn opgekomen. Java is overal – en HTML 5 staat op het punt om Flash en Silverlight te verdringen, in desktop browsers en in mobiele devices. Eindgebruikers worden mondiger en veel-eisender en real-time, push-enabled, BI-gedreven dashboards en multi-channel takenlijsten worden in snel itererende agile-projecten gerealiseerd.
Oracle 11g Database doet alle simpele DBA taken zelf – en de uitdaging voor de Database Administrator is verschoven naar groter en interessanter, zeker als 24/7 beschikbaarheid, virtualisatie en de cloud als infrastructuur opduiken. Middleware administratie en integrale security zijn zomaar twee nieuwe uitdagingen op de weg van de administrator, naast een verdergaande consolidatie en professionalisering van deployment en monitoring.
De uitdaging voor de Oracle professional lijkt duidelijk: hoe kies je je weg naar de toekomst? Om interessante klussen te blijven (gaan?) doen is het nodig om aansluiting te vinden bij de ontwikkelingen in de markt. Eerst moet je natuurlijk goed inzicht hebben in wat die ontwikkelingen zijn – in de markt in het algemeen en binnen de Oracle technology stack in het bijzonder. Dan moet je uitvinden hoe je vanuit je huidige kennis en ervaring de aansluiting vindt en jezelf prepareert voor het werken met de huidige en komende technologie. En tenslotte moet je het gaan doen – kennis vergaren, ervaring opdoen en je profileren om de passende klussen op te kunnen pakken.
Masterclass Oracle 11g voor Database Ontwikkelaars – haal meer uit SQL en PL/SQL in 11g
Jan 23rd
Aanstaande vrijdag 27 januari verzorgt Oracle ACE Director Alex Nuijten bij AMIS Services in Nieuwegein een Masterclass voor Oracle Database Developers: iedereen die met enige regelmaat SQL en/of PL/SQL toepast in zijn of haar werk. In deze Masterclass leidt Alex de deelnemers rond in Oracle Database 11g Release 1 en 2 met als voornaamste doelstelling de bezoekers in staat te stellen nuttig gebruik te gaan maken van de nieuwe mogelijkheden in deze 11g releases ten einde code simpeler, beter, sneller en functioneel rijker te maken.
Alex staat wereldwijd bekend als enthousiaste verteller en duidelijke explicateur (hij heeft met die eigenschappen al meerdere speaker-awards gewonnen op internationale conferenties). Hij combineert een duidelijk overzicht van de theoretische achtergrond met sprekende demonstraties en praktijkvoorbeelden. Deelnemers kunnen idealiter zijn some wat droge gevoel voor humor waarderen – en zijn in staat om in een tamelijk intensieve dag veel nieuwe kennis te verwerken.
Voor deze Masterclass is nog een beperkt aantal plaatsen beschikbaar. Zie http://www.amis.nl/amis-masterclasses/masterclass-oracle-11g-voor-database-developers voor meer informatie en inschrijving.
Create simple Java application to post JSON message to CometD Bayeux Channel using Apache HttpClient and Maven style NetBeans project
Jan 20th
The objective discussed in this article is to post messages to a CometD Bayeux Channel with a standalone Java Class – without dependencies on CometD. For example to control from Java the Slideshow introduced in the synchronized Slideshow demo application created using CometD (see previous articles Push based synchronized Slideshow demo application implemented using CometD and jQuery running on Tomcat and Publishing to CometD Bayeux Channel from inside the Oracle Database – PL/SQL based push to CometD Web Client ).
This article describes the creation of a simple Java Class leveraging Apache HttpClient to post HTTP requests (JSON messages) to a CometD Bayeux Channel. The main point is to show working code with the lest dependencies, not an optimal program (it is far from optimal). The article demonstrates how NetBeans and Maven conspire here to make the task as simple as possible. The Maven support in NetBeans allows me to simply create a new Maven style project of (arche)type Java Application.
Publishing to CometD Bayeux Channel from inside the Oracle Database – PL/SQL based push to CometD Web Client
Jan 19th
In recent articles, I have introduced CometD as framework for Server to Client and Client to Client Push: Running CometD 2 examples – locally on Tomcat using Maven and NetBeans http://technology.amis.nl/blog/14709/running-cometd-2-examples-locally-on-tomcat-using-maven-and-netbeans, CometD 2 Java Client Sample – open project in NetBeans based on Maven pom file, modify sources and run Java Based Comet Client (http://technology.amis.nl/blog/14720/cometd-2-java-client-sample-open-project-in-netbeans-based-on-maven-pom-file-modify-sources-and-run-java-based-comet-client) and Push based synchronized Slideshow demo application implemented using CometD and jQuery running on Tomcat (http://technology.amis.nl/blog/14870/push-based-synchronized-slideshow-demo-application-implemented-using-cometd-and-jquery-running-on-tomcat).
CometD allows web clients (or stand alone Java clients) to subscribe to Bayeux channels maintained by the CometD Server (Servlet). These clients can publish messages to the channels and CometD will deliver the messages to all or to selected clients – in a push-fashion. This makes it possible to push messages from the Java server side of a web application to web clients and indirectly to do the same between web clients. One example I have described of applying this technology is the synchronized slideshow: a web page is opened in two or more browsers. When a slide is selected in one of the browsers, the slide is selected in all browsers (because they all subscribed to the channel that a slide selection event was published to).

This article adds another push channel to the overall picture: it describes how the Oracle Database can publish directly to the Bayeux Channels (by posting to the CometD servlet over HTTP) and thereby perform push to the subscribed web clients. Database to browser push – how does that sound?
Sharing session state between JEE web applications through WebLogic session descriptor of sharing-enabled
Jan 18th
Session state in Java Web application is associated with a single (user) browser session on the one hand and typically with a specific web application on the other (server side) hand. Session state is created and maintained in the context of a usually a single web application. However…
We ran into a situation where our web application was assuming gigantic proportions. To complex to quickly deploy or even easily build, compile and test. On closer inspection, it was quickly revealed that the application really consisted of a number of relatively independent modules – say one for each of the options in the main menu and one for the entry point – main menu, login, manage user preferences etc. From a functional point of view, the big web app monster was by and large a collection of almost individual web applications. Almost because a substantial number of navigations took place between pages in these modules. And some context data – including credentials – should be passed on these navigations. The application was developed with such information stored in the session scope – as all modules always have access to a (shared) session scope, it was thought.
We got to the point where for many reasons we would like the big fat web application to be split in one web application per module. This would allow much easier development, administration, release management etc. However, we could not resolve this issue of shared session state that should be maintained across the web applications-per-module.
We contemplated moving this shared session state to a memory grid – but the impact on the existing application would be quite substantial (although an interesting challenge: introduce a new scope for managed beans (superapplication, cross-application or application-cluster) and create an EL resolver that knows where to find beans referred to with expressions like #{super-application.bean.property}; find a way for all applications in the applicationcluster to identify a user session in the same way to ensure the bean instance associated with the current session in the current application is retrieved).
An easier solution presented itself – after briefly conferring with Mike Lehmann of Oracle’s Application Server team – in the form of WebLogic Server’s session sharing capabilities.
Using custom functions in EL expressions in JSF 1.x
Jan 17th
EL expressions are one of the main driving forces for JavaServer Faces. Most dynamic characteristics of pages and widgets are governed by EL expressions. In JSF 1.x, there are some limitations for EL expressions that can at times be a little frustrating. One of the limitations is the fact that no custom functions or operators can be used in EL expressions. Quite some time ago, I wrote this article – http://technology.amis.nl/blog/622/how-to-call-methods-from-el-expressions-pre-jsp-20-trick-for-jsps-with-jstl – to demonstrate a trick for using a Map interface implementation to access custom functionality from EL expression after all.
However, things can even be better. Rather than jumping through the somewhat elaborate hoops of implementing the Map and consructing complex EL expressions, there are two other approaches. One is to create a custom EL Resolver can configure it in the faces-config.xml. Another is discussed in this article. It involves registering custom Java methods as eligible for use in EL expressions. And that really makes life a lot easier. It allows us to create EL expressions such as:
#{cel:concat (cel:upper( bean.property), cel:max(bean2.property, bean3.property), cel:avg(bean4.list))}
or
#{cel:substr(bean.property, 1, 5)}
Retrieve song lyrics in Java using Screenscraping with JSoup
Jan 16th
Last year I wrote about JSoup, a Java library that helps with screenscraping: Screenscraping from Java using jsoup – effective data gathering from websites (http://technology.amis.nl/blog/13121/screenscraping-from-java-using-jsoup-effective-data-gathering-from-websites). Last month I had another opportunity for using JSoup, this time to gather song lyrics for the songs on a CD. The context in this case was the internal SOA for Java Professionals training program at AMIS. The students did an assignment to complete the second block in this three-piece program. Their assignment required them to implement a Web Service that produced the CD Booklet for a certain CD – returned as PDF document with illustration, song titles and song lyrics. One of the resources we made available to the students was a Java Class that returned song lyrics. It was their challenge to integrate this class in a proper way in their application (be it PL/SQL, SOA Suite 11g or OSB based).
The LyricsGatherer is easily constructed using JSoup and the website http://www.songlyrics.com/ (that suffers from periodic and unfortunate loss of service) :

Using Java to create a report with the JasperReport java API
Jan 15th
In this blog I will describe how to create a Report with JasperReport in Java. For this purpose I have used the Communitie edition of iReport. This edition contains besides JasperReport also iReport. iReport is a report designer for JasperReport. You can download it from http://jasperforge.org/projects/ireport
After installation I started iReport to design a report. I have design a report to create CD booklets. It contains the name of the artist, an album title, an image, the tracklist and the lyrics of these tracks.

