您好我必须为ejb编写远程客户端。 EJb在pramiti服务器上运行,我想在春天写客户端。
答案 0 :(得分:0)
您可以使用SimpleRemoteStatelessSessionProxyFactoryBean访问远程Ejbs。另外,请查看source / javadocs以获取信息:http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring-context/4.1.1.RELEASE/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java#SimpleRemoteStatelessSessionProxyFactoryBean
<bean id="ApplicationServiceBean" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
<property name="jndiName" value="test/ApplicationServiceBean/remote" />
<property name="businessInterface" value="your.ApplicationService" />
<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:org.jnp.interfaces</prop>
<prop key="java.naming.provider.url">jnp://zaphod:42</prop>
</props>
</property>
</bean>