Archive for May, 2009
A day in the office – useful findings on Web Development – debugging with Firebug (and a word on Google API Loader and ADF Faces RC)
May 28th
This article does not present a smooth story, but the raw experience of a day on the job. Looking over the shoulders of various Web Developers I have picked some useful tips with regard to Web Development, JavaScript and web application debugging. I will share these with you in this blogpost, however it is primarily meant for my own reference. That explains the somewhat crude writing style.
Read the rest of this entry »
Use of critical chain projectmanagement in an AMIS project.
May 26th
- Create a planning using 50% of the original estimates, and put the remaining 50% in a big Project buffer.
- Send the Project members to work with that 50% planning, and tell them they should do their best to finish it in that time using the credo’s “good is good enough” and “it doesn’t have to win an award for excellent programming”. also, if they need more time, it’s not a disaster, because the 50% planning also has a 50% chance of making it. This means that a work package will often take 70%, sometimes 100%, and it can also take 40% of the original estimate to build.
- Find out what the bottleneck resources are, and create a work buffer before them. In our case it meant our functional designer and one of the developers.
- With the client cooperation we realized that the functional Designer could go on with his work all the time, because if he fell still, the whole project would shift in time
- We took care that necessary pre-work for work that the key developer should do, was ready in time by starting extremely early with it.
- We informed our client that we were going to work this way, which could mean that we deliver earlier as expected, and they should be ready for acceptance testing then, because otherwise we would lose the time we had won before. It was o.k. for them, and if I informed them two weeks before actual delivery, they could set up the team and the environment in time. They were enthusiastic about our approach, since there was a tight deadline, and in this way we would have more certainty about making the deadline in an earlier stage, so they were very willing to cooperate.
- The Delivery Director and I agreed upon a project status update in the form of a very special graph, described in the book. In this graph only two, relative, values are plotted against each other, namely the project build progress, and the project hours consumption, both as a percentage of the total, see figure for an example:

