Java Reference
In-Depth Information
<property name="jndiEnvironment">
<prop key="java.naming.factory.initial">
<prop key="java.naming.provider.url"> jnp://localhost:1099</prop>
<prop key=" java.naming.factory.url.pkgs">org.jboss.naming.client</prop>
<!- - Local EJB 3 SLSB - ->
<bean id="uwrLocalService"
<property name="jndiName" value=" UwrLocalServiceBean/Local " />
Lookup of JMS Objects
The service locator is not limited to EJB components; it can be used for any JNDI bound
object such as a JMS queue and topic or a JDBC data source. It can also be used with web
Listing 4-7 looks up a local JMS queue and topic configured in JBoss. The listing also
shows two ways of using a resource reference while accessing JNDI bound objects. One
option is to prefix it directly in the jndiName property; the other is to turn on the
resourceRef property, which will automatically prepend the string java:comp/env/: to the
JNDI name.
Listing 4-7. insurance-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
xsi:schemaLocation=" ">
Search WWH ::

Custom Search