You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Carl Brodeur <ca...@modelio.com> on 2003/03/26 16:25:14 UTC

Connection to database

I am using Tomcat 4.1.  I want to create a login form with database 
authentication.  What is the best way to integrate database 
connections with Tapestry ?  What about connection pools ?
 
Cheers,
Carl

RE: Connection to database

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Tapestry is extremely agnostic about anything not directly part of the
presentation layer.  If it looks like a JavaBean, Tapestry will play with
it.

I believe there are connection pool implementations available as part of
Jakarta commons.

It is very simple to wrap such a pool as an application extension.
Application extensions are a kind of singleton that you define in your
application specification.  You can then add methods to your engine to
access the connection pool.

Alternately, you can use an application server such as JBoss, Resin or
WebLogic. These will use JNDI to give you access to the connection pool and,
again, the engine is a good place to put the logic that performs the JNDI
lookup.

The Virtual Library example applciation does the whole multi-tier approach;
there's JNDI lookups in the engine and visit objects to session beans.  I'm
"tuning up" the Vlib right now ... I actually run Jetty in the presentation
layer, and the session and entity beans run in a separate JBoss process,
using JNDI and RMI to connect up the two layers.  This is actually a very
cool use of all that J2EE baggage.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Carl Brodeur [mailto:carl.brodeur@modelio.com] 
> Sent: Wednesday, March 26, 2003 10:25 AM
> To: tapestry-user@jakarta.apache.org
> Subject: Connection to database
> 
> 
> I am using Tomcat 4.1.  I want to create a login form with database 
> authentication.  What is the best way to integrate database 
> connections with Tapestry ?  What about connection pools ?
>  
> Cheers,
> Carl
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>