Thanks for the reply . But we are not using the EJB's ... We are using stored procedures and want a framework for calling this Sp's using JDBC.
Vikram Naik -----Original Message----- From: A mailing list for Enterprise JavaBeans development [mailto:[EMAIL PROTECTED]] On Behalf Of Jay Sent: Saturday, September 07, 2002 9:11 PM To: [EMAIL PROTECTED] Subject: Re: Need Design review > I have a class which is the only means to communicate with database. Because this an EJB mailing list, I assume the "class" is SLSB or you want to make it so. > 1) All the jdbc code is concentrated in one class, so there will be no mess > of connection obj management. Good for now, but watch out, as the class grows bigger, the developer may have to step on each other toes. > 2) Now the issue is how should I design the methods exposed. public modifier. Use Session Facade design patterns if needed. > 3) We are using weblogic connection pool and hence the handle to the pool a > datasource is stored as instance member and declared static EJBs are always against static modifiers due to the very nature of the EJB architecture. Making datasource static will not help any, since you are mapping the datasource to weblogic connection pool. Thus, datasource is only a psuedo pool with mapping to the actual connection pool. http://www.weblogic.com/docs51/classdocs/DataSource.html > 4) Can I make all the methods exposed static. EJB business method should not be static. "The method must not be declared as final or static." - from EJB specification (Section 7.10.4). > 5) Or I should pool the instance of the object. You don't need to do it, the App Server will do it, just make sure you set the value of <max-beans-in-free-pool> element to more than one in your ejb-jar.xml file. Hope it justifies your design request. Peace, Jay =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
