You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by john lee <sh...@yahoo.com> on 2009/04/08 03:38:44 UTC

how to initialize database connection pool in struts 2?

 
in structs 1, in APPLICATION/WEB-INF/web.xml, i have the following line
 
  <servlet>
        <servlet-name>DBInit</servlet-name>
        <servlet-class>neuco.db.DBInitServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
 
to initialize/launch default databse connection pool, how can i do this in struts 2 ?
 
 
tks in advance
 
john


      

RE: how to initialize database connection pool in struts 2?

Posted by Sidharth Bhatia <si...@gmail.com>.
You can also use struts 2 spring capability and have the connection given to
you through dependency injection.

Sid Bhatia
"Try not. Do...  or do not. There is no try" -- Yoda
_________________________
_ mailto:sidharth.bhatia1@gmail.com 


-----Original Message-----
From: Wes Wannemacher [mailto:wesw@wantii.com] 
Sent: Tuesday, April 07, 2009 11:29 PM
To: Struts Users Mailing List
Subject: Re: how to initialize database connection pool in struts 2?

On Tuesday 07 April 2009 21:38:44 john lee wrote:
> in structs 1, in APPLICATION/WEB-INF/web.xml, i have the following line
>  
>   <servlet>
>         <servlet-name>DBInit</servlet-name>
>         <servlet-class>neuco.db.DBInitServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>  
> to initialize/launch default databse connection pool, how can i do this in
> struts 2 ? 
>  
> tks in advance
>  
> john

Same way would work...

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to initialize database connection pool in struts 2?

Posted by Wes Wannemacher <we...@wantii.com>.
On Tuesday 07 April 2009 21:38:44 john lee wrote:
> in structs 1, in APPLICATION/WEB-INF/web.xml, i have the following line
>  
>   <servlet>
>         <servlet-name>DBInit</servlet-name>
>         <servlet-class>neuco.db.DBInitServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>  
> to initialize/launch default databse connection pool, how can i do this in
> struts 2 ? 
>  
> tks in advance
>  
> john

Same way would work...

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org