Announcement Announcement Module
No announcement yet.
Not clear on how to access an ejb remotely using spring Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Not clear on how to access an ejb remotely using spring

    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" "">


    <!-- ========================= 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">

    <bean id="ejb/SearchBean" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="java.naming.factory.initial">
    <property name="java.naming.provider.url">
    <property name="java.naming.factory.url.pkgs">

    <bean id="searchBean" class="org.springframework.ejb.access.SimpleRemote StatelessSessionProxyFactoryBean">
    <property name="jndiName">
    <property name="businessInterface">

    <bean id="searchClient" class="">
    <property name="searchService">
    <red bean="searchBean"/>

    - The message source for this context, loaded from localized "messages_xx" files
    - in the classpath, i.e. "/WEB-INF/classes/" or
    - "/WEB-INF/classes/".
    - "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=" eBundleMessageSource">
    <property name="basename"><value>messages</value></property>



  • #2
    Maybe this can help

    this is one of the Test case to set up a bean

    public class TestAuditoriaBean extends TestCase{

    private String[] paths = {"com/intercam/seguridad/ejb/applicationContext.xml"};
    private ApplicationContext applicationContext;

    * @see junit.framework.TestCase#setUp()
    protected void setUp() throws Exception{
    applicationContext = new ClassPathXmlApplicationContext(paths);
    auditoriaSdo = (IAuditoria) applicationContext.getBean("auditoriaSeguridadServ ice"); super.setUp();

    and this is my applicationContext

    <bean id="auditoriaSeguridadService" class="org.springframework.ejb.access.SimpleRemote StatelessSessionProxyFactoryBean" lazy-init="true">
    <property name="jndiName">
    <property name="jndiEnvironment">
    <prop key="java.naming.factory.initial">weblogic.jndi.WL InitialContextFactory</prop>
    <prop key="java.naming.provider.url">t3://localhost:7001</prop>
    <property name="businessInterface" value="com.intercam.seguridad.interfaces.IAuditori a" />


    • #3

      And what does SLSB calles means?