Back

Oracle APEX Architecture Free Tutorial

This free tutorial explains APEX architecture, i.e. how the HTTP request/response cycle works, how an APEX application works (prerequesite knowledge), then introduces the options for an HTTP listening service: the embedded PL/SQL gateway, the Apache mod_plsql module, and the APEX listener deployed to either a Glassfish or a WebLogic container.

We summarize with benefits and recommendations for the various listener options.

Audience:  Oracle DBA’s, Internet Architects, System Admins, APEX Developers, anyone interested in learning how APEX works.

Presenter: John Watson, Oracle Certified Master and SkillBuilders’ Director of Oracle Database Services.

Moderator: Dave Anderson, SkillBuilders President and Oracle DBA

his free tutorial is segmented into the following modules:

  1. Introduction to John Watson, SkillBuilders Director of Oracle Database Services (1:59)
  2. Tutorial Agenda (2:35)
  3. Understanding the HTTP Request / Response Cycle (6:56)
  4. How an APEX Application Really Works (A Bit of Architecture) (12:21)
  5. Listener Options Part 1: Embedded PL/SQL Gateway & Apache (5:26)
  6. Listener Options Part 2: The Oracle APEX Listener (9:18) (click on video below)
  7. Recommendations and Next Steps (1:27)

Date: Jul 25, 2013

NOTE: Some corporate firewalls will not allow videos hosted by YouTube.


Transcript

Listener Options Part 2: The Oracle APEX Listener

Oracle APEX Architecture and Listener Options

 

Session 6 – The APEX Listener

 

>> John:  The APEX Listener, its script is written in Java, so of course you have to have Java installed on the data server you want to run it on. It’s shipped as web archive, apex.war. It is absolutely normal web archive and I’ve installed it so we can see it, apex.war. There it is. 

 

[pause]

 

It’s just a web archive file conforming to the absolutely normal standards. 

 

[pause]

 

You need to have Java installed. I’ve already done that. Java. Normal problems with Java, my Java. I’m using the Linux alternate system. If you do setup the APEX Listener, you have to make sure you have a supported release of Java installed. The Java I’m using is HotSpot 1.7. Whatever. Whether you choose to use Jave HotSpots or whether you choose to use JRockits, I don’t believe there’s significant difference in the two releases, two JVMs. You can certainly [01:25 inaudible] in the future anyway. I just use Java HotSpot because that what happens to be shipped with the Linux that I’m working on. 

 

On the Linux you’ll need to configure you Java through the alternative system so you can support multiple versions. On the Windows, we have an expert Windows administrator. You can also maintain multiple releases of Java. I would generally try to use only one release on the machine anywhere. 

 

[pause]

 

Then having got Java installed, you need something within which to run your Java. That means you need to deploy the web archive, which is the APEX Listener, to a Java container, Glassfish container, a WebLogic container or theoretically even a third party container. I’ve heard of people using Tomcat for instance. I can’t imagine why anyone would, but a third party container is theoretically usable. 

 

Glassfish or WebLogic, why would you make the difference? WebLogic, you have to pay for, Glassfish, you don’t. That’s the important point for licensing. You can install Glassfish on any machine in the environment, which means you can separate out your web listening tier where the web listener will be running from the database tier where your APEX application will be running. 

 

[pause]

 

To set it up, thus, is a bit of a mission. I did want to demonstrate the whole installation of Glassfish in a webinar but there really wasn’t going to be time. So I have already installed Glassfish. The Glassfish’s wizard installed, it’s a wizard driven install. It’s not too bad as you may come across a few anomalies. My Glassfish is already running and there’s a standard port to use for administration purposes and it is all okay. 

 

To connect to that port,

 

[pause]

 

let me check, I need to log on again. I’m running on the local host, by the way, to avoid some security issues. 

 

[pause]

 

