5 Replies Latest reply on Dec 3, 2011 8:07 PM by Udo

    DADS to Listener relationship

    ant7
      I am currently using mod_plsql for accessing my Apex applications. In my dads.conf configuration file I have a few different paths mapped out for my applications. For instance
      <location /application_1>
      ...
      ...
      </location>
      
      <location /application_2>
      ...
      ...
      </location>
      
      <location /application_3>
      ...
      ...
      </location>
      So that my URLs end up at http://host/application_1 or http://host/application_2. This helps reduce some confusion for users as the application name is in the URL versus a generic "pls/apex" or something along those lines.

      My question is if I were to move to using the Apex Listener, would I need a separate listener per dad location entry? In other words /application_1 would need a listener and /application_2 would need a different listener.

      If I do need a separate listener for each, then if there any conflict with both listeners working on the same port (80)?.

      Lastly, what type of memory requirements does the listener have and how much does the amount of memory available to the listener affect the overall performance?

      Tony
        • 1. Re: DADS to Listener relationship
          Udo
          Hello Tony,
          My question is if I were to move to using the Apex Listener, would I need a separate listener per dad location entry?
          That depends a bit on the JEE server you plan to use for the APEX Listener. If you can manage to configure URL-Rewriting, you could get at least the initial URL pattern as before. For permanent URLs like you could configure in in the location-tag you'll need a reverse proxy in front of your APEX Listener. For several reasons (e.g. easy SSL configuration, proper static contents, adding some HTTP headers, etc.), I prefer this setup anyway.
          If I do need a separate listener for each, then if there any conflict with both listeners working on the same port (80)?.
          If you have to connect to different databases, then you'll need a separate APEX Listener for each database (user), as each APEX Listener instance can only connect to exactly one database user. Of course, you can have multiple APEX Listener deployments on your JEE server using port 80 (or a proxy on port 80, where you could also masquerade different JEE servers on different ports).
          The only scenario where APEX Listener will use a dedicated port per instance is in Standalone Mode, but the Standalone Mode is not recommended for production use anyway.
          Lastly, what type of memory requirements does the listener have and how much does the amount of memory available to the listener affect the overall performance?
          That will obviously depend on your JEE server and the number of concurrent users to be served. In general, the APEX Listener will need more memory than the OHS you've used before. Compared to other JEE applications, I'd say the APEX Listener has a rather small memory footprint. I won't expect much better performance with more memory available, as the main load is (similar to OHS) inside the database...

          -Udo
          1 person found this helpful
          • 2. Re: DADS to Listener relationship
            ant7
            Udo -

            Thanks for the reply.

            My plan was to use Glassfish for the J2EE server. All of the applications are connecting to the same database with the same user on the same port. So based on what you said I can get by with a single apex listener. But, if I understood you correctly, your suggesting putting doing something like this:
            Apache -> Glassfish / Apex Listener -> Database
            I would want/need to do this in order to have links like this: http:/host/application_1/f?p=100:200 and http://host/application_2/f?p=300:500 work properly. Doing simple URL rewriting in Glassfish wouldn't accomplish this, correct?

            Tony
            • 3. Re: DADS to Listener relationship
              Udo
              Hi Tony,

              as far as I know it, GlassFish doesn't support URL rewriting out of the box, but you can add a filter, e.g. [url http://tuckey.org/urlrewrite/]Tuckey's URL Rewrite Filter to do that. But there are a few limitations in that, e.g. it seems to be hard to rewrite the root context. But if you don't need that or some other "fancy" effects, which I don't see in your example, you should be able do the rewriting without a separate proxy.
              Anyway, if you have an Apache (or some other proxy enabled web server) in your environment anyway, I guess it would be simpler to just use what you have and know instead of integrating the filter.

              -Udo
              1 person found this helpful
              • 4. Re: DADS to Listener relationship
                ant7
                How about referencing a secondary image folder? We use a custom theme and keep all of the javascript and css files in their own directory, separate from the apex images directory. In the dads config file I just define by saying
                alias /e/ "path_to_my_directory"
                Does the listener support this as well?
                • 5. Re: DADS to Listener relationship
                  Udo
                  As with mod_plsql, this is more a feature of your web server, e.g. the Apache HTTP Server based OHS for mod_plsql. The APEX Listener is deployed on a JEE Server. Some of them support static contents directly, e.g. Apache Tomcat can have a ROOT context - just create your folder "e" there, copy your files and you are done, some support mapping local directories to a context, e.g. virtual-directory-mapping in WLS, and the least you'll usually get is to pack your static contents into a war file and deploy it.
                  Note that the embedded JEE Server used when you run APEX Listener in Standalone Mode does not allow additional contexts at all, so you have just +/apex/+ and +/i/+ as contexts, but that should be the only scenario where you are limited to this, and the Standalone Mode is intended to be used for development and testing purposes only.
                  So, see your JEE Servers documentation to find out what you have to do to get your static contents hosted. The steps for deploying APEX images described in the APEX Listener Installation Guide will give you a hint on how to do it for the officially supported JEE Servers.

                  -Udo