Hi all
I have a rich client configured using spring. On the server I have a bunch of stateless session beans running on Jboss 4.0
To access a SLSB calles Search I suppose first I need to set up a jndi lookup.
I couldn't find any where that teached how to do this. Can anyone help?
My clientContext.xml looks as follows.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- ========================= GENERAL DEFINITIONS ========================= -->
<!-- Configurer that replaces ${...} placeholders with values from properties files -->
<!-- (in this case, mail and JDBC related properties) -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>jndi.properties</value>
</list>
</property>
</bean>
<bean id="ejb/SearchBean" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="java.naming.factory.initial">
<value>org.jnp.interfaces.NamingContextFactory</value>
</property>
<property name="java.naming.provider.url">
<value>${java.naming.provider.url}</value>
</property>
<property name="java.naming.factory.url.pkgs">
<value>org.jboss.naming:org.jnp.interfaces</value>
</property>
</bean>
<bean id="searchBean" class="org.springframework.ejb.access.SimpleRemote StatelessSessionProxyFactoryBean">
<property name="jndiName">
<value>ejb/SearchBean</value>
</property>
<property name="businessInterface">
<value>com.invest.common.ISearch</value>
</property>
</bean>
<bean id="searchClient" class="com.invest.client.views.actions.search">
<property name="searchService">
<red bean="searchBean"/>
</property>
</bean>
<!--
- The message source for this context, loaded from localized "messages_xx" files
- in the classpath, i.e. "/WEB-INF/classes/messages.properties" or
- "/WEB-INF/classes/messages_de.properties".
-
- "getMessage" calls to this context will use this source.
- Child contexts can have their own message sources, inheriting all messages from this
- source, being able to define new messages and override ones defined in this source.
-->
<bean id="messageSource" class="org.springframework.context.support.Resourc eBundleMessageSource">
<property name="basename"><value>messages</value></property>
</bean>
</beans>
thanks
alex


Reply With Quote