Integrate Oracle Forms and JSF/ADF Faces with drag-and-drop

11 February 2008 at 10:57 CET | In Demos, Forms, JDeveloper, Oracle, Web components | 13 Comments

I am happy and proud to announce the public availability of OraFormsFaces, a JSF component library to integrate Oracle Forms and JSF or ADF Faces. This allows you to embed Oracle Forms in a JSF page and truly integrate the two, including passing context, events, eliminating Forms applet startup time, and many more features.

I feel this is the key ingredient that is missing from Oracle’s offerings. Forms is a mature product and Oracle has a great Java stack, but unfortunately you cannot really integrate the two in a single application. This leaves many of the traditional Forms users with a dilemma. They might want to use the Java stack for new developments, but they don’t want to be forced into a rewrite of there Forms application to this Java stack.

Wouldn’t it be wonderful if you can use the Java stack for new developments but protect your investment in Oracle Forms? With OraFormsFaces, you can. You can build new JSF or ADF Faces based web applications and integrate your existing Forms applications in them. You can pass parameters from JSF to Forms and the other way around. Both Forms and JSF can raise events (commands or triggers) in the other technology. With the possibility of integrating Forms into JSF, you can even go one step further and integrate Oracle Forms in any other web technology, whether it is Oracle Portal, Oracle WebCenter, PHP, ASP.Net, or something else.

I’ve prepared two demo movies showing different ways of integrating Forms and JSF; the first one keeps the powerful multi-document interface of Oracle Forms, whereas the second one makes the Forms look like a true web application and could be used for a smooth migration from Oracle Forms to web technology.

As some of you know, I’ve been working on this concept since 2005. Initially it was a quest for a way to interact programmatically with the Forms applet running in the client web browser. In summer 2007 I presented a solution to the world at the ODTUG Kaleidoscope conference, and later I published the same solution in an OTN article, an Oracle OpenWorld 2007 presentation, and several other places. The solution is based on a JavaScript API that enables Forms to execute JavaScript in the browser and JavaScript in the client page to interact with the Forms applet. The concept as presented in 2007 was still very technical and required quite some work form both the Forms and the Java programmer.

Since summer 2007 a lot has happened. It took a lot of work and that’s why it’s been much too quiet on this blog. The same basic concept has been wrapped in a JSF component library.Now it’s as simple as dropping a JAR file in your Java project and drag-and-drop a Form, FormParameter, or FormCommand component to your JSF page in a visual editor. See some other screencasts on how easy it is to get this done in JDeveloper. Also, a lot more features have been added since the proof-of-concept in 2007. For instance, making it compatible with Single Sign On basically required a complete rearchitect and rewrite of the solution.

The solution is now available for everyone as the OraFormsFaces library. You can download two running demo applications to look at the end result first. If that got you interested, you can download a trial version of OraFormsFaces and the OraFormsFaces Developer’s Guide to get started for yourself. If you do run into any problems, feel free to ask at the forum or file a bug report in the issue tracker.

Good luck integrating your Oracle Forms application with your latest JSF or ADF Faces applications.

Remote Desktop via SecuRemote from Vista 64-bit or Linux

10 February 2008 at 14:11 CET | In Other, Personal | 4 Comments

I got a new laptop and was tempted to install Linux as my primary operating system. The only problem is there is no SecuRemote client for Linux to connect to my company VPN. So, I decided to stick to Windows and the new laptop was shipped with Vista 64-bit. Unfortunately I found out the hard way that there's also no SecureRemote client for 64-bit Vista. So, both Linux and Vista-64 have the same problem.

I ended up with a solution of running a small virtual machine in VMWare. That virtual machine runs Windows XP, has a SecureRemote client to connect to the VPN and uses openssh to run a ssh daemon. Using port forwarding, I can now use the Remote Desktop client from my 64-bit Vista to connect to my Windows workstation at the office, via the VPN.

Here are the steps to set this up:

