⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userdaofactory.java~

📁 J2EE & Tomcat books published by hope
💻 JAVA~
字号:
/* * $Id: UserDAOFactory.java~,v 1.1 2002/01/04 21:04:50 jc123804 Exp $ * Copyright 2001 Sun Microsystems, Inc. All rights reserved. * Copyright 2001 Sun Microsystems, Inc. Tous droits r閟erv閟. */package com.sun.j2ee.workflow.user.dao;import javax.naming.NamingException;import javax.naming.InitialContext;import com.sun.j2ee.blueprints.customer.util.JNDINames;import com.sun.j2ee.blueprints.customer.account.exceptions.AccountDAOSysException;import com.sun.j2ee.blueprints.util.tracer.Debug;public class UserDAOFactory {    /**     * This method instantiates a particular subclass implementing     * the DAO methods based on the information obtained from the     * deployment descriptor     */    public static AccountDAO getDAO() throws AccountDAOSysException {        AccountDAO acctDao = null;        try {            InitialContext ic = new InitialContext();            String className = (String) ic.lookup(JNDINames.ACCOUNT_DAO_CLASS);            acctDao = (AccountDAO) Class.forName(className).newInstance();        } catch (NamingException ne) {            throw new AccountDAOSysException("AccountDAOFactory.getDAO:  NamingException while getting DAO type : \n" + ne.getMessage());        } catch (Exception se) {            throw new AccountDAOSysException("AccountDAOFactory.getDAO:  Exception while getting DAO type : \n" + se.getMessage());        }        return acctDao;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -