my recent reads..

Atomic Accidents: A History of Nuclear Meltdowns and Disasters; From the Ozark Mountains to Fukushima
Power Sources and Supplies: World Class Designs
Red Storm Rising
Locked On
Analog Circuits Cookbook
The Teeth Of The Tiger
Sharpe's Gold
Without Remorse
Practical Oscillator Handbook
Red Rabbit

Sunday, February 24, 2008

Explaining Regular Expressions

Unless you get to work with regular expressions everyday, the details can easily blur. You remember enough to know when a regex could be useful, but not enough to write it without reaching for a reference manual.

There are a few tools out there to help you write and understand regular expressions, including some IDEs that can provide assistance (like Komodo).

Sometimes you just want a quick explanation of a regular expression you might have seen in some code. The YAPE::Regex::Explain perl module is one tool that helps you do just that. Turning the module into a simple command-line tool is a simple one-liner:
#!/usr/bin/perl -w
print YAPE::Regex::Explain->new($ARGV[0])->explain;
I've also turned it into a simple CGI utility for those times when my regex memory fails me. You can use it here: regexplainr (sorry, you may find that site offline but here's the source code).

In a previous post, On Parsing CSV and other Delimited/Quoted Formats, I used the following regular expression to parse a whitespace-delimited string:
"([^"]+?)"\s?|([^\s]+)\s?|\s
Regexplainr produces the following commentary:
The regular expression:

(?-imsx:"([^"]+?)"\s?|([^\s]+)\s?|\s)

matches as follows:

NODE EXPLANATION
----------------------------------------------------------------------
(?-imsx: group, but do not capture (case-sensitive)
(with ^ and $ matching normally) (with . not
matching \n) (matching whitespace and #
normally):
----------------------------------------------------------------------
" '"'

----------------------------------------------------------------------
( group and capture to \1:
----------------------------------------------------------------------
[^"]+? any character except: '"' (1 or more
times (matching the least amount
possible))
----------------------------------------------------------------------
) end of \1
----------------------------------------------------------------------
" '"'
----------------------------------------------------------------------
\s? whitespace (\n, \r, \t, \f, and " ")
(optional (matching the most amount
possible))
----------------------------------------------------------------------
| OR
----------------------------------------------------------------------
( group and capture to \2:
----------------------------------------------------------------------
[^\s]+ any character except: whitespace (\n,
\r, \t, \f, and " ") (1 or more times
(matching the most amount possible))
----------------------------------------------------------------------
) end of \2
----------------------------------------------------------------------
\s? whitespace (\n, \r, \t, \f, and " ")
(optional (matching the most amount
possible))
----------------------------------------------------------------------
| OR
----------------------------------------------------------------------
\s whitespace (\n, \r, \t, \f, and " ")
----------------------------------------------------------------------
) end of grouping
----------------------------------------------------------------------
(Permalink to this regexplanation)

Book tip: (thanks to Tony) O'Reilly's Mastering Regular Expressions. Available on google books, and also from Amazon.

Tuesday, February 12, 2008

Popflying the Oracle Community

Back last year I got all excited about Yahoo Pipes ( Web 2.0 Wake-up Call for BPEL? ) and its graphical approach to building mashups. In fact I still use a Pipes mashup as my mega-aggregated Oracle newsfeed.

Now I've discovered a new toy - Microsoft Popfly - and finally a reason to install Silverlight! I remember popfly getting mentioned in Bex Huff's roundup of mashup tools last year, but at the time it was still in restricted beta.

Popfly's still in beta, but now open to one and all. Put aside your biases for a minute and go play ... if you are like me, it will blow your mind. It may not be the final word in mashup tools, but it sure opens your mind to what should be possible.

Here's a little mashup I created 5 minutes up the learning curve. It's a cute display of the latest photos posted to the Oracle Community site:


Postscript: yes, you do need Silverlight installed for this to work of course. Silverlight is available for "all major browsers running on the Mac OS or Windows". If you are not prompted automatically for the Silverlight install, visit the Silverlight site.

Monday, February 11, 2008

Supporting Singapore's bid to host the Youth Olympic Games 2010


I just discovered the online campaign to support Singapore’s bid for the Youth Olympic Games 2010. It would be truely great to see the event held here, and Signapore's certainly got the location, facilities, environment and culture to do a great job.

And to be fair, better chances than ever hosting the full Olympic Games!

So I've registered my support, and you'll see the logo flying on my blog from now on;-)

If you want to support the bid on your blog, just register here.

Postscript 21-Feb-2008: Singapore Wins!
Support Singapore YOG 2010

Sunday, February 10, 2008

On Parsing CSV and other Delimited/Quoted Formats

Parsing delimited text that may have quoted elements is a perennial requirement. Quick-and-dirty parses can be achieved with regular expressions, but for more flexible and encapsulated parsing I've been checking out the opencsv java library. Hat tip to Jakub Pawlowski for highlighting the library on his blog

A Regular Expression Approach
Just recently I released and blogged about a JDeveloper Filter Add-in, and it contains a class called ExecShell [API, source] which needs to know how to break a command line into its component arguments. The command line is of course space-delimited, but may use quotes to group an argument with embedded spaces (so a simple split on spaces won't do).

The salient code below uses the REGEX to chop theCmdLine String into theCmdArray Vector of arguments:
Vector<String> theCmdArray = new Vector<String>(0);
String REGEX = "\"([^\"]+?)\"\\s?|([^\\s]+)\\s?|\\s";
Pattern p = Pattern.compile(REGEX);
Matcher m = p.matcher(theCmdLine);
while (m.find())
{
theCmdArray.add( m.group().trim() );
}

The regular expression bears a little explaining, and is inspired by this example. Here's how it breaks down:

\"([^\"]+?)\"\\s?
Matches a group within double-quotes. Group is a lazy match on one or more characters except double-quote. Optionally followed by some whitespace
|([^\\s]+)\\s?or Matches a group delimited by whitespace, optionally followed by some whitespace
|\\sDiscards a pure whitespace match

In this case, we are using whitespace as the delimiter (appropriate for command lines). The regex can be adapted for other delimiters by replacing \\s with the delimiter. For example, to handle a comma-separated format:
String REGEX = "\"([^\"]+?)\",?|([^,]+),?|,";

Using OpenCSV
The same space-delimited parsing requirement can be met with a couple of lines and the opencsv library:
CSVReader reader = new CSVReader(new StringReader(theCmdArray), ' ');
String[] s = reader.readNext();

Simple, yet currently not so robust. Since we define the delimiter to be a single space (over-ridding the default comma), other whitespace characters (like a tab) will not be recognised. Further, repeated spaces will not be coalesced, but will each be treated as the delimiter for a new element.

Internally, CSVReader parses the input character-by-character and so adapting to handle repeated delimiters as one would be reasonably straight-forward.

Saturday, February 09, 2008

The Right Way To Do Wrong - a good read for security buffs


The Right Way To Do Wrong - An Exposé of Successful Criminals is a very old book, published in 1906. I was intrigued since it was written by Harry Houdini, and I hadn't realised he was also an author.

Houdini's motive for writing the book is to warn off the righteous by educating them in all forms of devious frauds and scams, and to cause those less well intentioned to give pause before taking up a life of crime.

Reading the book over 100 years after publication, I am amazed - but perhaps on reflection not surprised - that Houdini manages to describe in great detail just about every Internet-related scam in existence (allowing of course for a transposition of technology)!

When he talks of Begging Letter Swindles, think Nigerian Letter or "419" Fraud. For Tricks of Bunco Men, see Advance Fee Scheme. The ease in which Impersonation/Identity Fraud was practiced in a pre-IT age... and just about every other gambit you can find on the FBI Common Fraud Schemes site.

If you are into IT Security, I think you'd enjoy reading this and mulling over the relevance to your day-to-day work. It is salutary to realise there is nothing new in the Evil that Men do, just new ways of doing it!

I listened to The Right Way To Do Wrong in audio from LibriVox. It is also available in print from Amazon.

Monday, February 04, 2008

iTunes and DRM - Destroy Real Music

Ignatius Low gets nostalgic over music in it's physical form in an article for The Straits Times today (I still want a CD I can hold - Feb 3, 2008 - article is only available to online archive subscribers. ST hasn't quite caught up with the NYT yet!).
ABOUT a month ago, I made my first purchase from the Apple iTunes Store. It was a tedious and deliberate process, given that the iTunes Store hasn't been launched in Singapore yet, but it had to be done..

