Announcement Announcement Module
Collapse
No announcement yet.
Spring + Plugins Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring + Plugins

    Hello I'm totally new to Spring and I'm still trying to figure out what spring can actually do for me.
    So I started reading "J2EE Develepment without EJB".
    One of the best books on software development I know.

    What I experienced so far is that most of the problems in commercial projects
    or at least the ones I know ( J2EE or .Net ) come from:

    - weak support for the poor system administrator
    - no support for service or plugin driven development
    - no support for plugin deployment and versioning

    I think the last two points are very importing when you have to configure a core
    application with diffent behaviour for different users ( departments, etc.) Developing one application for different
    needs that might difffer only in details is pure nightmare!

    Other things that changes constantly are workflow and UI behaviour
    Both things could be implemented as plugins.
    So you don`t have to switch off and on parts of your application or even introduce build time flags to chose between versions.
    What a nightmare again!


    So I would like to know if spring supports managed plugins that you can start, stop, install, uninstall
    Autowire plugins including dependency check and versioning. So if you like this is dependency injection on a higher level than object level.

    Maybe similar to MBeans in JBoss or Eclipse or better?
    Is this supported in Spring?
    Can I tell my system administrator "take version 1.02 of the login plugin and
    replace the buggy one via spring system (web)console" so he or she can fix or improve a running application?

  • #2
    That is an interesting point you have raised. Currently you can't use some kind of console to start, stop, pause, remove or add managed beans at runtime. However, much work is underway that will help this. Extensive JMX support is being added to Spring and we are working on allowing configuration changes to persist back to the configuration file.

    What you are suggesting is something I have been considering for a while now. I need to have a think about this in more detail and discuss it with every one else, but it would be great to be able to deploy and manage components at runtime without having to stop the application.

    Rob

    Comment


    • #3
      Great! I think that Spring + managed beans/plugins + jmx + jms will be a big step for the J2EE developer community
      and much more than only an alternative to fullblown appservers.
      I think plugin driven development is the future.

      Ok, on last thing I would like to know regarding AOP in spring.
      I'm looking for a solution to cope with exception handling in java.
      My idea is to use some sort of central exception handler in any appplication ( or almost any ).

      I kown that you can bind AOP functionality to methods.
      But is it possible to bind AOP functionality to exceptions also, in the
      way that every time a checked exceptions is thrown some sort of
      action is called ( e.g the exception handler) ?

      Comment


      • #4
        You can use AfterThrowingAdvice to bind to all methods on a given object to catch specific exceptions or just all exceptions. Using a BeanNameAutoProxyCreator you could avice whatever Spring beans you like with this advisor.

        I recommend that you read sections 5.3.2.4 and 5.10.1.1 in the Spring reference


        Rob

        Comment


        • #5
          thanks, but there is no AfterThrowingAdvice only AfterReturningAdvice...
          Mo

          Comment


          • #6
            afterThrowing is covered in:
            http://www.springframework.org/docs/...p.html#d0e2933

            Comment


            • #7
              i'm still interested in having spring managed plugins
              maybe this sounds interesting
              http://genpluginengine.sourceforge.n.../features.html

              Comment


              • #8
                All,

                Mental block kicked in. There is no AfterThrowingAdvice is it just ThrowsAdvice.

                Rob

                Comment

                Working...
                X