beanRefContext.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="ejb-context" class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
<value>applicationContext_ejb.xml</value>
</list>
</constructor-arg>
</bean>
</beans>
applicationContext_ejb.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!--
- Application context definition
- Accessing beans from business layer
-->
<beans>
<bean id="userDelegate" class="mil.navy.fvm.ejb.UserDelegate" singleton="false" >
<property name="service">
<ref local="userBean"/>
</property>
</bean>
<bean id="careerDelegate" class="mil.navy.fvm.ejb.CareerDelegate" singleton="false" >
<property name="service">
<ref local="careerBean"/>
</property>
</bean>
<bean id="relationshipDelegate" class="mil.navy.fvm.ejb.RelationshipDelegate" singleton="false" >
<property name="service">
<ref local="relationshipBean"/>
</property>
</bean>
<bean id="statusDelegate" class="mil.navy.fvm.ejb.StatusDelegate" singleton="false" >
<property name="service">
<ref local="statusBean"/>
</property>
</bean>
<bean id="cacheDelegate" class="mil.navy.fvm.ejb.CacheDelegate" singleton="false" />
<!-- Stateless -->
<bean id="userBean" class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean">
<property name="jndiName">
<value>ejb/UserLocalHome</value>
</property>
<property name="resourceRef">
<value>true</value>
</property>
<property name="businessInterface">
<value>mil.navy.fvm.interfaces.IUser</value>
</property>
</bean>
<bean id="careerBean" class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean">
<property name="jndiName">
<value>ejb/CareerLocalHome</value>
</property>
<property name="resourceRef">
<value>true</value>
</property>
<property name="businessInterface">
<value>mil.navy.fvm.interfaces.ICareer</value>
</property>
</bean>
<bean id="relationshipBean" class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean">
<property name="jndiName">
<value>ejb/RelationshipLocalHome</value>
</property>
<property name="resourceRef">
<value>true</value>
</property>
<property name="businessInterface">
<value>mil.navy.fvm.interfaces.IRelationship</value>
</property>
</bean>
<bean id="statusBean" class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean">
<property name="jndiName">
<value>ejb/StatusLocalHome</value>
</property>
<property name="resourceRef">
<value>true</value>
</property>
<property name="businessInterface">
<value>mil.navy.fvm.interfaces.IStatus</value>
</property>
</bean>
</beans>
I'm running on oc4j 10.1.2
I can create a new ClassPathXmlApplicationContext no problem with applicationContext_ejb.xml. Isn't this what ContextSingletonBeanFactoryLocator does?
Thanks alot.