He goes on to question what would be lost if the world does move wholesale to digital downloads .. nostaligic memories of browsing for music with friends in the local record shop .. the personal stories forever tied to each CD or LP on your shelf.

Travelling and the Real Music Store Experience
Thankfully, we haven't totally lost the music store experience yet, although it is dominated by the major chains like HMV. I hope we never lose it. It would deprive me of one of the most enjoyable travel activities - whenever in a new city, I always try to make time for a few hours at a local music store to browse and buy. It is a great way to get a lock on the local music culture and discover some amazing artists.

DRM - The Worst Idea Ever Foistered on the Music Industry
There is a more insidious side to the whole digital download approach to purchasing music. Its called DRM - Digital Rights Management (or Destroy Real Music if you prefer). Still in use for most music on iTunes, DRM restricts your use to iTunes and iPod, and you only get 5 chances to register with another computer (like if you re-install or upgrade). Apple of course are not exactly forthright in telling you all this, prefering to regale you with all the benefits of digital downloads.

To make a LOTR analogy, its as if DRM is the poison holding Théodred under the spell of the wicked Wormtongue (read RIAA).

When I look at my record collection, I see the albums I inherited from my parents - even grandparents - and remember the thrill of exploring and learning to appreciate all this old and unusual music. I was the new generation rediscovering the musical gems of my elders, and I think a critical step towards musical maturity. It is how I found a place in my collection for Les Paul & Mary Ford, Duke Ellington and Fats Domino along side Iron Maiden, Madonna and Regurgitator.

If DRM and digital downloads become the way of the future, then this is one formative experience I will be unable to bequeath to any grandchildren I may be lucky enough to have.

The Dawn of a DRM-free Golden Age?
Thankfully, DRM seems to be on the way out - at least for music if not movies for the time being. And anyone who really cares about music should add their strength to kill it good and proper as soon as possible. EMI were perhaps the first major label to signal the trend, and break away from Wormtongue's spell.

The EMI move significantly bolstered Amazon's move on itunes with their DRM-free MP3 store (although in a perverse turn of logic, I can order physical CDs from Amazon yet because I live in Singapore I still cannot purchase their mp3 download versions. Go figure!)

Amazon's move was likely no insignificant factor in Apple now moving to dump DRM in their new iTunes Plus service (probably more correctly called iTunes Minus). Aple are still extremely coy in telling their users what's really going on (try searching for DRM on the iTunes site). I think it is scandalous how little information is provided to iTunes users about the DRM restrictions that are still applied to the majority of songs you can purchase on iTunes.

To put it simply: beware!
  • When you purchase music on iTunes, it is still DRM-locked, unless you are clearly given the iTunes Plus purchase option.
  • If you buy DRM-locked music on iTunes which is later made available unlocked in iTunes Plus, you can upgrade but you will have to pay for the privilege of getting you music purchases switched over (currently 40c per song or 30% of the album price)

Personally, I plan to stick to purchasing CDs, especially with so many available today at a nice price (like S$11.95 and up for recent chart albums). When amazon finally make the mp3 store available to me, I'll probably use that for the odd purchase (especially for individual tracks).

But iTunes? Sorry Apple. I love your iPods, but your support for DRM leaves such a bad taste that even now that you are reforming I will run a mile before willingly purchasing from your store.

Thursday, January 31, 2008

JDeveloper Filter Add-in Now on Sourceforge

I introduced the JDeveloper IDE External Filter Add-in project last weekend. Happy to announce that the project's registration on sourceforge is complete, so full source and downloads are now available from the sourceforge jdevfilter project page.

Tux gets his break with OS/2

Staying with my OS/2 reminiscence for a moment, there's a trove of old gems up on YouTube (including the famous quote from Bill "we believe OS/2 is the platform for the 90's").

While IBM ads in the US defied the limits of corny, in Japan it is all so kawaii.

Of course! The correct way to market an operating system is with a TV star/model (Yamaguchi Tomoko 山口智子), a bear and a penguin.

At least we know what Tux was up to before he got his big break with Linux in 96...taking gigs playing "DOS" and living it up in Ropongi!

Tuesday, January 29, 2008

OS/2 Still Kicking..!?

I was pretty amazed to see IBM responding as recently as 16-Jan-2008 to the requests by the OS/2 online community to open source OS/2.

I've admitted before to being an OS/2 fanatic for a few years, but seriously, I think we should let it die and just savour the memories!

One of the great things about the OS/2 community way-back-when is that it was a total geek-out (memories of the OS/2 Devcon in 1992 - still have the bag tag!). Linux has I think long taken that mantle.



It's a bit of a laugh to find some of my OS/2 detritus still kicking around the Internet, like:
I had fun with a couple of other projects that never made it to release (in both cases beaten to the post by the big boys. But dang it, no M&A windfalls in those days!):
  • LNDW - Lotus Notes Doorway. I wrote a web server in C++ that provided gateway access to Lotus Notes database under OS/2. Tricky adaptation of the Notes C API to C++ and getting it to work with BC++. Then came Domino...
  • OS2IP - a project with a long-lost collegue Bryan Ryan (if you are out there Bryan - drop me a line!). At the time, there was no free TCP/IP stack for OS/2 Warp, so we set about writing one. Got as far as an NDIS packet driver, and a user mode frame interface before IBM finally got their act together and made us obsolete! Nevertheless, good fun hacking around with the Driver Dev Kit in assembler, and bridging to a C++ user-mode API. I don't think it was until then that I really understood Comer in detail. When you are working at that level, it is amazing how exciting exchanging just a few bytes of data in a chat application can be!

Saturday, January 26, 2008

JDeveloper Filter Add-in

I hinted at a project to develop a simple filter add-in in my last post on Code Generation with JDeveloper. So that turned into my latest weekend project;-)

I'm registering the project on sourceforge, but in the meantime you can get the full source kit here, or if you prefer just the add-in jar here (which just needs to be dropped into your ${jdev.home}/jdev/extensions folder). [30-Jan-2008: the project is now available on sourceforge]

What does it do?
It is a simple idea. Allow you to invoke an external program to filter any text you have selected in the JDeveloper Editor. Of course, it is up to you to define what filter means - limited by your imagination only. And by externalizing the filter process, it means you can use the tool or scripting language of your choice to implement and make on-the-fly changes to your filter.

To be precise, the filter operates like operating system pipes:
  • Selected text is sent to the standard-input of the filter process.
  • The standard-output of the filter process is written back to replace the selected text.

