[jboss-as7-dev] Non java: JNDI bindings and MSC services in AS7

Jaikiran Pai jpai at redhat.com
Sun Apr 10 01:35:28 EDT 2011


On Saturday 09 April 2011 10:43 PM, David M. Lloyd wrote:
>
> Bindings outside of "java:" will not be backed my MSC services as we
> have no way of controlling what is bound and when.  We certainly could
> support binding outside of "java:" but it's not really clear what the
> semantics (or use cases) are.
>
> I examined the example app and didn't find the lookup reference you're
> referring to, but wouldn't it be a relative lookup regardless?  Unless
> they specified a URL scheme in the first segment that is?
First we (used to) allow EJBs to be bound to JBoss specific (non java:) 
jndi name (Keks and KeksLocal in this example) via the jboss.xml of the 
ejb jar:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC
   "-//JBoss//DTD JBOSS 5.0//EN"
   "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
<jboss>
<enterprise-beans>
<session>
<ejb-name>GeometricModelBean</ejb-name>
<jndi-name>Keks</jndi-name>
<local-jndi-name>KeksLocal</local-jndi-name>
</session>
</enterprise-beans>
</jboss>

Then we allow a ejb-ref/ejb-local-ref of the bean to point to this jndi 
name. In this  case the ejb-ref is in the web.xml. The jboss-web.xml of 
the war allows for specifying the lookup name:

<jboss-web>
<ejb-ref>
<ejb-ref-name>ejb/GeometricModel</ejb-ref-name>
<jndi-name>Keks</jndi-name>
</ejb-ref>
....

<!-- EJB Local References -->
<ejb-local-ref>
<ejb-ref-name>ejb/GeometricModelLocal</ejb-ref-name>
<local-jndi-name>KeksLocal</local-jndi-name>
</ejb-local-ref>
</jboss-web>

That jndi-name/local-jndi-name gets translated to lookup name of the 
ejb-ref/ejb-local-ref.

-Jaikiran





More information about the jboss-as7-dev mailing list