ͨ¹ý DAOFactory µÄ·ºÐÍд·¨À´ÑÝʾJava·ºÐ͵ÄÌØÊâÓ÷¨
ͨ¹ý DAOFactory µÄ·ºÐÍд·¨À´ÑÝʾJava·ºÐ͵ÄÌØÊâÓ÷¨
СÐÍÏîÄ¿Öг£³£¶¼Ã»ÓÐÓÃÈý·½³Ö¾Ã»¯¿ò¼Ü£¬¶ø´ó¶¼ÊÇÓù«Ë¾»ò×ÔÐÐÒÀ¾ÝDAOģʽ·â×°µÄһЩ×é¼þÀ´Íê³ÉÊý¾Ý¿â³Ö¾Ã»¯¶¯×÷£¬²¢ÇÒ£¬Í¨³£ÎªÁ˸ü¾ß¿ÉÀ©Õ¹ÐÔ£¬³£³£Ê¹ÓóéÏ󹤳§Ä£Ê½À´½âñîºÏ¡£
Ò»¡¢ÏÈ¿´´úÂë
1¡¢¼òµ¥¹¤³§´úÂë
/*****************************************************************************/
/* Title: DAOFactory 1.0 */
/* Description: DAOFactory 1.0 Java Source Code. */
/* Copyright: Copyright(c) 2009 - CodingMouse, Inc. All rights are reserved. */
/* Company: CodingMouse's Java R&D Studio */
/* */
/* Created in August 8, 2009 */
/*****************************************************************************/
package com.china.codingmouse.cmsdk4j.dao.factory;
import java.io.Serializable;
import com.china.codingmouse.cmsdk4j.config.CmSdk4jConfigurationReader;
import com.china.codingmouse.cmsdk4j.dao.generaldao.GeneralDAO;
import com.china.codingmouse.cmsdk4j.dao.generaldao.IGeneralDAO;
import com.china.codingmouse.cmsdk4j.dao.genericsdao.GenericsDAO;
import com.china.codingmouse.cmsdk4j.dao.genericsdao.IGenericsDAO;
import com.china.codingmouse.cmsdk4j.exception.GeneralException;
/**
* Êý¾Ý·ÃÎʹ¤³§¡£<br><br>
*
* ÓÃÓÚ·â×°³£¹æÒÔ¼°·ºÐÍÊý¾Ý·ÃÎʶ¯×÷ʵÏֵĹ¹½¨¡£
* @param <T> ·ºÐÍÀàÐͲÎÊý¡£
* @author CodingMouse
* @version 1.0
* @see AbstractDAOFactory
* @since JDK1.5
*/
public class DAOFactory<T extends Serializable> extends AbstractDAOFactory<T> {
/**
* ¹¹½¨³£¹æÊý¾Ý·ÃÎʶ¯×÷ʵÀý¡£
* @return ³£¹æÊý¾Ý·ÃÎʶ¯×÷½Ó¿ÚʵÀý¡£
*/
@Override
public IGeneralDAO buildGeneralDAO() {
try {
// ´ÓÅäÖõµÖжÁÈ¡³£¹æÊý¾Ý·ÃÎʶ¯×÷ʵÏÖÀàÍêÈ«ÏÞ¶¨Ãû
String className = CmSdk4jConfigurationReader.getInstance().getBaseSetting(false).get
Ïà¹ØÎĵµ£º
¸Õ¸ÕÔËÐÐjava HelloWorld.class£¬ÀÏÊÇ˵£º
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/class
Caused by: java.lang.ClassNotFoundException: HelloWorld.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
  ......
Òë×¢
£º±¾ÎÄÀ´×Ôstraight_talking_java@yahoogroups.comÌÖÂÛ×飬ÒѾÊÇÒ»Äê¶àǰ
µÄÎÄÕ¡£Alan WilliamsonÊÇJava Developers
JournalµÄ±à¼£¬ÏÂÎÄÀ´×ÔËûÔÚIBMµÄÒ»¸öÏûÏ¢À´Ô´¡£SWTºÍSwingµÄÂÛÕùÎÒ¼û¹ý²»ÉÙ£¬NetbeansºÍEclipseµÄҲͬÑù¶à¡£ÒëÕß·Òë
´ËÎIJ¢²»ÊÇÒª¼¤ÆðʲôÕùÖ´£¬Ò²²»ÊÇÖ§³ÖÄÄÒ»·½£¨ËäÈ»ÎÒµÄÈ·ÊÇÕ¾ÔÚSWTÒ»±ßµ ......
package com.huawei.globe;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
public class CrossConectionContextSheet
{
CrossCalition cc = new CrossCalition();
&nbs ......
·½°¸Ò»²½Ö裺
1¡¢ÅäÖÃTomcat\conf\context.xmlÌí¼Ó <Resource>
<Resource name="jdbc/books" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30"
maxWait="10000" username="sa" password=""
driverClassName="com.microsoft.jdbc.sqlse ......
public class javaTest {
public static void test(String ...strings){
for(String str: strings){
System.out.print(str + " ");
}
System.out.println();
}
public static void main(String[] args){
test("a", "b", "c", "ddd");
test( ......