Configuring the Filter
Configuration is done via the JDeveloper Tools | Preferences menu, and is very simple at present. It only supports a single filter process definition. As you can see in the screenshot, you just need to enter a valid command line to invoke the filter. A nice enhancement would be the support for multiple filter definitions.


This is where the flexibility comes in. As an example, I've provided a rot13 encoder written in ruby [samples/myrot13filter.rb in the source kit].
puts $stdin.readlines.to_s.tr("A-Za-z", "N-ZA-Mn-za-m")

Ruby, Perl, php, vbscript/WSH, bash ... use whatever you prefer. Rather than needing to develop and deploy an add-in in Java, you can just script the filter.

Applying the filter is simply a matter of selecting some text in the IDE, and choose the Custom Text Filter item from the right-click pop-up menu

The Development View
The truth is that I developed this add-in as more an investigation of the Extensions SDK, and the filter idea appeared to be unexplored territory.

As Brian Duff writes, there are some major improvements in the support for JDeveloper Extensions in 11g. Since it is still in preview, I decided to stick with Extension SDK 10.1.3 however.

There are four classes of significance. since this was an educational exercise, I spent a bit of time to make sure I really understood how it all worked, and tried to reflect that with liberal comments in the source.
  • CodePaneAddin - implements the pop-up menu hook and applies the filter
  • ExecShell - wraps the invocation of the filter process iwth stdin/out handling. It is independent of the extension API and may be of interest in its own right
  • ConfigPanelData - handles preferences panel configuration
  • ConfigData - bean to wrap the configuration data


The source kit comes with a JDeveloper project and also ant build file. If you want to build and deploy the add-in to JDeveloper, simplest is to first check the environment-specific settings in build.properties and then simply run
C:\MyDocs\MyDev2\JDevFilter>ant deploy
Buildfile: build.xml

init:

prepare:

compile:

jar:

deploy:
[copy] Copying 1 file to C:\oracle\jdevstudio10131\jdev\extensions

BUILD SUCCESSFUL
Total time: 0 seconds

Interested? Head on over to sourceforge to download the kit.

Sunday, January 13, 2008

Code Generation with JDeveloper

I've written about Jack Herrington's Code Generation in Action before; it is a great book for stimulating your thinking on how you go about producing code.

JDeveloper has evolved into one of the strongest IDEs when it comes to code generation. It's not explicitly mentioned in the book however. That's not a criticism of the book, but it does beg a review of how JDeveloper stacks up against the concepts covered.

Integrating code generation into your IDE


Writing a code generator can be difficult-but convincing your fellow engineers to use [it] can be even more difficult. The key .. is to make it as simple as possible to use.
IDE integration is one approach to address this problem, and the common techniques supported are external tool invocation and filtering.

JDeveloper only directly supports external tool invocation (see the Tools menu). For instance, you can call simple Ruby scripts like the following to perform file-level processing (this example simply comments each line of the file that is currently open in the editor pane).
fh = File.open( ARGV[0] )
text = fh.read()
fh.close
text.gsub!( /^/, "// " )
File.open( ARGV[0], "w" ).write( text )


NB: in the 11.1 preview, it seems the "Availability" conditions are still a little broken and it is not possible to make commands available only when a file (or certain type of file) is open.

Filters are not directly supported by JDeveloper, however implementing a filter is a fairly straight-forward project using the JDeveloper Extension API.

JDeveloper Extension API


Herrington does not directly address the topic of IDE APIs, which is understandable given the scope of his book. However if you are looking to implement complex and very specific code generation approaches you will probably want to look into this topic further.

JDeveloper comes with a comprehensive Java-based extension API which was significantly revamped in (I think) 10.1.3 to bring it into line with the standardisation efforts of JSR-198.

I must say documentation of the extension development process is a little thin. And it is only in 11.1 that JDeveloper has explicit project support for extension development (although I find it a little broken and mysterious in the preview edition). The best approach at present seems to be good ol' copy-and-modify the extensive set of samples provided by Oracle at the Extensions Exchange. There is a growing number of 3rd party open source extensions that are even available through the JDeveloper Check for updates menu.

Still, no filter add-in is available, and you are of course stuck with developing in Java. It of course puts me in mind of a little project: a simple filter add-in that then allows you to invoke a filter process developed in the language of your choice such as perl, ruby or python. Maybe I'll be able to follow-up this post with an example;-) PS: yes I did; you can read about it here.

JDeveloper's Generation Credentials


I've been hedging around the fact that JDeveloper is very significantly geared towards code generation itself. It is one of the main drawcards for why you would use it over your favourite text editor.

In the back cover of the book, Herrington includes a very illustrative Generator Tree which provides a taxonomy of generators, with of course references back to what is covered in the book. I thought I'd experiement with mapping JDeveloper into the taxonomy. I doubt if I'll manage to cover all of JDeveloper's features (or get it all right), but here goes:

ClassPlatformTechnologyHerringtonJDeveloper
Database AccessMSASPASP Generatorn/a
ASP.NETASP.NET Generatorn/a
JavaEJBEJB GeneratorEJB Entities from Tables
JDBCJDBC GeneratorADF Business Components
JDBCn/aToplink O-R Mapping
PHPPHPPHP Generatorn/a
PerlDBIPerl DBI Generatorn/a
User InterfaceJavaJSPJSP GeneratorJSP/struts/JSF wizards
SwingSwing GeneratorSwing wizards; ADF Swing wizards
MSMFCMFC Generatorn/a
DocumentationSQLSQLSQL Documentation Generatorn/a
JavaJavaJavaDocJavaDoc
Unit TestsCTestsAugmented C Unit Test Generatorn/a
Ordered TestsOrdered Test Generatorn/a
Test Datan/aTest data generatorn/a
Test Robotsn/aTest robot generatorn/a
File FormatsJavaCSVCSV file Reading Java GeneratorFile Adapter
JavaData AdapterData Adapter Generator(arguably) File Adapter; Toplink
JavaBinaryBinary File Reader Generatorn/a
Web ServicesJavaXML-RPCXML-RPC Generatorn/a?
JavaSOAPSOAP GeneratorJava Web Service from WSDL
PL/SQLn/aPL/SQL Web Service
JMSn/aJMS Web Service
Variousn/aTechnology Adapters
Business LogicJavaMathEquation Generatorn/a
JavaReportsReport Logic and Interface Generatorn/a
External Libraries*C++DLLDLL Wrapper Generatorn/a
Scripting LanguagesC++External Language Wrapper Generatorn/a
Configuration*FirewallanyFirewall Configuration Generatorn/a
Reference Data*anyLookup Function Generatorn/a
anyMacro Lookup Table Generatorn/a

*I've reclassified these items from the original table in the book.
NB: I generated the table above using an OpenOffice Calc spreadsheet [generator-taxonomy.ods]. Good example of dog-fooding perhaps;-) I've always found Excel/Calc to be really useful tools for rapidly generating scripts, SQL or HTML fragments like this.

With so much capability in JDeveloper, you might expect instant adoption. But there are of course two classic issues still to be addressed:
  1. There's quite a steep learning curve until you get comfortable with what features are available, and when they are appropriate to use. The rapid enhancement of JDeveloper and all the technology over the past few years means that your average dev shop probably doesn't have the luxury of many gurus who can coach the team either
  2. It seems to be an inherent trait of developers (arguably a good one), that generators and wizards are not fully trusted and accepted until you've had the chance to dig down under the covers. That's simply a lot of work for all of JDeveloper's features, and there isn't a great deal of information available to help your short-cut the process.
