Results 1 to 3 of 3

Thread: Recomended practice for service layer from domain object

  1. #1
    Join Date
    Sep 2004
    Posts
    346

    Default 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. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    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.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    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...
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

Similar Threads

  1. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  2. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  3. EJB service layer non-OO / Anemic Domain Model
    By Aro in forum Architecture
    Replies: 0
    Last Post: Jan 15th, 2005, 07:10 AM
  4. Replies: 0
    Last Post: Jan 6th, 2005, 08:19 AM
  5. Domain Object Validation
    By lhilden in forum Architecture
    Replies: 4
    Last Post: Dec 14th, 2004, 07:00 AM

Posting Permissions

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