Java Reference
In-Depth Information
<bean id="postageService"
class="" />
The final step is to tell the EJB support class where your bean configuration is. By default, it looks at
the JNDI environment variable java:comp/env/ejb/BeanFactoryPath for the file location. So, you add an
environment entry to your EJB deployment descriptor for this location.
The EJB support classes instantiate the Spring IoC container using BeanFactoryLocator . The default
BeanFactoryLocator they use is ContextJndiBeanFactoryLocator , which instantiates the IoC (a regular
BeanFactory implementation such as ApplicationContext ) container using a bean configuration file
specified by the JNDI environment variable java:comp/env/ejb/BeanFactoryPath . You can override
this variable name by calling the setBeanFactoryLocatorKey() method in a constructor or in the
setSessionContext() method.
Now you can repack your EJB JAR file to include the preceding bean configuration file and redeploy
it to your EJB container. In OpenEJB, this is a simple undeploy and redeploy sequence. It will vary from
container to container.
Search WWH ::

Custom Search