Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database connections: Tab libs, JBeans or EJBs? 1

Status
Not open for further replies.

multiplex77

Programmer
Dec 25, 2001
302
SG

I'm just starting out on J2EE application development so I've a very basic question. I've been doing reading on different methods of connecting and querying databases. Which is the recommended way of connecting to a database for a scalable, distributed application - using tag libraries, JavaBeans or EJBs?

Also can anyone recommend where I can download tag libs, javabeans or EJBs that connect to databases.

Thanks for your help!
 
Tag Libraries can contain one to many Java classes, therefore the difference between the contents of a Tab Library, JavaBeans and Enterprise Java Beans is minimal and is essentially that they expose the standard interface for their respective category. Beyond the interface it’s all basically the same.

To maximize scaling none of these is more or less efficient by their nature, rather they are differentiated by their environment. EJBs run in a J2EE Server that (should) provide database connection pooling which is the primary consideration for scaling database IO in a web server environment.

Therefore, depending on your application server, EJBs should scale better.

The best place to start looking for free Java components is Apache.org. To connect to your specific database you need a JDBC driver for it. Look on your vendors web site or documentation for information regarding a driver. Once you have a driver you can write your own EJBs that use the driver to access the database.


-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top