Loading...
Spring Framework Reference Documentation 7.0.2의 Appendix의 한국어 번역본입니다.
아래의 경우에 피드백에서 신고해주신다면 반영하겠습니다.
감사합니다 :)
This part of the appendix lists XML schemas related to integration technologies.
jee SchemaThe jee elements deal with issues related to Jakarta EE (Enterprise Edition) 설정,
such as looking up a JNDI 객체 and defining EJB 참조.
To use the elements in the jee schema, you need to have the following preamble at the top
of your Spring XML 설정 파일. The text in the following snippet references the
correct schema so that the elements in the jee namespace are available to you:
1<?xml version="1.0" encoding="UTF-8"?> 2<beans xmlns="http://www.springframework.org/schema/beans" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xmlns:jee="http://www.springframework.org/schema/jee" 5 xsi:schemaLocation=" 6 http://www.springframework.org/schema/beans 7 https://www.springframework.org/schema/beans/spring-beans.xsd 8 http://www.springframework.org/schema/jee 9 https://www.springframework.org/schema/jee/spring-jee.xsd"> 10 11 <!-- bean definitions here --> 12 13</beans>
<jee:jndi-lookup/> (simple)The following example shows how to use JNDI to look up a data source without the jee schema:
1<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> 2 <property name="jndiName" value="jdbc/MyDataSource"/> 3</bean> 4<bean id="userDao" class="com.foo.JdbcUserDao"> 5 <!-- Spring will do the cast automatically (as usual) --> 6 <property name="dataSource" ref="dataSource"/> 7</bean>
The following example shows how to use JNDI to look up a data source with the jee
schema:
1<jee:jndi-lookup id="dataSource" jndi-name="jdbc/MyDataSource"/> 2 3<bean id="userDao" class="com.foo.JdbcUserDao"> 4 <!-- Spring will do the cast automatically (as usual) --> 5 <property name="dataSource" ref="dataSource"/> 6</bean>
<jee:jndi-lookup/> (with Single JNDI Environment Setting)The following example shows how to use JNDI to look up an environment 변수 without
jee:
1<bean id="simple" class="org.springframework.jndi.JndiObjectFactoryBean"> 2 <property name="jndiName" value="jdbc/MyDataSource"/> 3 <property name="jndiEnvironment"> 4 <props> 5 <prop key="ping">pong</prop> 6 </props> 7 </property> 8</bean>
The following example shows how to use JNDI to look up an environment 변수 with jee:
1<jee:jndi-lookup id="simple" jndi-name="jdbc/MyDataSource"> 2 <jee:environment>ping=pong</jee:environment> 3</jee:jndi-lookup>
<jee:jndi-lookup/> (with Multiple JNDI Environment Settings)The following example shows how to use JNDI to look up multiple environment 변수
without jee:
1<bean id="simple" class="org.springframework.jndi.JndiObjectFactoryBean"> 2 <property name="jndiName" value="jdbc/MyDataSource"/> 3 <property name="jndiEnvironment"> 4 <props> 5 <prop key="sing">song</prop> 6 <prop key="ping">pong</prop> 7 </props> 8 </property> 9</bean>
The following example shows how to use JNDI to look up multiple environment 변수 with
jee:
1<jee:jndi-lookup id="simple" jndi-name="jdbc/MyDataSource"> 2 <!-- newline-separated, key-value pairs for the environment (standard Properties format) --> 3 <jee:environment> 4 sing=song 5 ping=pong 6 </jee:environment> 7</jee:jndi-lookup>
<jee:jndi-lookup/> (Complex)The following example shows how to use JNDI to look up a data source and a number of
different 속성 without jee:
1<bean id="simple" class="org.springframework.jndi.JndiObjectFactoryBean"> 2 <property name="jndiName" value="jdbc/MyDataSource"/> 3 <property name="cache" value="true"/> 4 <property name="resourceRef" value="true"/> 5 <property name="lookupOnStartup" value="false"/> 6 <property name="expectedType" value="com.myapp.DefaultThing"/> 7 <property name="proxyInterface" value="com.myapp.Thing"/> 8</bean>
The following example shows how to use JNDI to look up a data source and a number of
different 속성 with jee:
1<jee:jndi-lookup id="simple" 2 jndi-name="jdbc/MyDataSource" 3 cache="true" 4 resource-ref="true" 5 lookup-on-startup="false" 6 expected-type="com.myapp.DefaultThing" 7 proxy-interface="com.myapp.Thing"/>
<jee:local-slsb/> (Simple)The <jee:local-slsb/> 요소는 로컬 EJB Stateless Session Bean에 대한 참조를 설정합니다.
The following example shows how to configures a reference to a local EJB Stateless Session Bean
without jee:
1<bean id="simple" 2 class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean"> 3 <property name="jndiName" value="ejb/RentalServiceBean"/> 4 <property name="businessInterface" value="com.foo.service.RentalService"/> 5</bean>
The following example shows how to configures a reference to a local EJB Stateless Session Bean
with jee:
1<jee:local-slsb id="simpleSlsb" jndi-name="ejb/RentalServiceBean" 2 business-interface="com.foo.service.RentalService"/>
<jee:local-slsb/> (Complex)The <jee:local-slsb/> 요소는 로컬 EJB Stateless Session Bean에 대한 참조를 설정합니다.
The following example shows how to configures a reference to a local EJB Stateless Session Bean
and a number of 속성 without jee:
1<bean id="complexLocalEjb" 2 class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean"> 3 <property name="jndiName" value="ejb/RentalServiceBean"/> 4 <property name="businessInterface" value="com.example.service.RentalService"/> 5 <property name="cacheHome" value="true"/> 6 <property name="lookupHomeOnStartup" value="true"/> 7 <property name="resourceRef" value="true"/> 8</bean>
The following example shows how to configures a reference to a local EJB Stateless Session Bean
and a number of 속성 with jee:
1<jee:local-slsb id="complexLocalEjb" 2 jndi-name="ejb/RentalServiceBean" 3 business-interface="com.foo.service.RentalService" 4 cache-home="true" 5 lookup-home-on-startup="true" 6 resource-ref="true">
<jee:remote-slsb/>The <jee:remote-slsb/> 요소는 remote EJB Stateless Session Bean에 대한 참조를 설정합니다.
The following example shows how to configures a reference to a remote EJB Stateless Session Bean
without jee:
1<bean id="complexRemoteEjb" 2 class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean"> 3 <property name="jndiName" value="ejb/MyRemoteBean"/> 4 <property name="businessInterface" value="com.foo.service.RentalService"/> 5 <property name="cacheHome" value="true"/> 6 <property name="lookupHomeOnStartup" value="true"/> 7 <property name="resourceRef" value="true"/> 8 <property name="homeInterface" value="com.foo.service.RentalService"/> 9 <property name="refreshHomeOnConnectFailure" value="true"/> 10</bean>
The following example shows how to configures a reference to a remote EJB Stateless Session Bean
with jee:
1<jee:remote-slsb id="complexRemoteEjb" 2 jndi-name="ejb/MyRemoteBean" 3 business-interface="com.foo.service.RentalService" 4 cache-home="true" 5 lookup-home-on-startup="true" 6 resource-ref="true" 7 home-interface="com.foo.service.RentalService" 8 refresh-home-on-connect-failure="true">
jms SchemaThe jms elements deal with configuring JMS-related 빈, such as Spring’s
Message Listener Containers. These elements are detailed in the
section of the JMS chapter entitled JMS Namespace Support
. See that chapter for full details on this support
and the jms elements themselves.
In the interest of completeness, to use the elements in the jms schema, you need to have
the following preamble at the top of your Spring XML 설정 파일. The text in the
following snippet references the correct schema so that the elements in the jms namespace
are available to you:
1<?xml version="1.0" encoding="UTF-8"?> 2<beans xmlns="http://www.springframework.org/schema/beans" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xmlns:jms="http://www.springframework.org/schema/jms" 5 xsi:schemaLocation=" 6 http://www.springframework.org/schema/beans 7 https://www.springframework.org/schema/beans/spring-beans.xsd 8 http://www.springframework.org/schema/jms 9 https://www.springframework.org/schema/jms/spring-jms.xsd"> 10 11 <!-- bean definitions here --> 12 13</beans>
<context:mbean-export/>This 요소는 어노테이션 기반 MBean 내보내기 설정에 자세히 나와 있습니다.
cache SchemaYou can use the cache elements to enable support for Spring’s @CacheEvict, @CachePut,
and @Caching 어노테이션. It it also supports 선언적 XML 기반 캐싱. See
캐싱 어노테이션 활성화 and
선언적 XML 기반 캐싱 for details.
To use the elements in the cache schema, you need to have the following preamble at the
top of your Spring XML 설정 파일. The text in the following snippet references
the correct schema so that the elements in the cache namespace are available to you:
1<?xml version="1.0" encoding="UTF-8"?> 2<beans xmlns="http://www.springframework.org/schema/beans" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xmlns:cache="http://www.springframework.org/schema/cache" 5 xsi:schemaLocation=" 6 http://www.springframework.org/schema/beans 7 https://www.springframework.org/schema/beans/spring-beans.xsd 8 http://www.springframework.org/schema/cache 9 https://www.springframework.org/schema/cache/spring-cache.xsd"> 10 11 <!-- bean definitions here --> 12 13</beans>
JVM Checkpoint Restore
Language Support