Announcement Announcement Module
Collapse
No announcement yet.
Recomended practice for service layer from domain object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recomended practice for service layer from domain object

    Using spring for service layer. What is the best practice for accessing service layer from domain object. My particular issue is I have a domain object whose children are also the same typed domain object but there is a complicated HQL join to retreive the results so I just can't create a mapping. Should I access the spring service layer from my domain object such that when I iterate through a list of these domain objects then each domain object will have access to it's parents? Maybe this question is better answered in hibernate forum but since it's also Spring related I thought I'd also ask it here.

  • #2
    Spring 1.2 will have a feature to configure objects persisted with Hibernate or JDO implementations using Dependency Injection. The Hibernate code is already in the sandbox: org.springframework.orm.support.hibernate.Dependen cyInjectionInterceptorFactoryBean. There was also thread about this usage in the forum a while ago...

    This might be what you're looking for.

    Comment


    • #3
      Note also that Spring 1.1 also added ConfigurableBeanFactory.applyBeanPropertyValues, which is another approach which could be used to wire up classes created by Hibernate, without them having to be created by Spring itself. You'd probably still need to do it via a Hibernate Interceptor though...

      Comment

      Working...
      X