Okay, let’s just move on. I’ve configured my Glassfish Listener and I setup listening addresses. So your listening addresses you configure within the Glassfish environment. Glassfish then can contain that. Glassfish itself is listening for HTTP and I’ve given it three addresses. I’ve got my app in port service with which I’m in communication right now of 4848, and I’ve configured 8080 and 8181. 

 

8080 – I’m going to use for APEX over HTTP, 8181 for APEX over secure servers. So you configure your web listening endpoints within the Glassfish environment. 

 

[pause]

 

Then we have to deploy the software. Looking at the applications link, very simple too, it’s very easy to do within Glassfish. The wizard is quite handy. I deploy two applications – APEX and one called I. 

 

The APEX application, that’s the apex.war file. The apex.war and, generally speaking, click to deploy and navigate to wherever your apex.war file happens to be, just browse to it and find it. Having found it creates a virtual path. We create the virtual path and we deploy the war file. The path I’ve created in this case, APEX. It’s my virtual path. We define the virtual path at the point when you deploy the apex.war file then extend the virtual path later on when we create the APEX application themselves. We deploy another application, the I application, and that is just to point us all to the images, towards the images that are used by your APEX programmers. 

 

Deploying through the wizard, very straight forward. 

 

[pause]

 

Final stage, I need to create a path through an application. The apex.war file

 

[pause]

 

There it is. 

 

[pause]

 

It has a reasonable user interface. If I Java it – if I Java minus jar apex.war, it even comes with a bit of help. 

 

[pause]

 

Just give it the Help command. 

 

[pause]

 

That’s my code for the APEX Listener which I’ve already deployed through Glassfish. What do you do? You can map URLs, you can setup a database connection. 

 

[pause]

 

But the APEX Listener running in Glassfish needs to know where to send, where the database actually is. So for that I use a Setup command, apex.war just java minus jar apex.war setup. I’ll setup a database connection which is just an arbitrary name. I’ll call it apexdemo. 

 

[pause]

 

And the little user interface will give me a prompt, name of database server, local host and 192.168.56.101. This could be any machine anywhere on the planet, firewall permitting. Because remember you’d normally be separating the location of the APEX Listener from the location of the database. 

 

What ports should we get that database on? Default port 1521. 

 

Name of the service or SID ñ I’ll choose a SID. I’ll give it a service orcl. 

 

[pause]

 

Database public use – APEX public user, default is APEX public user and the password. 

 

[pause]

 

RESTful services, I’m not too [07:09 inaudible] about them, so I shall skip that step. Let’s configure this. 

 

I’ve now created apexdemo as a database connection string. That’s just a logical name that tells the APEX Listener get to that machine, that port, connect to database instance, call that, log on to that user. 

 

[pause]

 

Then I extend the virtual path for one particular application. Java minus jar. Again, the jar file apex.war and the command map URL. Remember that command there, map URL. Mapping URL pattern to a named database connection, because my one APEX Listener might be rooting connections through to 20 different databases on 20 different machines. So map URL. The URL I’m going to map will be /demo to apexdemo. I’m associating that virtual path with that database connector and that database connector is associated with a database on that machine on that port of that name and that log on. Associate a URL with a database connect string. 

 

[pause]

 

At that point, I can theoretically hand this over to the APEX guys. I’m going to see if it actually functions. 

 

The port, the virtual path I created, and then f – the famous f function – and the page. That is going through the APEX Listener, the local host. I think I was having trouble – it was security issues. I was having trouble coming through an IP address. 

 

Okay, local host is now functioning. At this point, I can log on and having got that far, 

 

[pause]

 

provided I get my credentials correct, I’ll send it through. I now turn it over to the developers for the normal creation of an instance and define your APEX application.

 

Copyright SkillBuilders.com 2017

×
Free Online Registration Required

The tutorial session you want to view requires your registering with us.

It’s fast and easy, and totally FREE.

And best of all, once you are registered, you’ll also have access to all the other 100’s of FREE Video Tutorials we offer!

 

×
Podcast
×