alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Spring Framework example source code file (beanNameAutoProxyCreatorTests.xml)

This example Spring Framework source code file (beanNameAutoProxyCreatorTests.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Spring Framework tags/keywords

automatically, bean, doctype, illustrates, jdk, jdk, lazy, note, public, spring//dtd, stateful, stateful, utf-8, utf-8

The Spring Framework beanNameAutoProxyCreatorTests.xml source code

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

<beans>

	<bean id="frozenProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
		<property name="beanNames" value="frozenBean"/>
		<property name="frozen" value="true"/>
		<property name="interceptorNames" value="nopInterceptor"/>
	</bean>

	<bean id="_jdkBeanNameProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
		<description>
			Automatically proxies using JDK dynamic proxies
		</description>
	  <property name="beanNames">jdk*,onlyJdk,doubleJdk
	  <property name="interceptorNames">
			<list>
				<value>nopInterceptor
			</list>
	  </property>
	</bean>

	<bean id="doubleJdkBeanNameProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
	  <property name="beanNames" value="doubleJdk"/>
		<property name="interceptorNames" value="nopInterceptor"/>
	</bean>

	<bean id="_cglibBeanNameProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
	  <property name="beanNames">
			<value>
				cglib*
			</value>
		</property>
	  <property name="proxyTargetClass">
	  	<description>Use the inherited ProxyConfig property to force CGLIB proxying
	  	<value>true
	  </property>
		<property name="interceptorNames">
			<description>Interceptors and Advisors to apply automatically
			<list>
				<value>nopInterceptor
				<value>countingBeforeAdvice
			</list>
		</property>
	</bean>

	<bean id="introductionBeanNameProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
		<description>
			Illustrates a JDK introduction
		</description>
	  <property name="beanNames">*introductionUsingJdk
	  <property name="interceptorNames">
			<list>
				<value>introductionNopInterceptor
				<value>timestampIntroduction
				<value>lockableAdvisor
			</list>
	  </property>
	</bean>

	<bean id="timestampIntroduction" class="org.springframework.aop.framework.TimestampIntroductionAdvisor"/>

	<!--
		Stateful mixin. Note that singleton property is false.
	-->
	<bean id="lockableAdvisor" class="org.springframework.aop.framework.LockMixinAdvisor"
			scope="prototype"/>

	<bean id="countingBeforeAdvice" class="org.springframework.aop.framework.CountingBeforeAdvice"/>

	<bean id="nopInterceptor" class="org.springframework.aop.interceptor.NopInterceptor"/>

	<bean id="introductionNopInterceptor" class="org.springframework.aop.interceptor.NopInterceptor"/>

	<bean id="introductionUsingJdk" class="org.springframework.beans.TestBean">
		<property name="name">introductionUsingJdk
	</bean>

	<bean id="second-introductionUsingJdk" class="org.springframework.beans.TestBean">	
		<property name="name">second-introductionUsingJdk
	</bean>

	<!--
		Lazy only because it breaks other tests until this test is fixed
	-->
	<bean id="factory-introductionUsingJdk" class="org.springframework.aop.framework.autoproxy.CreatesTestBean"
			lazy-init="true">
	</bean>

	<bean id="jdk1" class="org.springframework.beans.TestBean">	
		<property name="name">jdk1
	</bean>

	<bean id="frozenBean" class="org.springframework.beans.TestBean">
		<property name="name" value="frozenBean"/>
	</bean>

	<bean id="cglib1" class="org.springframework.beans.TestBean">	
		<property name="name">cglib1
	</bean>

	<bean id="onlyJdk" class="org.springframework.beans.TestBean">	
		<property name="name">onlyJdk
	</bean>

	<bean id="doubleJdk" class="org.springframework.beans.TestBean">
		<property name="name">doubleJdk
	</bean>

	<bean id="noproxy" class="org.springframework.beans.TestBean">	
		<property name="name">noproxy
	</bean>

</beans>		

Other Spring Framework examples (source code examples)

Here is a short list of links related to this Spring Framework beanNameAutoProxyCreatorTests.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.