org.sapia.ubik.ioc.spring
Class BeanImporterPostProcessor

java.lang.Object
  extended by org.sapia.ubik.ioc.spring.BeanImporterPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor

public class BeanImporterPostProcessor
extends java.lang.Object
implements org.springframework.beans.factory.config.BeanPostProcessor

This bean post processor is used in order to lookup remote objects from remote Ubik JNDI servers. It processes RemoteBeanRef instances, returning in their place the the actual remote beans that these bean references point to.

This post processor supports lazy lookups of services: it allows for Ubik services to appear on the network in an ad-hoc manner. More precisely, given services must not necessarily appear on the network before the applications that depend on them.

This allows client applications to startup without risking abrupt termination because of failed service lookups: if a given service is not found, a lazy proxy is created and returned at its place. A discovery mechanism insures that the missing service is eventually retrieved (if it appears on the network). Note that a NamingServiceBean must have been configurued beforehand (so that it is used by this post processor when performing lookups).

Author:
yduchesne
See Also:
NamingService

Nested Class Summary
 class BeanImporterPostProcessor.ProxyInvocationHandler
          Internal proxy class to handle invocations
 
Constructor Summary
BeanImporterPostProcessor()
           
 
Method Summary
 java.lang.Object postProcessAfterInitialization(java.lang.Object bean, java.lang.String name)
           
 java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanImporterPostProcessor

public BeanImporterPostProcessor()
Method Detail

postProcessAfterInitialization

public java.lang.Object postProcessAfterInitialization(java.lang.Object bean,
                                                       java.lang.String name)
                                                throws org.springframework.beans.BeansException
Specified by:
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException

postProcessBeforeInitialization

public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean,
                                                        java.lang.String arg1)
                                                 throws org.springframework.beans.BeansException
Specified by:
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException


Copyright © 2010 Sapia OSS. All Rights Reserved.