- The data for this sheet I derived from my MS Project planning tool, which I use for the administration of the project
- We did a very early delivery of important pieces of the project, which gave our client certainty that we would make the deadline
- We made the deadline
- The client was very happy to see what they thought up to work in such an early stage
- We completed the project with a small overrun of 6%, due to a screen that was not thoroughly enough thought out, which cost a lot of time. But thanks to the savings on other project parts, thanks to this method, damage was minimized
- The way in which I reported (with the famous graph) illustrated in a glimpse of an eye how the project was doing
- using the data in MS Project it was easy to drill down to where the losses and gains were, which gave insight for following projects
- Some things actually completed in 50% of the time
- The way we approached the project created commitment at the client’s site to get the requirements clear as early and thorough as possible, and the flexibility in the delivery moment for testing, because they were scarce resources too. Thereby we made a very good impression with them for handling the project in this new way
- Except for the programmer working on the tough screen, there was no stress at all in the team
- With the way to work according to CCPM I see none
Schrijf je in voor de ODTUG Sneak Preview op 15 juni 2009!
May 26th
Op maandag 15 juni 2009, een week voordat in Monterey de ODTUG 2009 plaats vindt, heb je de mogelijkheid om alvast te horen wat negen sprekers in de VS gaan presenteren, onder hen twee Oracle Aces en twee Oracle ACE directors.
- Aino Andriessen (AMIS Services) – ADF Development: More tales from the Trenches
- Lonneke Dikmans (Approach Alliance) – Top Ten Tips: Best Practices for Designing Services, Events, and Business Processes
- Olivier Dupont (iAdvise) – APEX at the Belgium airport
- Dimitri Gielis (APEX Evangelists) – Mastering an APEX page
- Roel Hartman (Logica) – How to integrate APEX and Oracle Forms?
- Lucas Jellema (AMIS Services) - Truth and Dare—The Story of How an Oracle Classic Stronghold Successfully Embraced SOA
- Toon Koppelaars (Rulegen) – Fat databases: A layered approach
- Ronald van Luttikhuizen (Approach Alliance) – Customer case: Implementing SOA in a database-centric environment
- Alex Nuijten (AMIS Services) – SQL Holmes – The case of the missing performance
In drie rondes kan steeds een keuze worden gemaakt uit drie presentaties over een aantal uiteenlopende onderwerpen, onder andere APEX, ADF, SOA en de database.
Dit jaar staat er zelfs één presentatie geprogrammeerd (van Dimitri Gielis) die exclusief op de ODTUG Sneak Preview bij te wonen is en uiteindelijk niet op de ODTUG te zien zal zijn.
Het is mogelijk om gratis deel te nemen aan deze unieke ODTUG Sneak Preview (aanmeldingsformulier)!!! Maar schrijf je snel in, want vol is vol!!!
De locatie van de Sneak Preview is het AMIS kantoor in Nieuwegein. De toegang tot de ODTUG Sneak Preview, het diner en de verfrissingen zijn gratis. Meer informatie over de presentaties vind je in de activiteitenagenda.
“Hotsos Revisited”, Revisited…
May 19th
Lucas already gave a very good in depth overview of the "Hotsos Revisited" session last night. It always amazes me how fast he can make a cool blog post that accurately points out the impressions we had of the evening. It started off with an idea we (Jeroen, Toon, Gerwin and me) had of sharing some of the ideas, atmosphere and presentation info we got from the Hotsos Symposium this year. It is not an easy task to present the presenters accordingly trying to achieve some of the energy that shared during their presentations at Hotsos, also, of course, we were not that deep into the material they presented / as the people we tried to do credit to.
I am indebted to Jeroen, Gerwin and Toon for making the time (their precious spare family time) too make it all happen. Even if it has to be all fun, you, as a presenter, don’t want to let the attendees, the audience, down by leaving them with the impression that such an evening was lost time. So it still takes a lot off effort to make it all work.
Bloom Filters, Hierarchical Profiling, Synopses & One pass distinct sampling, jumping the GAPP … – feast for DBAs (considered harmful..)
May 18th
It’s Monday night and a select company of DBAs and Database developers have gathered at AMIS HQ in Nieuwegein for the ‘Looking Back at Hotsos 2009′ session. It is one of those sessions that has a lot of energy, laughter and a wealth of serious content. Four very experienced speakers relate their best experiences and most important learning points from the Hotsos conference. And the audience is allowed to participate. Speakers are Marco Gralike, Toon Koppelaars, Gerwin Hendriksen and Jeroen Evers.