The natural conclusion is that to optimise adoption, I'd exhort the JDev team (and the community of users) to put as much effort as possible into producing resources for JDeveloper's code generation (wizards etc) and extension SDK. Importantly, to put the stress on explaining the how and why these things work (not just step-by-step tutorials).

Postscript:

Tuesday, January 08, 2008

2007 In Review

Picking up the idea to present "my blog-year in review", by taking just the first complete sentence each month's post (remembering not to make this the first post for Jan;-)

January Apache Axis2 is the core engine for Web services.
February I've been working a bit with Oracle's OCCI (the C++ API for Oracle Database), and stateless connection pools in particular.
March Recently wanted to track down the details of the process that had a specific port open.
April "Where's the alert log?" .. usually the first thing you want to know when looking at a new database.
May Say you have a connection to a remote Oracle Database server and want to get the ORACLE_HOME setting.
June A little while ago I got to dust off my C++ skills for a project that was to use Oracle Database (via OCCI) and also Websphere MQ
July This week its my pleasure to host Log Buffer #54, the Carnival of the Vanities for DBAs.
August I've just spent the past few days at Oracle OpenWorld Asia Pacific in Shanghai.
September I've blogged previously about playing with the reCAPTCHA service in Perl.
October I had the privilege of listening to Kevin Walsh's "30/30" presentation last week.
November Well, today is my first as a member of the Oracle Alumni
December Laurent Schneider just asked what LinkedIn is good for?.

Hmm, very geek. What's not listed is the post that generated the swiftest, strongest reaction: Ballmer Peak and the Programmers' Paradox, which probably goes to show that frat humour is the surest way to internet fame;-)

During the year I also started blogging quick reviews of all the books I read over at PrataLife. So as a variation on the meme, here's my Book-Year In Review:


July
The Extraordinary Adventures of Arsène Lupin, Gentleman-Burglar (audiobook)
August The Ambler Warning
September A Different Point of View (audiobook)
October The Warden (audiobook)
November Code Generation In Action
December Quarter Share (audiobook)

The number of audiobooks is a bit misleading, as I'm sure I actually read at least as many on paper (although Neal Stephenson is slowing me down a bit at the moment!). And ye gads, only one tech book! But this is to be expected: with fiction its easy to read and do a quick blog entry, whereas technical non-fiction is generally not suited to blogging an instantaneous reaction. They'll tend to stay on my desk/shelf for a probationary period;-)

Monday, January 07, 2008

Backup your WebCenter Wiki. Yikes!

Previously I wrote about installing Oracle WebCenter Wiki, and also had my 2c worth.

One of the surprises is that it uses file storage by default. Database storage seems to be a work-in-progress (Toplink, hibernate and HSQLDB are all involved somehow), but not a documented option at this point.

Now if you are going to run WebCenter Wiki for real, that means as a dilligent system admin you want to be pretty sure you really understand how the file storage is working so you can have good backup and recovery procedures in place.

The documentation on Backing Up and Restoring Wiki Content sounds straight-forward. Just make a backup of the OC4J_HOME/applications/application_name/owc_wiki/pages folder.

But BEWARE!

Gotcha #1: Don't Forget Your Toothbrush!
A little poking around, and it is clear that this is NOT all you need to backup. I've noted content modifications in at least the following locations also:
OC4J_HOME/applications/application_name/owc_wiki/attachments [any uploaded attachments]
OC4J_HOME/applications/application_name/owc_wiki/templates [added/changed page templates]
The jzwiki backup/restore instructions also tell you to backup WEB-INF/classes/yawikiDB.script (WebCenter wiki is based on jzwiki)

So to be sure you haven't left anything behind, I'd suggest you probably want to be backing up the entire OC4J_HOME/applications/application_name/owc_wiki directory structure no matter what the doc says, and practice some restores!

Gotcha #2: Beware of EAR Re-deployments!
If you've worked with OracleAS/OC4J deployment before, and also noticed that the wiki content is stored in the application directory structure, I hope it rang an alarm!

Yes, if you touch or replace the owc_wiki.ear, then say goodbye to your wiki content and pray your backup is good and not too old! OC4J will redeploy the application and give you a nice fresh install, deleting all your wiki content and customisations;-)

I have always had a sneaking suspicion that there can be other circumstances in which OracleAS/OC4J may choose to redeploy an EAR. I can't really substantiate this, but I have had situations in production where EARs are redeployed for no immediately apparent reason.

This is of course very hairy for any non-trivial production deployment. The obvious first step would be to configure wiki content storage to some other location. This isn't documented however, and I'm not sure if its even possible with the product as it is.

So for now, it seems just backup or rsync deep and often, and enjoy the view as you walk the edge of the abyss;-)

WebCenter Wiki Future?
So far, there's no real news on what is planned for WebCenter Wiki in 11g. If you've read my posts, it will come as no surprise that my view is the 10g wiki is far from production-ready.

Which makes the question of what is in store for 11g so interesting. Maybe a significant revamp of the 10g (jzwiki) wiki? Maybe an internally developed replacement based on Content DB or UCM?

Or maybe something completely different? A collegue pointed me to Jive Clearspace today .. "discussions, blogs, files, instant messaging, and wiki documents under one unified umbrella" .. and since Oracle already have Jive Forums integrated in WebCenter it raises interesting possibilities!

Tuesday, January 01, 2008

Ringing in the New Year with a timely reminder from xkcd

I've refrained from reposting xkcd for a while, but this is just too good! So where did you leave your key-ring last night, huh?


Happy New Year!

Sunday, December 30, 2007

Does your team have "hustle"?

I was reminded recently of a quote from Frederick Brooks' classic The Mythical Man-Month
A baseball manager recognizes a nonphysical telent, hustle, as an essential gift of great players and great teams. It is the characteristic of running faster than necessary, moving sooner than necessary, trying harder than necessary. It is essential for great programming teams, too.

Hustle. You'll know it if you've got it, but if you don't, then how do you get it?

Knowing that you should even be asking this question is I think a good indicator that as a Project Manager you may even be on the road to becoming a great Leader! Peter Drucker wrote "Management is about human beings. Its task is to make people capable of joint performance, to make their strengths effective and their weaknesses irrelevant."

The term management has of course been so abused and ridiculed (thanks to Scott Adams et al and untold thousands who have assumed the title but not the competence) that its common usage is a far cry from Drucker's meaning, which I personally define as the nexus of (little-m) management [the science of knowing] and leadership [the art of making things happen].

So back to the question of hustle. Probably the most common problem I've seen in practice is that you have a team of really smart people, but they simply can't fix on what to hustle about. Either they've lost their way (like after a major release), or never found it in the first place (can't pin down some fundamental vision, design or architectural issues). Once you are underway however, a problem common to large projects is that your day-to-day/week-to-week work is just lost in this huge 18-month timeline. You can't hustle for 18-months straight, so why hustle at all?

Now anyone in the business of development will immediately think of a few methods-du-jour for tackling these kind of situations: scrum, prototyping, XP etc.

Common to these methods is the idea breaking problems down into achievable steps or iterations, and importantly emphasising the delivery of something concrete each time.

To generalise, they provide a sense of "where we are", and a series of tangible near-term goals for "where we want to go".

In other words, find a sense of purpose and you're on the way to unleashing some hustle.

