Polishing
This commit is contained in:
@@ -56,7 +56,6 @@ class ConfigurationClassEnhancer {
|
||||
DisposableBeanMethodInterceptor.class, NoOp.class };
|
||||
|
||||
private static final CallbackFilter CALLBACK_FILTER = new CallbackFilter() {
|
||||
|
||||
public int accept(Method candidateMethod) {
|
||||
// Set up the callback filter to return the index of the BeanMethodInterceptor when
|
||||
// handling a @Bean-annotated method; otherwise, return index of the NoOp callback.
|
||||
@@ -72,7 +71,6 @@ class ConfigurationClassEnhancer {
|
||||
|
||||
private static final Callback DISPOSABLE_BEAN_METHOD_INTERCEPTOR = new DisposableBeanMethodInterceptor();
|
||||
|
||||
|
||||
private final Callback[] callbackInstances;
|
||||
|
||||
|
||||
@@ -162,6 +160,7 @@ class ConfigurationClassEnhancer {
|
||||
private static class GetObjectMethodInterceptor implements MethodInterceptor {
|
||||
|
||||
private final ConfigurableBeanFactory beanFactory;
|
||||
|
||||
private final String beanName;
|
||||
|
||||
public GetObjectMethodInterceptor(ConfigurableBeanFactory beanFactory, String beanName) {
|
||||
@@ -296,7 +295,8 @@ class ConfigurationClassEnhancer {
|
||||
this.beanFactory.setCurrentlyInCreation(beanName, false);
|
||||
}
|
||||
return this.beanFactory.getBean(beanName);
|
||||
} finally {
|
||||
}
|
||||
finally {
|
||||
if (alreadyInCreation) {
|
||||
this.beanFactory.setCurrentlyInCreation(beanName, true);
|
||||
}
|
||||
@@ -347,6 +347,6 @@ class ConfigurationClassEnhancer {
|
||||
Enhancer.registerCallbacks(fbSubclass, callbackInstances);
|
||||
return fbSubclass.newInstance();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
*
|
||||
* <p>Base classes to make implementing EJB 2.x beans simpler and less error-prone,
|
||||
* as well as guaranteeing a Spring BeanFactory is available to such EJBs.
|
||||
* This promotes good practice, with EJB services used for transaction
|
||||
* This promotes good EJB practice, with EJB services used for transaction
|
||||
* management, thread management, and (possibly) remoting, while
|
||||
* business logic is implemented in easily testable POJOs.</p>
|
||||
*
|
||||
*
|
||||
* <p>In this model, the EJB is a facade, with as many POJO helpers
|
||||
* behind the BeanFactory as required.</p>
|
||||
*
|
||||
* <p>Note that the default behavior is to look for an EJB enviroment variable
|
||||
*
|
||||
* <p>Note that the default behavior is to look for an EJB environment variable
|
||||
* with name <code>ejb/BeanFactoryPath</code> that specifies the
|
||||
* location <i>on the classpath</i> of an XML bean factory definition
|
||||
* file (such as <code>/com/mycom/mypackage/mybeans.xml</code>).
|
||||
* If this JNDI key is missing, your EJB subclass won't successfully
|
||||
* initialize in the container.</p>
|
||||
*
|
||||
*
|
||||
* <p><b>Check out the <code>org.springframework.ejb.interceptor</code>
|
||||
* package for equivalent support for the EJB 3 component model</b>,
|
||||
* providing annotation-based autowiring using an EJB 3 interceptor.</p>
|
||||
|
||||
Reference in New Issue
Block a user