[jboss-dev-forums] [Design of EJB 3.0] - Re: jndi name issues

scott.stark@jboss.org do-not-reply at jboss.com
Tue Apr 29 11:54:03 EDT 2008


Carlo's post seems to have lost information in the quoted strings.

There will have to be an org.jboss.metadata.ejb.jboss.jndipolicy.spi.EjbDeploymentSummary input into the jndi name process, so the metadata layer only has the JBossMetaData with the DefaultJndiBindingPolicy. What Carlo is describing is the ejb3 DefaultJndiBindingPolicy. The ejb2x DefaultJndiBindingPolicy will be different to conform to its legacy defaults.

The @LocalBinding, @RemoteBinding or the equivalents from jboss.xml have to be incorporated into the JBossMetaData and the DefaultJndiBindingPolicy impls honor those overrides.

What matters is that we can unit test the jndi names in the metadata layer and have this match the server environment behavior. So a deployer needing to know the jndi name for a bean would:

1. Create the EjbDeploymentSummary(DeploymentUnit, JBossEnterpriseBeanMetaData)
2. Obtain the DefaultJndiBindingPolicy from the JBossEnterpriseBeanMetaData.JBossMetaData + DeploymentUnit.classLoader
3. Based on the reference info, call the approriate DefaultJndiBindingPolicy.get*JndiName(unitSummary) method to obtain the jndi name that should be used in the reference lookup.

For 3 we need a utility class that properly looks at the reference type to determine if this is a home/local-home, remote or local, business interface lookup.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147557#4147557

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147557



More information about the jboss-dev-forums mailing list