Java Reference
In-Depth Information
>
<!- - Other beans - ->
<bean name="uwrSlsbHome"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="uwrbusinessslsb" />
<property name="jndiEnvironment">
<props>
<prop key="java.naming.factory.initial">
org.jnp.interfaces.NamingContextFactory
</prop>
<prop key="java.naming.provider.url">
jnp://localhost:1099</prop>
<prop key=" java.naming.factory.url.pkgs">org.jboss.naming.client</prop>
</props>
</property>
</bean>
</beans>
Local EJB 2.
x
Lookup
EJB 2.0 introduced local enterprise bean components collocated in the same JVM with
other Java EE components. This improved performance by eliminating the network
trip required to look up an object on the JNDI tree. This also simplified EJB object
lookup to a great extent. A local stateless session bean can also be accessed using the
JndiObjectFactoryBean
just by configuration, as shown in Listing 4-5.
Listing 4-5.
insurance-servlet.xml
: Local EJB
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="
http://www.springframework.org/schema/beans"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
>
