Vincent Thinking

All about Vincent's work and life

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  34 随笔 :: 0 文章 :: 183 评论 :: 0 Trackbacks
public   class  ActionMapperFactory  {
    
    
protected   static   final  Log LOG  =  LogFactory.getLog(ActionMapperFactory. class );

    
private   static   final  HashMap classMap  =   new  HashMap();

    
public   static  ActionMapper getMapper()  {
        
synchronized  (classMap)  {
            String clazz 
=  (String) Configuration.get(WebWorkConstants.WEBWORK_MAPPER_CLASS);
            
try   {
                ActionMapper mapper 
=  (ActionMapper) classMap.get(clazz);
                
if  (mapper  ==   null {
                    mapper 
=  (ActionMapper) ObjectFactory.getObjectFactory().buildBean(clazz,  null );
                    classMap.put(clazz, mapper);
                }


                
return  mapper;
            }
  catch  (Exception e)  {
                String msg 
=   " Could not create ActionMapper: WebWork will *not* work! " ;
                LOG.fatal(msg, e);
                
throw   new  RuntimeException(msg, e);
            }

        }

    }

}


明白的告诉我一下,谢谢. 觉的有点问题...
posted on 2006-05-31 22:55 Vincent Thinking 阅读(1726) 评论(0)  编辑  收藏 所属分类: JAVA

只有注册用户登录后才能发表评论。


网站导航: