<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:spring="http://www.springframework.org/schema/beans"
       xmlns:ejb="http://www.mulesource.org/schema/mule/ejb/2.0"
       xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.0"
       xsi:schemaLocation="
               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
               http://www.mulesource.org/schema/mule/core/2.0 http://www.mulesource.org/schema/mule/core/2.0/mule.xsd
               http://www.mulesource.org/schema/mule/vm/2.0 http://www.mulesource.org/schema/mule/vm/2.0/mule-vm.xsd
               http://www.mulesource.org/schema/mule/ejb/2.0 http://www.mulesource.org/schema/mule/ejb/2.0/mule-ejb.xsd">

    <!-- in a typical production environment you'd set jndiProviderUrl to the jndi server
         instead, here, we need to provide a "dummy" context -->

    <spring:bean name="jndiFactory" class="org.mule.transport.ejb.SimpleEjbContextFactory"/>
    <spring:bean name="dummy" class="org.mule.container.DummyEjbHomeProxy"/>
    <spring:bean name="jndiContext" factory-bean="jndiFactory" factory-method="create">
        <spring:constructor-arg>
            <spring:map>
                <spring:entry key="TestService" value-ref="dummy"/>
            </spring:map>
        </spring:constructor-arg>
    </spring:bean>

    <ejb:connector name="ejb" jndiContext-ref="jndiContext" securityPolicy="rmi.policy"/>

</mule>
