Announcement Announcement Module
Collapse
No announcement yet.
Moving EJB bean configuration to properties file Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Moving EJB bean configuration to properties file

    I would like to move EJB configuration out of the applicationContext.xml into a properties file. For a SimpleRemoteStatelessSessionBean, I can override the jndiName and two interface setttings, but I haven't been able to figure out how to deal with the jndiEnvironment properties.

    For example:
    Code:
      <bean id="SomeInterface"
         class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
    
        <property name="jndiName" value="SomeIFHome"/>
        <property name="businessInterface" value="com.blah.SomeIF"/>
        <property name="homeInterface" " value="com.blah.SomeIFHome"/>
    
        <property name="jndiEnvironment">
          <props>
    	<prop key="java.naming.factory.initial">
    	  org.jnp.interfaces.NamingContextFactory
    	</prop>
    	<prop key="java.naming.factory.url.pkgs">
    	  org.jboss.naming&#58;org.jnp.interfaces	
    		</prop>
    	<prop key="java.naming.provider.url">
    	  jnp&#58;//server.blah.com&#58;1099
    	</prop>
          </props>
        </property>
     
      </bean>
    can be changed to:
    Code:
       <bean id="SomeInterface"
            class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean"/>
    and:
    Code:
       someInterface.jndiName = SomeIFHome
       someInterface.businessInterface = com.blah.SomeIF
       someInterface.homeInterface = com.blah.SomeIFHome
    How do I specify the jndiEnvironment in the properties?

    Could I create another Spring bean that holds this and then specify a ref to it? What class should I use for the bean?
Working...
X