This content has been marked as final.
Show 4 replies
-
1. Re: Annotated EJB References in MappedReferenceMetadataDeplo
alrubinger May 6, 2008 3:27 PM (in response to alrubinger)This is leading to wrong resolution of getResolvedJndiName() from AnnotatedEJBReferencesMetaData.
S,
ALR -
2. Re: Annotated EJB References in MappedReferenceMetadataDeplo
starksm64 May 6, 2008 5:19 PM (in response to alrubinger)Ok, I have taken the EJBTHREE-1338 issue and will look at it tonight.
-
3. Re: Annotated EJB References in MappedReferenceMetadataDeplo
starksm64 May 8, 2008 2:23 AM (in response to alrubinger)With the current 1.0.0.Beta13 release of metadata and updates to MappedReferenceMetadataDeployer, the @EJB(home) and @EJB(localBusiness) resolve to:
2008-05-07 22:43:48,807 DEBUG [org.jboss.deployment.MappedReferenceMetaDataResolverDeployer] (RMI TCP Connection(4)-127.0.0.1) Processing unit=ejbthree1154.jar, structure:ejbthree1154.jar+EjbEndpoint:ejbName=TestBean,ejbClass=org.jboss.ejb3.test.ejbthree1154.TestBean ,home=org.jboss.ejb3.test.ejbthree1154.TestRemoteHome,BusinessLocals: [org.jboss.ejb3.test.ejbthree1154.TestLocalBusiness],BusinessRemotes: [org.jboss.ejb3.test.ejbthree1154.TestRemoteBusiness] +EjbEndpoint:ejbName=DelegateBean,ejbClass=org.jboss.ejb3.test.ejbthree1154.Dele gateBean,BusinessRemotes: [org.jboss.ejb3.test.ejbthree1154.DelegateRemoteBusiness] ++@EJB(home) -> mappedName=null| resolvedJndiName=TestBean/localHome ++@EJB(localBusiness) -> mappedName=null| resolvedJndiName=TestBean/org.jboss.ejb3.test.ejbthree1154.TestLocalBusiness
as determined by the new determineResolvedJndiName(iface) method on the JBossEnterpriseBeanMetaData, but the bindings for the interfaces on the bean are:+- TestBean (class: org.jnp.interfaces.NamingContext) | +- remoteHome (proxy: $Proxy128 implements interface org.jboss.ejb3.test.ejbthree1154.TestRemoteHome) | +- local (proxy: $Proxy129 implements interface org.jboss.ejb3.test.ejbthree1154.TestLocalBusiness,interface org.jboss.ejb3.proxy.JBossProxy) | +- remote (proxy: $Proxy126 implements interface org.jboss.ejb3.proxy.JBossProxy,interface org.jboss.ejb3.test.ejbthree1154.TestRemoteBusiness) | +- localHome (proxy: $Proxy131 implements interface org.jboss.ejb3.test.ejbthree1154.TestLocalHome)
The logic for the BasicJndiBindingPolicy is to use the /local, /localHome, /remote and /remoteHome suffixes for the interfaces matching the metadata getLocal(), getLocalHome(), getRemote() and getHome() values. All others are bound under a suffix equal to the interface name. Here org.jboss.ejb3.test.ejbthree1154.TestLocalBusiness is a BusinessLocal interface rather than the getLocal() value so its expected to be bound under
TestBean/org.jboss.ejb3.test.ejbthree1154.TestLocalBusiness rather than TestBean/local.
So what happens when there is a getLocal() and BusinessLocal interfaces? Either the default binding policy needs to be updated or the proxy layer needs to use the new determineResolvedJndiName(iface, summary) method to get the jndi name to use. -
4. Re: Annotated EJB References in MappedReferenceMetadataDeplo
alrubinger May 8, 2008 12:07 PM (in response to alrubinger)"scott.stark@jboss.org" wrote:
So what happens when there is a getLocal() and BusinessLocal interfaces?
Should be as follows by default:
* /local > Proxy implementing all Local Business Interfaces
* /remote > Proxy implementing all Remote Business Interfaces
The only way to obtain a EJB 2.1 local or remote view is via its corresponding "Home.create()", so we won't bind these in JNDI directly.
Since /local and /remote above are non-deterministic in terms of "getInvokedBusinessInterface()", we'll provide mechanisms for additional lookup values that will be interface-specific.
Will make a new topic today to discuss my propositions for what objects (References, Proxies, ObjectFactories) get bound where in order to achieve this.
S,
ALR