Results 1 to 3 of 3

Thread: Howto: auto-load things after context initialized

  1. #1
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    87

    Default Howto: auto-load things after context initialized

    Want I want to do is load for example a JCR repository automatically after the application context has been initialized. What is the best way to achive this?

    - Create 1 listerener / thing you want to load (extending from contextloaderlistener i.e.)

    What is the best practise for auto loading things after the app context has been loaded?

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Create a bean that implements InitializingBean interface and that will create your custom objects in the afterPropertiesSet - or just use the init-method attribute.
    Note that Spring Modules contains extensive JCR support including jackrabbit and jeceira. What JCR implementation are you using?
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #3
    Join Date
    Oct 2005
    Location
    Belgium
    Posts
    87

    Default

    For the moment I'm using the InitializingBean / afterpropertiesset to achive the auto-loading. But it just feels strange to use this interface for these purposes. I guess I would be cleaner to start the loading when the full Spring container ha been loaded?

    I'm using JackRabbit ... so I'll have a look at the spring modules ... thx for mentioning that

Posting Permissions

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