Installing Windows XP inthe virtual machine

  • Start VMWare and create a new virtual machine with the following properties: single processor, 512Mb RAM (you can decrease later, but let's have a fast machine for installation), and 4Gb disk should to the trick
  • Ensure the virtual machine has two network adapters. One host-only and one capable of connecting to the internet (probably bridged)
  • Minimize the virtual machine by removing all devices you won't need (floppy, usb, and sound)
  • Ensure the Windows XP CD is in the tray and the CD is mounted to the VMWare image. Then start the virtual machine and install Windows XP
  • Once the installation is finished, install the VMWare tools (see the VM menu)
  • To save some disk space, reduce the size of the paging file: Control Panel > System > Advanced > Performance Setting > Advanced > Virtual Memory Change > Custom Size (minimal 0, maximum 256). Be sure to press the Set button to active these settings.
  • To save some more disk space, disable the recycle bin; Right click the bin, select properties and check the checkbox to not move files to the recycle bin
  • Right click the Windows Messenger icon in the system tray, and select open. Next select Tools > options > Preferences and uncheck the checbox to run the program when windows starts
  • To save even more disk space, disable System restore (Control Panel > System > System Restore > Checkbox to turn of system restore
  • Install all the High Priority updates from windows update
  • Open a Command Prompt and run the "ipconfig /all" command. Note the assigned dynamic IP addresses for the host-only adapter and check in which subnet it is (normally the 192.168.232.0 subnet)
  • Go to Control Panel > Network Connections
  • Change the host-only network adapter to use a static IP address, but be sure to use an address is the same subnet (so replace the dynamic address 192.168.232.129 with a fixed 192.168.232.2). Use an address ending with .2 as the .1 address is used by the host OS. Set the subnet mask to 255.255.255.0 and leave the default gateway and DNS empty. You don't want your virtual machine to route internet traffic to this adapter, or do DNS lookups this way
  • Go to Control Panel, User Account and set a password for your windows account. Without a password the subsequent SecuRemote and ssh stuff won't work

Installing SecuRemote in the virtual machine

  • Install the SecuRemote client software (and reboot)
  • Right-click the SecuRemote icon in the system tray and select Connect. Create a connection to your firewall.
  • We need to make SecuRemote automatically connect the VPN without any user interaction. We can do this with a batch-file which has the unencrypted password in it. If you know a better way, please let me know
  • Create a connect.cmd file in c:\program files\checkpoint\securemote\bin with the following commands:
    CODE:
    @echo off
    scc setmode cli
    scc userpass vpnuser vpnpasswd
    scc connect profile

  • Next, we need to make sure Windows automatically logs on and runs the batch file to open the VPN connection:
    Click Start, click Run, and type control userpasswords2.
    Clear the Users must enter a username and password to use this computer check box.
    Click Apply.
    Enter the user name and password you wish to automatically log on with, and then click OK.
    Click OK again and you're all done.
  • Create a shortcut to connect.cmd in the Startup folder of the Start Menu
  • Reboot the virtual machine to check if Windows XP automatically logs on and opens the VPN connection

Installing SSH daemon in virtual machine

  • Next we need to install a SSH daemon to allow port forwarding. Use the instructions below (or look at http://pigtail.net/LRP/printsrv/cygwin-sshd.html for more detailed instructions)
  • Create a folder c:\cygwin
  • Download cygwin's setup from http://www.cygwin.com and save it in c:\cygwin
  • Run setup.exe, select to install from internet, install for all users, download to c:\cygwin
  • When asked which packages to install, click the View button until the Full ist is shown
  • Enable openssh, tcp_wrappers and zlib
  • Finish the installation
  • Right click My Computer, Properties, Advanced, Environment Variables. Clikc the New button in the System Variables section. Add a variable "CYGWIN" with the value "ntsec tty"
  • While you're at the Environment Variables, edit the Path variable in the System variables section and add ";c:\cygwin\bin"
  • Double click the Cygwin icon on the desktop to start a Cygwin shell
  • In cygwin, type "ssh-host-config -y"
  • When asked for the value of CYGWIN, answer "ntsec tty"
  • start the SSHD service with "net start sshd"
  • Try to setup a ssh connection from within cygwin: "ssh localhost". You should be able to logon with your windows password
  • Shutdown the virtual machine and reduce its memory to 192Mb, that should me enought to run this minimal Windows XP

Preparing Vista 64-bit (or Linux) host

These instructions assume Vista 64-bit, but similar actions should work on a linux host.

  • Download and install putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/
  • Create a tunnel.cmd file with the following command:
    CODE:
    start /d "c:\Program Files (x86)\PuTTY" /b putty.exe -ssh winuser@192.168.232.2 -pw passwd -L 33389:winhost:3389 -C

    where winuser is the user for the windows virtual machine, the 192.168.232.2 IP address is the static IP address you assigned to the virtual machine, passwd is the password of the windows user in the virtual machine, and winhost is the hostname or IP address of the windows workstation at the other end of the VPN you want to control remotely

  • If you want, you can create a shortcut to the tunnel.cmd file and put it on your dekstop or Quick Launch bar
  • You can now start a Remote Desktop client to "localhost:33389". It will use the port forwarding via SSH to the windows virtual machine and then over the SecuRemote connection of that virtual machine to the workstation at the other end of the VPN tunnel
  • If you want you can enhance the tunnel.cmd file to also start the virtual machine:
    CODE:
    @echo off
    echo Starting Virtual Machine
    start /d "c:\Program Files (x86)\VMware\VMware Workstation" /b vmplayer.exe "C:\Users\?????\Documents\Virtual Machines\SecuRemote\Windows XP Professional.vmx"
    echo Waiting for Virtual Machine to start
    pause
    start /d "c:\Program Files (x86)\PuTTY" /min /b putty.exe -ssh winuser@192.168.232.2 -pw passwd -L 33389:winhost:3389 -C

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.