Announcement Announcement Module
Collapse
No announcement yet.
One ApplicationContext per Layer problem... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • One ApplicationContext per Layer problem...

    Hello, i try to define one ApplicationContext per Layer like this !

    Code:
    NB: --> = depends, not extends
    Code:
              +-----------+
              | RootLayer |
              +-----------+
                    ^
                    |
           +------------------+
           | Enterprise Layer |   
           +------------------+
             |       |       |
       +-------+ +-------+ +-------+
       |  App  | |  App  | |  App  |
       | Layer | | Layer | | Layer |
       +-------+ +-------+ +-------+
    Each application component can refer app Component or Enterprise Component. This work well but now, i want use a technical layer accessible from all App layer and Enterprise layer (my RootLayer is a dummy layer )

    like this :
    Code:
              +-----------+
              | RootLayer |<---------------+
              +-----------+                |
                    ^                      |
                    |                      |
           +------------------+    +-----------------+
           | Enterprise Layer |--->| Technical Layer |
           +------------------+    +-----------------+
             |       |       |             ^
       +-------+ +-------+ +-------+       |
       |  App  | |  App  | |  App  |-------+
       | Layer | | Layer | | Layer |
       +-------+ +-------+ +-------+
    Q: How can i register all bean definitions from all my layers on the dummy layer (RootLayer) for user dependency lookup (from app layer to tech layer) ?
    or
    How override lookup strategy for have this one :
    - look on current layer
    - look on parent layer
    - look on child layers of parent layer

    Thx a lot

  • #2
    Given that each ApplicationContext can only have one parent, I don't see how you can do this with hierarchical contexts.

    Since the App Layers are dependent on the Technical and Enterprise layers, you'd just have to combine those two layers. Just specify their respective XML files in the single context.

    Comment


    • #3
      Can't you put the Technical Layer in between Root and Enterprise?

      Comment

      Working...
      X