The evening brings us – apart from a quite good dinner – interesting topics such as Bloom Filters, Hierarchical Profiling,..
(note: the text in the title between parentheses are for insiders only)
Read the rest of this entry »
ADF 11g – Invoke a Popup from a Popup
May 18th
Today I was triggered by a question on the JDeveloper forum about invoking a popup from a backing bean. Actually some time ago I had to build that solution for one of my customers that needed some kind of confirmation to the user that an action invoked in a dialog popup was succesfull. The flow in this solution was more ore less like this: Invoke a dialog popup –> press ok (or cancel) in the dialog –> if ok was pressed, invoke the dialogListener which contains the actual logic to be executed. In case the action is succesfull, show another popup that tells the user "all is well" in all the other cases do something different. Read the rest of this entry »
Oracle database directory listing with ls function
May 14th
Say, you are in need of a directory listing from within the Oracle database similar to the one generated with Unix command ls. Your database doesn’t contain a JVM, so the use of some simple JAVA is out of the question. Well, starting from DB Release 10g there is the possibility of using the searchfiles procedure in package dbms_backup_restore. Though the spec isn’t wrapped, I’m not quite sure the use of this package is supported by Oracle, because it’s internally used by Oracle Recovery Manager ( RMAN ). But if this isn’t putting you off, and you don’t mind creating some objects within the sys schema, here is the code.
-- install with sys -- create types CREATE OR REPLACE TYPE v2_row AS OBJECT ( text varchar2(1024)); / CREATE OR REPLACE TYPE v2_table AS TABLE OF v2_row; / -- create function CREATE OR REPLACE FUNCTION list_files ( p_directory VARCHAR2 , p_recursive PLS_INTEGER := 0) RETURN v2_table IS ns VARCHAR2(1024); v_dir VARCHAR2(1024); v_list v2_table := v2_table(); v_slash VARCHAR2(1) := '/' ; v_dir_depth PLS_INTEGER; BEGIN IF instr(v_dir,'\') > 0 THEN v_slash := '\'; END IF; v_dir := p_directory||v_slash; v_dir_depth := (LENGTH(v_dir) - LENGTH(REPLACE(v_dir,v_slash,'')))/LENGTH(v_slash); DBMS_BACKUP_RESTORE.SEARCHFILES(v_dir, ns); FOR i IN ( SELECT fname_krbmsft as name , (LENGTH(fname_krbmsft) - LENGTH(REPLACE(fname_krbmsft,v_slash,'')))/LENGTH(v_slash) as dir_depth FROM x$krbmsft WHERE INSTR(fname_krbmsft,v_dir) > 0 ) LOOP IF p_recursive = 0 THEN IF v_dir_depth = i.dir_depth THEN v_list.extend; v_list(v_list.count) := v2_row(i.name); END IF; ELSIF p_recursive = 1 THEN v_list.extend; v_list(v_list.count) := v2_row(i.name); END IF; END LOOP; RETURN v_list; END list_files; / -- grants and private synonyms GRANT EXECUTE ON V2_ROW TO FOO; GRANT EXECUTE ON V2_TABLE TO FOO; GRANT EXECUTE ON LIST_FILES TO FOO; CREATE SYNONYM FOO.V2_ROW FOR V2_ROW; CREATE SYNONYM FOO.V2_TABLE FOR V2_TABLE; CREATE SYNONYM FOO.LS FOR LIST_FILES;
Connect with user FOO, and the following select statements should work:
-- no recursive listing of files in subdirectories:
SELECT * FROM TABLE ( ls('/var/log') );
-- recursive listing of files in subdirectories:
SELECT * FROM TABLE ( ls('/var/log',1) );
Some comments:
- The ls function generates fully qualified path and file names within a given directory, without listing any subdirectories.
- Default the ls function doesn’t recursively list files. The underlying searchfiles procedure though, lists files on subdirectories, independent of the value you provide for the "p_recursive" parameter. So, you better be careful in your choice of directory, or you exhaust all memory on the server.
- You might get the idea of granting execute on dbms_backup_restore, select on the x$krbmsft table, and create the ls function in some other schema. I’m not in favor of granting execute privileges on the rman package to regular users. But if you want to follow this path, you should know that Oracle doesn’t allow you to grant select privileges on a fixed table. Instead, with sys, create a view on table x$krbmsft, and grant select privileges on this view.
- When using the ls function in PL/SQL you may need to explicitly cast the nested table, like this:
SELECT * FROM TABLE ( cast ( ls(‘/home/oracle’) as v2_table ) ); - Don’t worry about concurrent sessions. The fixed table seems to act as a temporary table, each session only has access to its own result set.
- Within the same session, the result set of a previous call of dbms_backup_restore.searchfiles doesn’t interfere with the current one. Apparently the first transaction the procedure performs is a delete of all existing rows.
- If a given directory doesn’t exist, or oracle lacks the necessary permissions, no error is generated. So, the directories "/home/oracle-sun" or "/root" will generate a "no rows returned" message, but that’s all. You must, however, have parameter db_recovery_file_dest set, otherwise ORA-19801 is raised.
I managed to find some info on the internet in regard to the dbms_backup_restore.searchfiles procedure. I liked the information provided by Chris Poole ( he has a nice XUTL_FINDFILES package for free download ) and Birijan Maharjan., but couldn’t find any useful documentation of this procedure on Metalink though.
AMIS Query 18 May – Hotsos 2009 Revisited
May 11th
The 8th of March 2009…The Oracle Performance Symposium in Irving, Texas, also known as the Hotsos Symposium was about to start… Four Dutch guys had the luck to attend this year: Jeroen Evers (Fameus), Toon Koppelaars (RuleGen), Gerwin Hendriksen (AMIS) en Marco Gralike (AMIS).
We wanted to share some of our Hotsos experiences, thoughts about, or revive some of the presentations we have seen this year. That’s how the idea for this AMIS Query started; Let’s share some of the lessons learned; Pass on some of the knowledge. We hope we can do justice regarding the topics we have seen and enjoyed during Hotsos.
Have a look at the agenda (Dutch) and attend this free (one time only) mini-revival of Hotsos 2009: Een Terugblik op Hotsos 2009
Upgrade JDeveloper 10g Subversion client
May 5th
JDeveloper provides a build-in Subversion client via one of its extensions. Although the functionality is limited (especially in 10g) it is essential for the handling of business components in relation to subversion, especially when it concerns refactoring and deletes. However, because of its limitations, most developers have installed another Subversion client; especially the TostoiseSVN is very popular. And this is where problems may arise.
The subversion client is available in different versions (1.3, 1.4, 1.5 and 1.6) and the structure of the local subversion administration files (the .svn directory) differs. This means that a lower version client does not recognize the working copy of a higher version client. It recognizes that the files are 'under subversion control' but does not understand how and it considers all files to be 'new'. Secondly, a higher version client automatically upgrades the working copy. Thirdly, TortoiseSVN offers automatic upgrades to the latest version. By the way, the client version does not necessary need to match the server and it is not possible to install multiple versions.
Concerning TortoiseSVN, it really is advisable to have at least the 1.5 client. Especially the merge functionality is way better and easier to use than before. However, the JDeveloper 10g extension still is a 1.4 client (Note that the first 10g version (10.1.3.0.x) is a 1.3 client). With this combination you'll encounter issues, that require close attention, much discipline and may easily result in build problems.
For example, when you delete in JDeveloper a business component (actually often more files), the delete is not administrated in the working copy and the file is marked as 'missing'. When you now do perform a subversion update, the file is back again
. So you must not forget to manually delete the file via TortoiseSVN. It's even worse with refactoring like renaming and moving.
To prevent these problems, it's best to install TortoiseSVN 1.4 and disable the update check. However, the upgrade to version 1.5 is almost obligatory, because (amongs others) of the much better merge support. A typical catch-22 situation.
Fortunately, JDeveloper extension uses the svnkit (version 1.1.1) it is quite easy to upgrade to a recent version manually:
1. Make sure to have TortoiseSVN 1.5 installed and disable the automatic update notification
2. Stop JDeveloper
3. Download the standalone svnkit 1.2.3 from http://svnkit.com/
4. Unzip it
5. Rename svnkit-javahl.jar to svnjavahl.jar
6. Copy (and replace) svnkit.jar and (the renamed) svnjavahl.jar to the JDeveloper subversion extension directory, [jdev install dir]\jdev\extensions\oracle.jdeveloper.subversion.10.1.3
7. Copy the licence files
8. Done, start JDeveloper
9. Check the tools -> preferences -> Versioning -> Subversion. It now shows the upgraded version
:

I've tested it with 10.1.3.3 and 10.1.3.4 and 10.1.3.5 and 11.1.1.1.0 and expect it to work with 10.1.3.1 and 2. With 10.1.3.0.x this does not work because it does not use the svnkit. I've tried hard, but didn't succeed.
Note, the latest version of 11g (11g PS1 or 11.1.1.2.0) includes a 1.6 client so you don't need to update it. The older 11g versions have an 1.5 client (although the very,very first one has an 1.4 client that includes some 1.5 functionalities).
As mentioned in the comments, the same trick seems to work for an upgrade to 1.6.
Since it is so easy to do, I wonder why Oracle does not provide updates for their subversion extension.




