Results 1 to 8 of 8

Thread: Spring + Plugins

  1. #1
    Join Date
    Sep 2004
    Posts
    21

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    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

  3. #3
    Join Date
    Sep 2004
    Posts
    21

    Default

    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) ?

  4. #4
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    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

  5. #5
    Join Date
    Sep 2004
    Posts
    21

    Default

    thanks, but there is no AfterThrowingAdvice only AfterReturningAdvice...
    Mo

  6. #6
    Join Date
    Aug 2004
    Location
    u.s.a
    Posts
    399

  7. #7
    Join Date
    Sep 2004
    Posts
    21

    Default

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

  8. #8
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    All,

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

    Rob

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. Replies: 5
    Last Post: Aug 9th, 2008, 05:30 AM
  3. Gaijin Studio for Spring MVC 0.9.2 Released
    By dadams in forum Announcements
    Replies: 8
    Last Post: May 30th, 2007, 10:48 PM
  4. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •