Skip to main content

Setting the starting point for KScope2011: Get XFILES running...

As a preparation for a joint presentation with Marco Gralike for ODTUG Kaleidoscope 2011, I tried to (re)install the not-yet-so-famous XFILES Application. That application was the result of the collaboration of Mark Drake (Sr Product Manager XMLDB) and Carl Backstrom. They did a presentation about it during OOW2008. The idea behind the presentation/application was leveraging the power of XML-DB with an APEX UI. Due to Carl's tragic car accident, the application never reached a final stage. Marco already did a sequel about XFILES on his blog. You can also find a download link to the latest version of the application there.
But back to the installation....I used the OTN Developer Days VM as a start and patched it with the latest APEX patch (4.0.1). There is a sort of how-to included in the XFILES download, but that isn't flawless (yet). But after executing all the steps I fired up the application and got this:


So all my images where missing. Inspecting the code learned that the images had a path of /XFILES/APEX/lib/icons/, so not pointing to images included in the application itself (as Application or Workspace Images) but to a directory on the filesystem....that wasn't there.  If I entered http:/localhost/XFILES I did get the directory listing. And drilling down I could see the images. After some investigation it turned out that localhost was using the standard port 80, which was used by the (standard installed - or done by the XFILES installation ??) Embedded PL/SQL Gateway (EPG). And I was using the Apex Listener (with Apache/Tomcat) on port 8888. So the APEX Listener was looking for the XFILES directory on it's root (/home/oracle/apache-tomcat-6.0.20/webapps/ROOT). So in order to get the images in my application I could just extract them from the XDB Repository and copy them onto the filesystem. But that would have been too easy ;-). I though it would be more fun if I could create a mapping from the right location on the filesystem into the right location in the XDB Repository! But as I am not a *nix wizard - nor a XML-DB guru -, I couldn't quite figure out how to do that - even after some Googling around . So I send out a "help Tweet". But it is hard to explain a situation in just 140 characters...
Nevertheless I got a lot of replies (thanks Learco, Iloon, Jacco, Peter, etc). But Marco acted as my mainstay and Skyped me. And just like Marco is, he dived in deep and came up with a solution! And wrote a long post about it...
But in short there are only two additional steps necessary:
1. Create the XFILES directory on the webserver :
/home/oracle/apache-tomcat-6.0.20/webapps/ROOT/XFILES
2. As su, mount the XFILES Folder in the XDB Repository to that directory:
mount -t  davfs  http://localhost:80/XFILES /home/oracle/apache-tomcat-6.0.20/webapps/ROOT/XFILES

And the result is:


The funny thing about this solution is, that I - as a user - can replace one of the images with my own one and it will immediately show up in the application itself:


Now I first have to solve a performance problem, because the app is deadly slow... Maybe just because of this solution? Don't know yet, will have to find out!
After that the next step is to make it a full blown APEX 4.0-style application, before moving on...
1 comment

Popular posts from this blog

Dockerize your APEX development environment

Nowadays Docker is everywhere. It is one of the main components of Continuous Integration / Continuous Development environments. That alone indicates Docker has to be seen more as a Software Delivery Platform than as a replacement of a virtual machine.

However ...

If you are running an Oracle database using Docker on your local machine to develop some APEX application, you will probably not move that container is a whole to test and production environments. Because in that case you would not only deliver a new APEX application to the production environment - which is a good thing - but also overwrite the data in production with the data from your development environment. And that won't make your users very excited.
So in this set up you will be using Docker as a replacement of a Virtual Machine and not as a Delivery Platform.
And that's exactly the way Martin is using it as he described in this recent blog post. It is an ideal way to get up and running with an Oracle database …

Refresh selected row(s) in an Interactive Grid

In my previous post I blogged about pushing changed rows from the dabatase into an Interactive Grid. The use case I'll cover right here is probably more common - and therefore more useful!

Until we had the IG, we showed the data in a report (Interactive or Classic). Changes to the data where made by popping up a form page, making changes, saving and refreshing the report upon closing the dialog. Or by clicking an icon / button / link in your report that makes some changes to the data (like changing a status) and ... refresh the report.  That all works fine, but the downsides are: The whole dataset is returned from the server to the client - again and again. And if your pagination size is large, that does lead to more and more network traffic, more interpretation by the browser and more waiting time for the end user.The "current record" might be out of focus after the refresh, especially by larger pagination sizes, as the first rows will be shown. Or (even worse) while you…

Using multiple Authentication Schemes for your APEX application

Recently someone asked me how he could implement multiple authentication schemes for his APEX application. He would like to use (some kind of) Single Sign-on authentication and - as an alternative - an Application Express Authentication. The problem is ... you can only define one Authentication Scheme being "Current" for an application! So how can we solve this issue?

First, we need te be aware that multiple applications can share their authentication by using the same cookie. Thus if you specify "MYCOOKIE" as the Cookie Name in Application A as well as in Application B, you can switch from A to B and back without the need of logging in again. It doesn't matter what Authentication Scheme Type you are using!

Knowing this, we are halfway our solution. We need two Applications. One - the "real" application - using the Application Express Authentication, let's name this one "LAUNCHPAD". And another one using the Single Sign-on Authentication…