Now isn't that what good leadership is all about? Having a clear vision. Understanding the people in your team, how they are motivated, how they are "blocked". And then creating the circumstances under which the team can realise the vision.

As a Project Manager responsible for delivering results, every tool deserves to be questioned and considered as part of your strategy.

Take something as fundamental as your project plan/gantt chart. Based on average software project success rates, there's upwards of a 70% chance your project plan is just lulling upper management into a false sense of security, while also serving as a daily reminder to the team of the impossibility of the task at hand. Why do you even bother?

If you are going to toil over one at all, consider whether it is really doing the job of communicating where we are/where we want to go to the team. Is the team reading it? Does the team even have access to it??

Is it posted up on the wall, and referred to whenever two or more team members are having a conversation? Or is it a crufty bit of detritus that lives in a folder that no-one other than the PM uses (and they don't have MS Project installed anyway)?

Worse yet, is the cryptic, mystical project plan actually contributing to the fuzziness of the team not really knowing exactly where we are or where we are going? And killing any hope of seeing some hustle..

Thursday, December 27, 2007

Migrating to a Virtual CVS Host

Seasons greetings to all! Of course, a few days off means time for some of those special projects that have been waiting in the wings;-)

I run a cvs repository for my personal use at home (migrating to subversion is a project for another xmas break). There are two stupid mistakes in the setup I've wanted to fix for a long time.
  1. It is running on the main machine I use for testing and development, which can lead to some tricky catch-22 situations. Duh!
  2. I've always used the servername to access the repository, which makes relocation a pain. This seems to be a problem common to the many development shops I have seen. Gold stars for actually using source control, but brickbats for not thinking of using a virtual host name before finding yourselves tied to a specific host!

The Relocation


Actually, by moving to a new server I mean old laptop .. it is easy to write-off a 256Mb 600MHz machine these days, but they really do make decent "network utility" servers! Running Linux of course. Ideal for just sitting in the corner and running your crucial network services day in, day out. Like cvs.

Since I was migrating the cvs repository from another Linux machine, the move was a piece of cake. The following notes assume Red Hat (or Oracle Linux), which is what I am running. It also assumes the cvs repository is at /cvsroot and the cvs user account is called cvs (just substitute your actual details where approriate).

CVS Setup - New Server
Most Linux distributions will already have the cvs server installed (but not configured or running). Since I'm on Red Hat, I can check for the cvs package using rpm:
$ rpm -qa | grep cvs
cvs-1.11.2-27

If you can't find the server package, download and install as appropirate for your distro.

Setting up the CVS Service
Create a new cvs user and group to own the repository.
[root@new server]# /usr/sbin/groupadd cvs
[root@new server]# /usr/sbin/useradd -g cvs cvs
[root@new server]# passwd cvs

Check that the service name is listed in /etc/services
$ grep cvspserver /etc/services
cvspserver 2401/tcp #cvs pserver process

To get the cvs server under xinetd control, create /etc/xinetd.d/cvspserver:
service cvspserver
{
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
server_args = --allow-root=/cvsroot -f pserver
}


Move the Repository Files
Normally at this point you would initialise a new repository if you are setting up a server from scratch (cvs -d /cvsroot init). However in this case I'm moving the repository files from the old to the new server. For me, this meant tar/gzip of the /cvsroot, ftp the archive to the new machine, and unzip to re-create /cvsroot.
[root@old server]# tar -zcvf cvsroot.tar.gz /cvsroot
[root@new server]# cd /
[root@new server]# ftp {file from old server}
[root@new server]# tar -zxvf cvsroot.tar.gz


Starting the Server
[root@new server]# /etc/init.d/xinetd restart
Voila!

Switching to a Virtual Hostname


OK, now we get to the main point of the post - using cvs with a "virtual hostname". I mean of course using a name that belongs to the cvs service rather than any particular server, which will make future relocations to new servers a breeze if it becomes necessary.

So where I used to access "server1.mydomain.com", I will now use "cvs.mydomain.com". These names can be resolved by DNS or hosts file. They could actually map to different IPs (i.e. use virtual IP address also), but in my case I have just setup "cvs.mydomain.com" as an alias for my new server's IP address.

To preconfigure the cvs environment for Linux users I add the following to /etc/profile:
export EDITOR=/bin/vi
export CVSROOT=:pserver:$USER@cvs.mydomain.com:/cvsroot


Migrating CVS Clients
Now what about all the cvs "clients"? Strict protocol would suggest you should make sure everything is checked in before the server move, and check out a fresh copy from the new server when it is ready. This is not really a nice way to go for at least two reasons:
  1. You'll probably miss something that needs checking in
  2. If you have directories with a mix of cvs controlled/non-controlled files you have an interesting mix-and-match problem to get everything back in sync
Fortunately there are some tricks you can employ to do an "in-place" migration of modules checked out on the client. Basically we just need to update the CVS/Root files with the details of the new server.

Here's a quick perl recipe for updating all of the CVS/Root files under the current directory in Linux:
perl -i.orig -pe "s/myacct\@server1.mydomain.com/mynewacct\@cvs.mydomain.com/g;" $(find . -name Root)

On Windows, you can use the extended FOR syntax to descend the directory tree:
for /R %r in (Root?) do perl -i.orig -pe "s/myacct\@server1.mydomain.com/mynewacct\@cvs.mydomain.com/g;" %r

