Spring访问EJB


(1)访问本地EJB
   使用LocalStatelessSessionProxyFactoryBean
   <bean id="paymentService" class="org.springframework.ejb.access.LocalStatelessSessionPRoxyFactoryBean">
     <property name="jndiName">
         <value>payService</value>
     <property>
     <property name="businessInterface">
         <value>com.springinaction.service.PayMentService</value>
     </property>
   </bean>

(2)访问远程EJB
    使用SimpleRemoteStatelessSessionProxyFactoryBean
    <bean id="paymentService" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
     <property name="jndiName">
         <value>payService</value>
     <property>
     <property name="businessInterface">
         <value>com.springinaction.service.PayMentService</value>
     </property>
   </bean> 

你可能感兴趣的:(Spring访问EJB)