[jboss-dev-forums] [Design of POJO Server] - Re: ReferenceMetaDataResolverDeployer is wrong
adrian@jboss.org
do-not-reply at jboss.com
Tue Dec 4 08:28:02 EST 2007
Also, I'm seeing a lot of this hackery in the new metadata.
What's wrong with using OO?
| private static String getJndiName(JBossEnterpriseBeanMetaData beanMD, boolean isLocal)
| {
| String jndiName = null;
| if (isLocal)
| {
| // Validate that there is a local home associated with this bean
| jndiName = beanMD.determineLocalJndiName();
| if (jndiName == null)
| {
| log.warn("LocalHome jndi name requested for: '" + beanMD.getEjbName() + "' but there is no LocalHome class");
| }
| }
| else
| {
| - if( beanMD.isEntity() )
| - {
| - JBossEntityBeanMetaData md = (JBossEntityBeanMetaData) beanMD;
| - jndiName = md.getJndiName();
| - }
| - else if( beanMD.isSession())
| - {
| - JBossSessionBeanMetaData md = (JBossSessionBeanMetaData) beanMD;
| - jndiName = md.getHomeJndiName();
| - if(jndiName == null)
| - jndiName = md.getJndiName();
| - }
| + jndiName = md.resolveRemoteJndiName();
| }
| return jndiName;
| }
|
And move the if statements into the types?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110188#4110188
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110188
More information about the jboss-dev-forums
mailing list