Announcement Announcement Module
Collapse
No announcement yet.
Remote EJB call from JBoss AS7/EAP6 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remote EJB call from JBoss AS7/EAP6

    Hi all,

    I have deployed an EJB jar on JBoss AS 7/EAP6 and wants to call the EJB from my spring application.
    I use the SimpleRemoteStatelessSessionProxyFactoryBean and it works for EJB's which are deployed on localhost.

    Thats my sample config:

    Code:
    <bean id="converterConfigEJB" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
                    <property name="jndiTemplate" ref="remoteEjbJndiTemplate"/>
    		<property name="jndiName"
    			value="ejb:/Converter-EJBs/ConverterConfigService!de.mycompany.converter.ejb.interfaces.ConverterConfigServiceRemote" />
    		<property name="businessInterface" value="de.mycompany.converter.ejb.interfaces.ConverterConfigServiceRemote" />
    	</bean>
    How can I configure that the remote EJB is deployed on a remote host?
    I think with JNDI properties but if I look into the EJB client samples from Red Hat they are using a "jboss-ejb-client.properties" file with properties like this: "remote.connection.default.host".

    I've tried to use this properties with a "org.springframework.jndi.JndiTemplate":

    Code:
    <bean id="remoteEjbJndiTemplate" class="org.springframework.jndi.JndiTemplate">
    		<property name="environment">
    			<props>
    				<prop key="remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED">false</prop>
    				<prop key="remote.connection.default.host">localhost</prop>
    				<prop key="remote.connection.default.port">4447</prop>
    				<prop key="remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS">default</prop>
    			</props>
    		</property>
    	</bean>
    But it doesnt matter which values I set for host or port properties. My example works. I think this jboss properties will be ignored. What are the correct properties for host and port?
Working...
X