These perl one-liners (-e) loop line-by-line (-p) through the file, modifying it in-place while also creating a backup file with the .orig suffix (-i.orig). Each line of the file is evaluated with the global search and replace regular expression (s///g).

Tuesday, December 18, 2007

An Ode to SOA - The Story of Eric the Architect

I recently discovered the following manuscript in my attic. It was an emotional moment, being my chronicle of the friendship I shared with a pioneer of the information age. Ultimately rejected and disowned by is peers, Eric was a champion of all that is good in IT. I share this now, in the hope that future generations may see the error of their ways...

I'd like to tell you the story of my friend Eric. Known amongst his closest friends (like Greg) as "Eric the Architect", a veteran of the Enterprisey Wars.

He's had an amazing career. If you are of a certain age like Eric, you have grown up with the explosion of information technology in the enterprise. You may even share his experience of the great putsch to create a new, better world in which order and control reign over chaos and individualism.

I remember Eric telling me of his early days in the cabala, just starting out as a novice. Duely consecrated, Eric got a job in the dungeons of a well established banking institution. A silver-tongued pin-stripe jockey from Manhattan had convinced the MD to jump aboard the new business revolution. Delivering your quarterly report was no longer going to be dependent upon legions of handle-cranking, visor-tipping clerks. Blechley Park had marked the path. The transistor was upon us! Eric was trained in the art of COBOL. As an accolite, he got to experience the power passed down from the denizons on high. Early assignments introduced him to the adrenaline rush that comes from raising sheilded wing over the hoards of minions in whose hands the destiny of the Comapany had been entrusted. "Show us the light, Master!" they called out. And Eric replied: 004900 MOVE STACK-FRAME (S390) TO CURRENT-FRAME

But little did the heathens respect the God-given mission of Eric. Newly promoted to Sturmbanfurher, Eric struggled with disention and mutiny. Did they not understand that by submission to the higher powers that be, all could enjoy the magnificence of the Corporation? How dare they challenge Eric's mandate to engineer a perfect mechanism through mystical manipulation of the mainframe? To think the proletariat would rise up and demand their rights to having their own Personal Computer on their desk!

And there lie the seeds of the Great Corporate War. Oh, the devastation! Corporate plans laid to waste, lives ruined, as the forces of good were trapped in pitted battle with the revolutionaries and their new fangled "personal" computing machines. Some said it was the war to end all wars, but devilish forces were afoot.

Recollections of meeting Eric after the war are not pleasant. Seeing him slumped in a wicker chair with but a thin blanket draping his legs while we swilled gluwein in the crisp alpine air was more than a man can bear. The scars of battle were deep, but I was surprised by the tenacity of Eric's spirit. It seemed that defeat had done nothing but steel him for battles ahead.

In restrospect, it is hard to comprehend the circumstances by which some hyphenated upstart in a minor European duchy could re-ignite the forces of war. But set the world ablaze he did, and by the devious means of dragging the perfect and sacrosanct SGML into vulgar gutterism of the bastard child, HTML. Eric found that the comfortable detante negotiated and sanctioned by the power of the Ring of Tokens had been laid assunder.

Once more, the civilized world was thrown into the evil clutches of revisionism and subversion. Gnostic apostates proclaimed the false god of layered architecture. N-tiers were shed in remorse. Uberlieutenant Eric, sufficiently recovered from his wounds, slew into battle with a fierce war-cry that was heard to the ends of the earth. "Eeeaaaaaiiii!" he screamed. Many rallied to his call, and became the vanguard of EAI corps. You may have seen a photograph of them valiantly trying to raise the flag under an undying onslaught. Island by island, Eric fought the demonic forces back into a corner. "There is, was, and forever will be only one way to honour the gods of business!" he lambasted.

But the forces of darkness were not so easily asuaged. Foresaking conventional means, they resorted to guerilla tactics. Casting a web to ensnare the world. Your workmates, family, friends, even the rental scum down your street are not spared from the tenticles of the terrorist's poke.

I remember Eric telling me how it was like trying to sculpt jello. Think you have one spurt under control, and you are faced with another outbreak on your flank. Eric's armoury was deficient. A new weapon was required.

"So ... what did you do?" I pressed.

"So .. ahhhh .." he replied. I'd be kind to say it was heart-felt. As I sat there listening to him prattle on about how his compadres were testing their so-called "SOA bomb", version 2.0, under ultra-secret development, I knew I was listening to the meandering ramblings of a Hero of the Revolution whose time had passed.

"There, there.." I said.

"You must continue the good work, my Son!" His spindrift fingers clawed at my new Armani shirt. A moment's annoyance passed in my eyes, as I looked into the well-pools of emotion that seemd to kindle his only spark of life. Depressing, yes. But what can you really say to someone looking over the horizon at the Gucci-robed sickler? Not exactly an opportune moment to discuss how he may have been misguided.

"Don't worry, Father. The world is in safe hands." I murmered. "Global Megolith 2.0 has sued for peace. The ruby rises high in the sky in the constellation of Venus, just as the prophet foretold. Bands of insurgents are joining forces around the globe as we speak. You have not faught in vain. We understand now that just as there is an enemy within, there is also a friend. We are learning to make love (it's complicated), not war. We don't need to fight anymore!"

"Your work is done..." I sanctimoniously purred as I lay my hand upon his forehead and gently pressed his eyelids down (it doesn't work like in the movies, btw).

Fact, or science fiction? SOA world domination is still within our grasp...

Monday, December 17, 2007

WebCenter - First Thoughts. WATCH/HOLD

I just posted about installing Oracle WebCenter Wiki. So what do I think?

The current release of Oracle WebCenter is 10.1.3, and presents the first attempt at providing a Web 2.0 platform incorporating a (development) framework, integrated Services, and mobility ("WebCenter Anywhere"). The roadmap for 11g emphasises features focused on improving a developer’s productivity.

Having spent a bit of time going beyond the powerpoints and whitepapers, I guess I would emphasise the "..first attempt.." in the statement above. There are concerns I have about the product mission, the egregious approach to Open Source project integration, and a work-in-progress information architecture. While I'll be closely following Oracle's progress with WebCenter, my personal view is that a cautious "watch/hold" position is prudent.

WebCenter as an out-of-the-box Web 2.0 Experience?


The first reactions to WebCenter typically concerned it's positioning with respect to Oracle Portal. After many repetitions, I think Oracle have managed to get the message through that there's a distinct value prop for Portal (classic, monolithic Enterprise Portal) and WebCenter (platform and services for a loosly-coupled "Web 2.0" user experience).

However when it comes to WebCenter itself, there's still tension in the 10.1.3 version between two very different audiences/usages it targets.

Firstly, there's the developer audience. There's great emphasis by Oracle on WebCenter as a development framework in the whitepapers and podcasts (e.g. a great interview between Justin and Vince Casarez on Oracle Fusion Middleware Radio).

Oracle WebCenter injects new capabilities into the standard JavaServer Faces development environment to allow developers to create context-rich applications that satisfy these needs.

The catch is that at present developers are well served with JDeveloper and associated developer downloads. WebCenter's attraction seems mainly as a licence bundle of pre-existing Oracle products like Secure Enterprise Search, Content Database and the Mobility Server. There's nothing very Web 2.0 about all that, except that taken altogether, developers certainly could build Web 2.0-style.

In a wild daydream, you may have hoped WebCenter would be to Java what Rails is to Ruby. An opinionated, highly productive, pre-integrated framework. For now I'm afraid you will be disappointed.

The second audience I refer to is the IT Operations/Business audience. These are the people who don't expect to be coding, but want a quick Web 2.0 jumpstart for their enterprise. They don't have the time or inclination to take on the job of investigating, integrating and maintaining a hodge-podge of all the possible open source options. Basically they just want to install it, and are happy to pay for the convenience.

In other words, hoping that WebCenter is to Web 2.0 out-of-the-box experience what Astaro is to security appliances. Again, I'm afraid you would be disappointed for now. The 11g roadmap does include an out-of-the-box application to enable self-service community creation and management.

I guess my problem at this point is that I'm not convinced that Oracle have really decided where to take this. The development focus is clear, but it is not clear at all how much will end up being "only available WebCenter" - one could easily imagine WebCenter ending up as just a licensing artifact, with all the framework technology also available separately. And on the other hand, I have real concerns over the commitment to WebCenter becoming a killer "Web 2.0 appliance".

Personally I think Oracle may have misjudged the market on this. Of the 20 or so people I have had casual WebCenter discussion with, all bar two were just after a blog/wiki/discussions platform to install. That's hardly representative, but I have a feeling Oracle would be more succesful in the market if they just focused on delivering the "appliance", with all the supporting framework rolled into the JDeveloper/OracleAS/ADF base.

As it seems to be going, I wouldn't mind betting the primary audience for WebCenter will turn out to be Oracle's own Fusion Applications development team, with most customers just adopting it as a result of their Applications investment.

Open Source Closure?


I am actually much more concerned about the approach Oracle have taken to integrate 3rd party open source components into the WebCenter Services layer.

Take the "standards-based, open-source wiki server that is included with Oracle WebCenter" for example (words from the 10.1.3.2 Technical whitepaper).

Oracle chose yawiki/jzwiki for their wiki component, and it certainly was (at least partially) an open source project. But in WebCenter, we seem to be dealing with a forked and closed source version. My concerns:
  • Oracle is not shipping source code for the Java classes in owc_wiki.ear

  • While some classes are available from the yawiki project, Oracle have made enhancements (I suspect the main cases being the controller to incorporate AdfAuthentiation; JSR-168 and WSRP portlet support). These are not provided as open source.

  • yawiki includes some packages (like jZonic-web.jar which contains the main controller framework) which are purportedly open source, but for which there seems to be no source code available on the Internet [Postscript: I take this back having since discovered that the source of jzonic-web.jar is from the femto module in the jZonic framework]

  • The version of the wiki in WebCenter has been forked from yawiki. There is no procedure provided to merge the yawiki main line. WebCenter wiki users seem to be completely dependent on Oracle to merge enhancements in yawiki into WebCenter updates. Or not.

  • There are already enhancements in yawiki that are not available in WebCenter (e.g. TagClouds, RSS feeds of page changes). And no procedure for adopting these enhancements.

  • The WebCenter wiki seems to only be supporting the file-based HSQLDB (see backup/restore procedures for example), despite the fact that yawiki has or promised relational database support - even Oracle!

  • Despite the customisation that Oracle have done to yawiki, there's currently no integration the content database component in WebCenter for content storage or tagging.

So I guess you could say I was underwhelmed. From a practical perspective of a wiki implementer, there seems to be little upside in chosing to go with WebCenter wiki over its true open source father, yawiki, or others such as xwiki. But some big downsides to consider.

I'd much prefer see Oracle take a very different tack with the integration of "open source" components into WebCenter.

  • Ship mainline version of the open source project (don't close the source)

  • Provide Oracle enhancements (for security integration etc) as patches to the open source project. Do not combine a version of the open source project with Oracle-written customisations, and ship as "closed source".

  • Where possible, contribute the "WebCenter" patch to the open source project so that it can be maintained in sync with that project.

  • Ideally, reach as many projects in the same category as possible (i.e. support a few different wikis in WebCenter). A great way to do this would be to encourage the community to do it themselves. Yawiki is OK, but there are certainly some great alternatives out there.

Wherefore art thou, my blog?


The WebCenter whitepapers repeatedly mention phrases like "key technologies such as wiki, RSS, and blogs". The Datasheet still specifically claims WebCenter has a "wiki/blog server for collaborative authoring of documents and sharing of ideas".

Wiki - got, despite concerns already discussed. RSS - some, but not in all places that it counts (like the wiki!). But blog? It's MIA!

I have a sneaking suspicion that this is because yawiki used to have a blog capability, but the project team wanted to rethink the approach and dropped it. It is now in the planned feature list;-)

OK, these things happen. But in the WebCenter 11g roadmap, Oracle seem to have defined blogs out of existence - at least in terms of their relevance for the "Enterprise"! Was this to gloss over the missing blog feature in yawiki? Or is there a real belief that blogging is not part of the Enterprise 2.0 model? I'm not sure which view concerns me most!

Blog? blog? Where's the blog support?

It is even more curious when you consider (as Bex Huff recently reminded us) Oracle Universal Content Management has Blogs, Wikis, and RSS Feeds. And the roadmap for WebCenter 11g has UCM replacing Content DB.

Conclusions?


I've presented some pretty frank views on WebCenter after my "first look". Take my comments with a grain of salt though. I have not investigated the framework developer experience in detail yet. But I would say that Oracle has a lot riding on the 11g release. I hope they make it a more "opinionated" and cohesive release and get to knock down some of my concerns.

Sunday, December 16, 2007

WebCenter Wiki - Up and Running with OC4J 10.1.3

I finally had a chance to sit down with Oracle WebCenter recently, primarily to give the wiki functionality a test drive. I wanted to test in a virgin OC4J 10.1.3.3 container (as opposed to the Preconfigured Standalone OC4J) just to make it interesting and see all the moving parts. As far as I could discover, there's not a great deal of information available on the topic. In this post I'm going to chronical the specific installation procedure I used to get WebCenter Wiki running under OCJ4 10.1.3.3.

This is the end result we're after..


Documentation and Downloads

The documentation for WebCenter Wiki is a little obscure when it comes to installing in a "plain" OC4J container. It turns out to be pretty straight-forward, but just as mc said in the forums recently: "Oracle documentation just make it look difficult"!

I refered to the following materials for the install:

It can all get a bit confusing, but the following diagram illustrates the installation dependencies

There are four downloads required, all readily available from OTN:

Installation Procedure


I'm going to document the install steps here in the order I actually executed them. Variations are possible. I'm installing this under Windows XP, but the same applies on other platforms (just switch \ to / and use the appropriate command shell syntax).

1. Get the OC4J container running
To be precise, I am using "Oracle Containers for J2EE (OC4J) 10g Release 3 (10.1.3.3)". I won't cover in detail here. Basically you need to unpack and startup. The only thing you may need to configure are the port settings to avoid conflicts with other services.

2. Install PDK-Java
Details for installing the Oracle Portlet Development Kit are in index.html from the Oracle Portlet Container and PDK-Java 10.1.3.2 download. Assuming we've exploded the download into "G:\pdksoftware", the following performs the installation into the 10.1.3.3 home:

set ORACLE_HOME=G:\MyCache\oc4j_extended_101330
set J2EE_HOME=%ORACLE_HOME%\j2ee\home
set JAVA_HOME=C:\bin\jdk1.6.0_03
set PDKPATH=G:\pdksoftware
%JAVA_HOME%\bin\java -jar -classpath %ORACLE_HOME%\lib\xmlparserv2.jar -jar %PDKPATH%\pdk\jpdk\v2\pdkinstaller.jar %J2EE_HOME%


3. Install the Portal Container
From the same kit, we install the Portlet container

set ORACLE_HOME=G:\MyCache\oc4j_extended_101330
set J2EE_HOME=%ORACLE_HOME%\j2ee\home
set JAVA_HOME=C:\bin\jdk1.6.0_03
set PDKPATH=G:\pdksoftware
%JAVA_HOME%\bin\java -jar %PDKPATH%\pdk\portlet-container\portlet-server-install.jar %J2EE_HOME%


4. Install and Test the Sample Portlets
Using Enterprise Manager (http://localhost:8888/em or similar), go to the "Applications" tab and deploy the %PDKPATH%\pdk\jpdk\v2\jpdk.ear.

Once done, you should be able to successfully access the sample providers at http://localhost:8888/jpdk/providers/sample and get a page like the one shown on the right.

5. Install ADF
Explode the Oracle ADF Installer, which uses a silent "runInstaller" to install.

First, you'll need to update the adfinstaller.properties file, paying particular attention to OracleHome, DesHome and type values. This is from my install:

# The absolute path to the directory containing the ADF jars to be installed.
# This is the location of the directory where you unzipped the adfinsatller.zip
OracleHome = G:\\Sources\\incoming\\www.oracle.com\\OracleAS\\ADF\\adfinstaller

# Home directory for the destination application server,
# where the ADF Jars need to be installed
DesHome = G:\\MyCache\\oc4j_extended_101330

# Specify the platform for the Application Server where the ADF libraries need
# to be installed. This has to be one of the following choices.
# OC4J/AS/TOMCAT/JBOSS/WEBLOGIC
type = OC4J

And then run:
java -jar runinstaller.jar adfinstaller.properties

Restart OC4J at this point.

BUT, if you were like me, my container failed to start at this point with Error initializing server: Shared library "adf.oracle.domain" could not be found..

Annoying, but no panic. Edit ORACLE_HOME/j2ee/home/config/server.xml, re-order the shared library entry for "adf.oracle.domain" (I moved it to just after the "oracle.persistence" shared library) and try to startup again.

NB: after getting to this point, I find my OC4J does not completely shutdown after issuing a shutdown request via RMI %ORACLE_HOME%\bin\oc4j -shutdown -port %RMIPORT% -password %adminpwd%. Leaving that problem for another day.. :sigh:

6. Install Oracle Wiki (finally)
Using Enterprise Manager (http://localhost:8888/em or similar), deploy the owc_wiki.ear from the Oracle WebCenter Additional Services CD

7. Configuring Security
If you try and hit the wiki now (http://localhost:8888/owc_wiki) you will probably get a 500 error because security is not started or configured.

For this test, I'm just going to use the out-of-the-box Java SSO File-Based Security Provider.

In EM, startup the Java SSO application (look under the application group "Middleware Services > Other Services"). If you try and access the wiki now, you should see a login form but get an error when you submit because we need to generate the Symmetric Key. Every time I go to do this, following the Java SSO documentation, I struggle to find the right link in EM.

To be clear, in 10.1.3 look for "SSO Configuration" on the Administration tab of the OC4J container (below). Go to the page, make sure "Generate new symmetric key" is checked, select your key type, and click "Apply". You will be prompted to restart OC4J.


Browse to the wiki again and we have .. Success!


8. Adding users
Remember we're using the JAZN XML security provider rather than OID or other directory. Andreas had a nice post recently on how to Add a user to the JavaSSO, and that's what I need to do to add a personal account for myself..

set ORACLE_HOME=G:\MyCache\oc4j_extended_101330
set J2EE_HOME=%ORACLE_HOME%\j2ee\home
set JAVA_HOME=C:\bin\jdk1.6.0_03

%JAVA_HOME%\bin\java -jar %J2EE_HOME%\jazn.jar -adduser jazn.com paul password1
%JAVA_HOME%\bin\java -jar %J2EE_HOME%\jazn.jar -grantrole users jazn.com paul

JAZN is a bit dumb compared to using a real directory, so you need to restart OC4J again to pick up the new credentials.


And there we go. Oracle Wiki up and running in OC4J. Just 8 "simple" steps;-)

Monday, December 10, 2007

What's With Oracle and Flex?

Adobe's Flex seems to be cropping up across the enterprise vendor space. It's made a clean sweep of the BI vendor products (a much smaller group these days). And now Flex seems to be making major inroads in SAP and Oracle.

I wonder however if this is real strategy at work, or just an example of a good cohesive solution filling the void in the midst of AJAX-chaos?

I'd commented before on SAP's adoption, and they seem to have stolen the limelight over the past year. It was easy to forget a no-fanfare announcement of Flex support by Oracle at OpenWorld 2006. It was just PR after all - and seems to have dropped off the Internet! But it seems one of the most lasting impressions of OpenWorld 2007 was the promiscuous proliferation of Flex in the various demos and announcements.

James Ward (the Adobe RIA Cowboy) reported the usage in his blog, and has apparently been working closely with Oracle on their adoption.

It was very interesting to hear RedMonk's Michael Coté picking this discussion up in their "RIA Weekly" podcasts - with gossip about OpenWorld sightings in Episode 01, with more depth about the specific product teams using Flex in Episode 02.

As James & Michael discuss, Oracle's adoption seems to be of the common "stick your widgets in our page" style. The flagship adoptions are so far MetaLink (selected pages only), and BI Publisher (yet to release).

Flex is pretty cool, I agree. But it is hard to discern a broad RIA strategy at work here.

AJAXWorld might have been controversial by splitting the RIA world into two camps (Should You Choose AJAX or Adobe?). Choose Ajax or Flex? I think Oracle's answer may simply be "we need to choose?"

Consider Oracle is also playing many other AJAX cards: OpenAJAX Alliance support; quite a bit of true AJAX used in various products; and "AJAX" support in ADF/JSF [although as far as I can figure, it's all IFrame-based].

Does any of this really tell us anything about the strategic direction for Oracle Fusion Applications UI technology?

Now that the Oracle AppsLab guys are Back from OpenWorld, I'd be really keen to hear their take on all this. In fact, I'd expect that guys like James Ward were engaged with OracleAppsLab and the AppsLab blog should be the place to get the inside running.

But back to my original, cynical observation. I have a sneaking suspicion that we're seeing Flex pop up all over the enterprise space for one simple reason: Adobe have a good pitch, and a product that is nicely wrapped up and walled in (even questions of Flex's openness seem to have fallen by the wayside). The AJAX elevator pitch just isn't in such good a shape.

Hence so much easy to push a top-down directive to "skin it with Flex". It may even accidentally be the best long term decision for your product.

Saturday, December 01, 2007

Facebook's Gonna Tank!

Laurent Schneider just asked what LinkedIn is good for?. Good question. One I've been asking myself for the past couple of years as I've seen a dribble of invites coming in.

Then I changed jobs. Something I've done many times before - but all before the era of social networking. I'm ashamed to say I have more dud email addresses and phone numbers in my little black book than I care to mention ... and no way to try to get back in touch. This time is different. It hit me in a flash that with LinkedIn, I hope to never accidentally lose contact with good friends and collegues again.

There's nothing flash about LinkedIn, but it does what it does really well. Managing a network of contacts that trascend jobs, geography and time.

I'm also on Facebook of course. But just like Amber and Leo and many others are asking ... so what does it really do for you???

Sure, if you are not on Facebook you just have no Web2.0 cred because it is the uber-hyped social networking poster child of the moment. But will it ever be more than a footnote in Internet history? I think not. It's gonna tank, and fast.

To tell you the truth, something just didn't feel right the moment I got on Facebook.

First, there was the insidious commercialism. Initially very subtle. Like build your personal library .. but did you realise most "bookself/CD rack" application authors are skimming an Amazon kickback from your personal collection? And now the talk about advertising nicely targeted thanks to all the work you put into your profile. And who benefits? Zuckerberg I think. Certainly not you.

Networks are about respect and trust. This just doesn't smell right. And it is not about Microsoft taking a stake in Facebook, presumably to get placement rights. As it stands, I think Microsoft is the sweeter-smelling partner (at least with them I know where I stand).

Then there's the utility. While LinkedIn is a great example of a site that does one thing, and does it well, wherefore Facebook? All those Zombie invites, pokes and superpokes. Everyone's having a ball, but what are you achieving except repetitively and redundantly proving the network effect, spreading your vampire bites amongst your aledged "friends". But beyond these mickey-mouse apps, what can you do on Facebook? Feels real constrained to me. I have little control, and this is meant to be my network, my social networking home-site? No way, thanks.

Of course, now there's increasing discussion of the natural next step towards portable/unified social networking that is essentially shared infrastructure, just like DNS is for computers. OpenSocial is one attempt. Time will tell whether it is the solution. Regardless, we will move towards something of this nature. In such a world, what does Facebook offer? How is it differentiated? The shifting wisdom of the crowds will easily move on to the next post-MySpace, post-Facebook social site you must be on. Not that Facebook's going to disappear, just slowly receed into the background, over-taken by the new young punks.

Tim O'Reilly may not think Google/OpenSocial have it right yet, but he may be spot-on with his comment that..
I think Amazon is the only company that really understands that we're in the process of building an internet operating system, and is building services with the depth and power that will be required to create the next generation of computer applications

So while I will stay on Facebook, poke my friends and play Scrabulous with my sister, I'd run a mile before putting money into the company now. They're gonna tank. It'll happen fast, and probably sooner when we all expect.

Another great thought from xkcd