7 Replies Latest reply on May 5, 2011 4:53 PM by David Lloyd

    Plan for jboss-as-web extension points in AS7

    Vladimir Ralev Newbie

      Hello,

       

      Is there a plan to provide extensibility configuration for jboss-as-web module, to add extra features on top of JBossWeb and the config metadata without having to unzip/modify jboss-as-web-7.0.0.Alpha2-SNAPSHOT.jar or fork it completely? Something to replace the old server.xml file with it's classname configs - StandardEngine, StandardService, host config, etc.. (edit: for reference here is where some of these are intantiated in hard-coded way https://github.com/jbossas/jboss-as/blob/master/web/src/main/java/org/jboss/as/web/WebServerService.java )

       

      Do you plan to deploy this jar in exploded form eventually?

       

      Any comments on extensibility plans are highly appreciated.

        • 1. Plan for jboss-as-web extension points in AS7
          Emanuel Muckenhuber Master

          This really depends on what you want to do in the end. One of the main reason for the new configuration model in AS7 is to get rid of classname configs, therefore there is no plan to add generic support for that. The configuration for the web subsystem is incomplete and there are certain areas we plan to allow exentibility using classes provided by users - like valves, realms.

           

          Can you describe a bit more in detail what you want to do?

          • 2. Plan for jboss-as-web extension points in AS7
            Vladimir Ralev Newbie

            This is our server.xml (highlight "org.mobicents" for quick overview) http://pastebin.com/AKJxH0QJ

             

            We extend most of the core classes - (engine, service, context, custom conectors, host config) while reusing a very good amount without having to rebuild anything in JBossWeb and without having to unzip any jars/sars in the original JBossWeb. It is the same for the deployer part and metadata.

             

            In AS7 right now it seems we would have to build our own jboss-as-web jar.

             

            FYI, Sip Servlets are just like HTTP servlets - packaged in a WAR, there is sip.xml next to web.xml with the same syntax where the servlet classes are declared, etc.

             

            What would you recommend as the best solution for us in AS7?

            • 3. Plan for jboss-as-web extension points in AS7
              Emanuel Muckenhuber Master

              Hmm, not sure what the best solution is. Basically what we should accomplish is

              (1) that you don't have build your own jboss-web integration and

              (2) that the mobicents configuration is limited to the mobicents subsystems and (if possible) not the web configuration

               

              Maybe it's enough if we extend our service API - so that you can programmatically register your own StandardService and mobicents specific connectors, etc. - not sure if that would be enough? Otherwise Remy might have some additional ideas.

              • 4. Plan for jboss-as-web extension points in AS7
                Jean Deruelle Newbie

                Which Service API are you talking about AS7 Service or JBossWeb Service interface ? Do you have a link to this service API ?

                 

                We indeed need to register our own JBoss Web SipStandardService as well as SipStandardEngine, SipStandardHost, SipStandardContext and SipStandardManager & JBossSipCacheManager.( which are all extending the regular implementation classes provided by jboss web).

                We need the same thing for parsing SipMetaData (SIP Servlets annotations) and a way to hook somewhere like a deployer so that wars with both sip.xml and web.xml can be recognized correctly as SIP Servlets applications and not standard Web applications.

                 

                We will also need to hook somewhere for providing seamless converged SIP and HTTP HA capabilities (potentially in the same deployer as above to provide an extension to the JBossCacheManager (as5-6) ?)

                 

                We are trying to integrate with AS7 as early as possible to make the integration is the best possible even if that means work with the trunk.

                 

                Thanks a lot for you answers

                Jean

                • 5. Plan for jboss-as-web extension points in AS7
                  Jason Greene Master

                  Hello Vladimir and Jean,

                   

                  In addition to avoiding class references, we also have a requirement that the user configuration only reflect user settings (and not our internal wiring like in the past). The configuration is extensible though, so a user can add new "subsystems" to their domain.xml by specifying the extension that adds it.

                   

                  A subsystem provides its own custom schema for its section (with a goal of being friendly and type safe) and it also maintains a detyped representation which is used for all of the vairous management interfaces. So in a nutshell, anything that integrates with AS7 via a subsystem is fully manageable (and consistent with the configuration).

                   

                  A subsystem is also responsible for acting upon the management operations (note that configuration when parsed generates the very same management operations) to make the appropriate changes in the runtime state of the server (if not possible it tells the system a restart is in order). This is where you would create new services, launch tasks etc.

                   

                  So for mobicents I would recommend a subsystem (although you can have more than one if you want) that uses JBossWeb SPIs to launch your SIP server. This should give you essentially the same reuse you had before. It would also make sure the SPIs best represent what you are wanting to achieve. Lastly, it would provide a really nice easy to use configuration that would immediately be available in all of our managment interfaces (java remote protocols, HTTP/JSON protocol, embedded console, JON, etc).

                   

                  One thing though I should warn you about is that we are currently making the transition to the detyped model (which was done to make life easier for jbosstools and JON and the console), but that work is in a special detyped branch on Brians tree. We hope to migrate it as fast as humanly possible, however you may want to either base your work on that, or to instead wait until we formally merge it upstream. If you go with the latter you could probably initially focus on working with Remy on the JBossWeb SPI contracts that you currently have and need.

                   

                  Thanks!

                  • 6. Plan for jboss-as-web extension points in AS7
                    Jean Deruelle Newbie

                    Hey Jason, I'm taking a look at the Web Subsystem and we actually need to extend it not create a new one since we need to tightly intergate with Web Applications to have SIP/HTTP Convergence so that applications can share data between their HTTP or SIP Sessions in the same meta session called SipApplicationSession.

                     

                    Do you think it would be possible to have a new xml tag in the web subsytem xsd that would define the Service implementation class to use for JBossWeb, if not present just use the default StandardService if provided use the classname to create the instance ? So that it doesn't change anything in term of usability for the end user and still allow for flexibility/extension in term of configuration ?

                     

                    Thanks

                    Jean

                    • 7. Plan for jboss-as-web extension points in AS7
                      David Lloyd Master

                      Jean Deruelle wrote:

                       

                      Hey Jason, I'm taking a look at the Web Subsystem and we actually need to extend it not create a new one since we need to tightly intergate with Web Applications to have SIP/HTTP Convergence so that applications can share data between their HTTP or SIP Sessions in the same meta session called SipApplicationSession.

                       

                      Do you think it would be possible to have a new xml tag in the web subsytem xsd that would define the Service implementation class to use for JBossWeb, if not present just use the default StandardService if provided use the classname to create the instance ? So that it doesn't change anything in term of usability for the end user and still allow for flexibility/extension in term of configuration ?

                      Jean, it would be preferable to have a hook (internally) in the web subsystem which is used by a new/separate SIP subsystem in order to reconfigure the session type.  This way the user does not have to put some class name or something into the web config; instead they just add a SIP subsystem and everything just works.  Reiterating, we will probably never allow a name of an internal implementation class to ever appear in the configuration under normal conditions.