@see ResolveJndiNameDecoratorUnitTestCase.testResolvedJndiNameWithMappedName.
@SuppressWarnings(value="deprecation")
| public void testResolvedJndiNameWithMappedName()
| {
| // Obtain MD, set mappedName, and define expected values for resolution
| JBossSessionBeanMetaData beanMD = getDecoratedEjbMetaData();
| beanMD.setMappedName("testResolvedJndiName-mapped-name");
| String expectedHome = "testResolvedJndiName-mapped-name/home";
|
| // Resolve
| String resolved = beanMD.getHomeJndiName();
|
| // Test
| assertEquals(expectedHome, resolved);
|
| // Test Deprecated, backwards-compat behavior (may be removed when these methods
no longer exist, JBMETA-68)
| String resolvedDeprecated =
beanMD.determineResolvedJndiName(KnownInterfaces.HOME, null);
| assertEquals(expectedHome, resolvedDeprecated);
| }
Here we're testing that when a mapped-name is specified, that value is used for the
base upon which we'll bind a Home (ie "x/home"). The same concept applies
for interface-specific bindings.
The problem is that mappedName cannot both be a base *and* the default business interface
target; otherwise there will be a JNDI "NotContextException" when using it as a
base.
JIRA is
http://jira.jboss.com/jira/browse/JBMETA-75.
This is the issue preventing another jboss-metadata release, its integration with EJB3
Core, and finally the integration of EJB3 Proxy.
S,
ALR
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164137#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...