|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
IDE是好。java中的IDE更是百花齐放,你用jbuilder能说jbuilder赶不上vs吗?用eclipse,netbeans也很舒服啊。我就不明白“稍微差一些”那一些是从哪里差来的。//文件:DbConnectionProvider.java
packagecom.qingtuo.db.pool;
importjava.sql.*;
importjava.util.*;
publicabstractclassDbConnectionProvider{
/**Dummyvalues.Overrideinsubclasses.**/
privatestaticfinalStringNAME="";
privatestaticfinalStringDESCRIPTION="";
privatestaticfinalStringAUTHOR="";
privatestaticfinalintMAJOR_VERSION=0;
privatestaticfinalintMINOR_VERSION=0;
privatestaticfinalbooleanPOOLED=false;
/**
*Returnsthenameoftheconnectionprovider.
*/
publicStringgetName(){
returnNAME;
}
/**
*Returnsadescriptionoftheconnectionprovider.
*/
publicStringgetDescription(){
returnDESCRIPTION;
}
/**
*Returnstheauthoroftheconnectionprovider.
*/
publicStringgetAuthor(){
returnAUTHOR;
}
/**
*Returnsthemajorversionoftheconnectionprovider,i.e.the1in1.0.
*/
publicintgetMajorVersion(){
returnMAJOR_VERSION;
}
publicintgetMinorVersion(){
returnMINOR_VERSION;
}
/**
*Returnstrueifthisconnectionproviderprovidesconnectionsout
*ofaconnectionpool.
*/
publicbooleanisPooled(){
returnPOOLED;
}
/**
*Returnsadatabaseconnection.WhenaJivecomponentisdonewitha
*connection,itwillcalltheclosemethodofthatconnection.Therefore,
*connectionpoolswithspecialreleasemethodsarenotdirectly
*supportedbytheconnectionproviderinfrastructure.Instead,connections
*fromthosepoolsshouldbewrappedsuchthatcallingtheclosemethod
*onthewrapperclasswillreleasetheconnectionfromthepool.
*/
publicabstractConnectiongetConnection();
/**
*Startstheconnectionprovider.Forsomeconnectionproviders,this
*willbeano-op.However,connectionproviderusersshouldalwayscall
*thismethodtomakesuretheconnectionproviderisstarted.
*/
protectedabstractvoidstart();
/**
*Thismethodshouldbecalledwheneverpropertieshavebeenchangedso
*thatthechangeswilltakeeffect.
*/
protectedabstractvoidrestart();
/**
*Tellstheconnectionprovidertodestroyitself.Formanyconnection
*providers,thiswillessentiallyresultinano-op.However,
*connectionproviderusersshouldalwayscallthismethodwhenchanging
*fromoneconnectionprovidertoanothertoensurethatthereareno
*danglingdatabaseconnections.
*/
protectedabstractvoiddestroy();
/**
*Returnsthevalueofapropertyoftheconnectionprovider.
*
*@paramnamethenameoftheproperty.
*@returnsthevalueoftheproperty.
*/
publicabstractStringgetProperty(Stringname);
/**
*Returnsthedescriptionofapropertyoftheconnectionprovider.
*
*@paramnamethenameoftheproperty.
*@returnthedescriptionoftheproperty.
*/
publicabstractStringgetPropertyDescription(Stringname);
/**
*Returnsanenumerationofthepropertynamesfortheconnectionprovider.
*/
publicabstractEnumerationpropertyNames();
/**
*Setsapropertyoftheconnectionprovider.Eachproviderhasasetnumber
*ofpropertiesthataredeterminedbytheauthor.Tryingtosetanon-
*existantpropertywillresultinanIllegalArgumentException.
*
*@paramnamethenameofthepropertytoset.
*@paramvaluethenewvaluefortheproperty.
*/
publicabstractvoidsetProperty(Stringname,Stringvalue);
}
最后就是我对java的几点希望:首先是IDE工具,有人说java已经很好了,有jbuilder,eclipse,netBeans等等,但是我认为如果java想超越.net,那么他首先要解决的就是IDE工具的整合。 |
|