[jboss-dev-forums] [Design of EJB 3.0] - Re: Unit Tests for Unbinding References from JNDI in EJB3 Pr
ALRubinger
do-not-reply at jboss.com
Tue Jun 17 13:25:51 EDT 2008
Some notes regarding Jaikiran's patch now attached to EJBTHREE-1420:
* Overall, the test looks good and follows the proper setup. :)
* Needs LGPL Headers and Copyright info (these should be in the Eclipse templates I'd send along)
* Tests must check not only the default local and remote bind values, but also those of the interface-specific bindings
* Already provided are SLSB and SFSB EJBs in the "common" test package; we can use these and do away with the ones specific to the "jndiregistrar" test package.
* The tests are checking for hardcoded JNDI bind values. Instead, should be checking against the same values used by Proxy; these are obtained from metadata:
JBossSessionBeanMetaData md = statelessSessionContainer.getMetaData();
| md.getLocalHomeJndiName(); // Local Home Binding
| md.getHomeJndiName(); // Remote Home Binding
| md.determineJndiName(); // Default Business Remote Binding
| md.determineLocalJndiName(); // Default Business Local Binding
| BusinessRemotesMetaData businessRemotes = md.getBusinessRemotes();
| for(String businessRemoteInterfaceName : businessRemotes)
| {
| md.determineResolvedJndiName(businessRemoteInterfaceName); // Interface-specific business remote JNDI Binding
| }
| BusinessLocalsMetaData businessLocals = md.getBusinessLocals();
| for(String businessLocalInterfaceName: businessLocals)
| {
| md.determineResolvedJndiName(businessLocalInterfaceName); // Interface-specific business local JNDI Binding
| }
The important thing is that the test setup looks great. :)
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158786#4158786
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158786
More information about the jboss-dev-forums
mailing list