[jboss-dev-forums] [Design of POJO Server] - Patch to MappedReferenceMetadataResolverDeployer fixes EJB3,

ALRubinger do-not-reply at jboss.com
Tue Aug 12 05:21:50 EDT 2008


Issue is:

http://jira.jboss.org/jira/browse/EJBTHREE-1455

EJB References and EJB Local References need to map to the interface-specific proxy to be equipped with proper information for SessionContext.getInvokedBusinessInterface.

However, EJB2 has no "interface-specific" Proxies.

So how can I determine which spec version is being used so I can take the appropriate action?

Patch is:

Index: server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java
  | ===================================================================
  | --- server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java	(revision 76968)
  | +++ server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java	(working copy)
  | @@ -883,7 +884,8 @@
  |              {
  |                 cdmd.addDependency(target);
  |                 // Need to look at the local jndi name
  | -               String localJndiName = target.getBeanMetaData().determineLocalJndiName();
  | +               String localInterface = ref.getLocal();
  | +               String localJndiName = target.getBeanMetaData().determineResolvedJndiName(localInterface);
  |                 if(localJndiName != null)
  |                    ref.setResolvedJndiName(localJndiName);
  |              }
  | @@ -969,7 +971,8 @@
  |                 // Determine the jndi name for the reference interface
  |                 String iface = getInterface(ref);
  |                 //LegacyEjb3JndiPolicy policy = new LegacyEjb3JndiPolicy();
  | -               String containerJndiName = target.getBeanMetaData().determineJndiName();
  | +               String businessInterface = ref.getRemote();
  | +               String containerJndiName = target.getBeanMetaData().determineResolvedJndiName(businessInterface);
  |                 if(containerJndiName != null)
  |                    ref.setResolvedJndiName(containerJndiName);
  |              }

This breaks smoke-tests for EJB2.x, but passes my EJB3 defining test case.

S,
ALR

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

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



More information about the jboss-dev-forums mailing list