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

2009-04-07 Thread john lee
Could you tel me in detail/example?   tks in advance   john --- On Tue, 4/7/09, Sidharth Bhatia wrote: From: Sidharth Bhatia Subject: RE: how to initialize database connection pool in struts 2? To: "'Struts Users Mailing List'" , w...@wantii.com Date: Tuesday, April 7,

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

2009-04-07 Thread Sidharth Bhatia
annemacher [mailto:w...@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 f

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

2009-04-07 Thread Wes Wannemacher
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 > > > DBInit > neuco.db.DBInitServlet > 1 > > > to initialize/launch default databse connection pool, how can i do this in > struts 2 ? >

how to initialize database connection pool in struts 2?

2009-04-07 Thread john lee
  in structs 1, in APPLICATION/WEB-INF/web.xml, i have the following line         DBInit     neuco.db.DBInitServlet     1       to initialize/launch default databse connection pool, how can i do this in struts 2 ?     tks in advance   john

Re: Struts 2 & Database Connection Pooling

2008-08-20 Thread Gabriel Belingueres
AFAIK, there is no pattern. You can configure a datasource through Spring, or you could get it from JNDI once when your app starts (by writing a ServletContextListener) 2008/8/20, Roger <[EMAIL PROTECTED]>: > I need to implement a database connection pool and was considering using t

Struts 2 & Database Connection Pooling

2008-08-20 Thread Roger
I need to implement a database connection pool and was considering using the JNDI facilities provided by the servlet container (in my case, Apache Tomcat). Is there a Struts "pattern" for accessing JNDI resources in (a) a container neutral manner and (b) without tying my action clas

Re: Spam:: getting error when i m trying to make database connection

2007-05-08 Thread Musachy Barroso
No Class Definition Found Error, where the class is org.apache.commons.pool.impl.GenericObjectPool, you are probably missing commons pool, http://jakarta.apache.org/commons/pool/ musachy On 5/8/07, Shshir <[EMAIL PROTECTED]> wrote: org.apache.catalina.core.StandardContext loadOnStartup SEVER

Spam:: getting error when i m trying to make database connection

2007-05-07 Thread Shshir
org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /registration threw load() exception java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool - To unsubscribe, e-mail: [EMAIL PROTECT

Re: [Shale] When to create a database Connection?

2006-03-30 Thread Alexandre Poitras
if you want to use the > jdbc api directly. > > > Gary > > > > -Original Message- > > From: James Reynolds [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, March 29, 2006 10:33 AM > > To: Struts Users Mailing List > > Subject: [Shale] When to create a

RE: [Shale] When to create a database Connection?

2006-03-29 Thread Gary VanMatre
nesday, March 29, 2006 10:33 AM > To: Struts Users Mailing List > Subject: [Shale] When to create a database Connection? > > > I'm getting a null pointer error in my backing bean. My grand plan was > to create a Connection in the init() method extended from the >

SV: [Shale] When to create a database Connection?

2006-03-29 Thread Hermod Opstvedt
g- Fra: Yee, Richard K CTR DMDC [mailto:[EMAIL PROTECTED] Sendt: 29. mars 2006 22:34 Til: 'Struts Users Mailing List' Emne: RE: [Shale] When to create a database Connection? Check out iBATIS. You can use the DaoManager for a very lightweight framework. It will handle getting and cl

[OT] Re: [Shale] When to create a database Connection?

2006-03-29 Thread Dave Newton
Yee, Richard K CTR DMDC wrote: > [...] Hey... We might need a cruise missile or two; what do you think? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: [Shale] When to create a database Connection?

2006-03-29 Thread Yee, Richard K CTR DMDC
- From: James Reynolds [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 11:16 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: [Shale] When to create a database Connection? Hi Hermod, Here's my reason I'm under pressure to get this project complete so I'

SV: [Shale] When to create a database Connection?

2006-03-29 Thread Hermod Opstvedt
ld be able to grasp this, at least at a basic level fairly quick. Hermod -Opprinnelig melding- Fra: James Reynolds [mailto:[EMAIL PROTECTED] Sendt: 29. mars 2006 21:16 Til: Struts Users Mailing List; [EMAIL PROTECTED] Emne: RE: [Shale] When to create a database Connection? Hi Hermod, H

RE: [Shale] When to create a database Connection?

2006-03-29 Thread James Reynolds
. Maybe my assumption is invalid, how challenging are these technologies for new comers? Thanks -Original Message- From: Hermod Opstvedt [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 11:45 AM To: 'Struts Users Mailing List' Subject: SV: [Shale] When to create a databas

SV: [Shale] When to create a database Connection?

2006-03-29 Thread Hermod Opstvedt
-Opprinnelig melding- Fra: James Reynolds [mailto:[EMAIL PROTECTED] Sendt: 29. mars 2006 19:33 Til: Struts Users Mailing List Emne: [Shale] When to create a database Connection? I'm getting a null pointer error in my backing bean. My grand plan was to create a Connection in the init() m

RE: [Shale] When to create a database Connection?

2006-03-29 Thread James Reynolds
Never mind, I mis-spelled the bean name in the Faces-Config. Oh the shame :( -Original Message- From: James Reynolds [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 10:33 AM To: Struts Users Mailing List Subject: [Shale] When to create a database Connection? I'm gett

[Shale] When to create a database Connection?

2006-03-29 Thread James Reynolds
I'm getting a null pointer error in my backing bean. My grand plan was to create a Connection in the init() method extended from the AbstractViewController, so it can be used by any number of methods and getters in my bean, and then close it in destroy(). In this simple case, the only place this

Re: Database Connection

2005-07-08 Thread Access Denied
n null; > } > > You probably already know all this, it's the same old fashioned J2EE way . . . > > Erik > > > -Original Message- > From: Vijay K Anand <[EMAIL PROTECTED]> > Sent: Jul 8, 2005 3:47 AM > To: Struts Users Mailing List > Sub

Re: Database Connection

2005-07-08 Thread erikweber
d fashioned J2EE way . . . Erik -Original Message- From: Vijay K Anand <[EMAIL PROTECTED]> Sent: Jul 8, 2005 3:47 AM To: Struts Users Mailing List Subject: Database Connection Hi All I have a helper class which does creating connection and exception handling for that . How do i creat

Database Connection

2005-07-08 Thread Vijay K Anand
Hi All I have a helper class which does creating connection and exception handling for that . How do i create connection like DataSource dataSource = (DataSource)context.getAttribute(Action.DATA_SOURCE_KEY) ; objConnection = datasource.getConnection(); it says error at context and Ac

Re: DataBase connection

2005-05-27 Thread Martin Gainty
Struts How to located at http://linux.com.hk/docs/struts/faqs/database.html Martin- 001-617-852-7822 - Original Message - From: "Thibaut L." <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Friday, May 27, 2005 8:25 AM Subject: Re: DataBase connection

Re: DataBase connection

2005-05-27 Thread Thibaut L.
ces within your ActionServlet take a look at http://struts.apache.org/api/org/apache/struts/action/ActionServlet.html#dataSources HTH, Martin- - Original Message - From: "Thibaut L." <[EMAIL PROTECTED]> To: Sent: Friday, May 27, 2005 7:49 AM Subject: DataBase connection hi, i

Re: DataBase connection

2005-05-27 Thread Martin Gainty
7:49 AM Subject: DataBase connection hi, i'd like to access mysql from the my own controller init method. I usually do : |dataSource = getDataSource(request); myConnection = dataSource.getConnection(); but i have no request object in my init metho

DataBase connection

2005-05-27 Thread Thibaut L.
hi, i'd like to access mysql from the my own controller init method. I usually do : |dataSource = getDataSource(request); myConnection = dataSource.getConnection(); but i have no request object in my init method. Any idea ? thanks. | -

Re: Database Connection Workflow Question

2005-01-28 Thread Larry Meadors
Heheh, you two are about to end up on my "straight-to-the-trash-bin" filter. Quit your whining, and start writing code. :-) ...and have a great weekend. On Fri, 28 Jan 2005 17:16:00 -0600, Eddie Bush <[EMAIL PROTECTED]> wrote: > http://jakarta.apache.org/site/mail.html > > Most everyone was li

Re: Database Connection Workflow Question

2005-01-28 Thread Eddie Bush
http://jakarta.apache.org/site/mail.html Most everyone was likely routed through this when they found the list to sign-up. Note the section entitled "keep your email short and to the point." Also "Ask Smart Questions" is good. I should have thought to mention that before. -- Eddie Bush On Fr

Re: Database Connection Workflow Question

2005-01-28 Thread Dakota Jack
Eddie, You are not believeable when you accept 668 kilobytes of gunk without complaint over and over and complain about 10 kilobytes of code which the person asking the question found very helpful. Your objections are pure baloney. This is personal merely and that is obvious. Anyone truly int

Re: Database Connection Workflow Question

2005-01-28 Thread Eddie Bush
I didn't notice that (G-Mail sometimes folds prior responses), but it's a good example of where we could trim messages. Footers are another one. The server is going to add the subscribe/unsubscribe information to every message - it's beyond pointless to carry this information through in repli

Re: Database Connection Workflow Question

2005-01-28 Thread Dakota Jack
I just did a study of a thread on this list, Eddie, which is called "PlugIn and the base URL". You will recognize that thread because you posted to it without complaint and had a disagreement with me about relations between intranets and the Internet. This thread had a total of 82 posts and a siz

Re: Database Connection Workflow Question

2005-01-28 Thread Dakota Jack
> Yaakov. > > > > -Original Message- > > From: Eddie Bush [mailto:[EMAIL PROTECTED] > > Sent: Friday, January 28, 2005 3:32 PM > > To: Struts Users Mailing List > > > > Subject: Re: Database Connection Workflow Question > > > > Jack, > >

Re: Database Connection Workflow Question

2005-01-28 Thread Dakota Jack
Eddie, If you want to get together with other committers and enforce your own judgment on these matters, please be my guest, Eddie. As things stand, I differ with you on how to approach this and as far as I can tell quite a few others disagree with you on this too. I am following my best judgmen

Re: Database Connection Workflow Question

2005-01-28 Thread Eddie Bush
x27;t use JNDI to get a reference to the > DataSource. I was simply saying that you should do it only once, not every > time you need it. > > Yaakov. > > -Original Message- > From: Eddie Bush [mailto:[EMAIL PROTECTED] > Sent: Friday, January 28, 2005 3:32 PM > To:

RE: Database Connection Workflow Question

2005-01-28 Thread Chaikin, Yaakov Y.
ie Bush [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 3:32 PM To: Struts Users Mailing List Subject: Re: Database Connection Workflow Question Jack, Would you *please* post URLs instead of full source? I know you have publicly-hittable space of your own ... So far as how to acqui

Re: Database Connection Workflow Question

2005-01-28 Thread Eddie Bush
Jack, Would you *please* post URLs instead of full source? I know you have publicly-hittable space of your own ... So far as how to acquire a DataSource/Connection goes, JNDI is a fantastic tool for allowing your persistence layer acquire a DataSource instance in a *standard* fashion. Standards

Re: Database Connection Workflow Question

2005-01-28 Thread Dakota Jack
On Fri, 28 Jan 2005 08:46:30 -0600, Scott Purcell <[EMAIL PROTECTED]> wrote: > Hello, > > I am running Tomcat struts. I am beginning a new project using the struts > technologies and have a question in regards to handling connections. > > First off, just to give you some background, older proje

Re: Database Connection Workflow Question

2005-01-28 Thread Eddie Bush
if" there. Sounded kinda rude without it. Sorry. > > -Original Message- > From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED] > Sent: Friday, January 28, 2005 12:29 PM > To: 'Struts Users Mailing List' > > Subject: RE: Database Connection Workflow Question &

RE: Database Connection Workflow Question

2005-01-28 Thread Chaikin, Yaakov Y.
Whoops! I missed an "if" there. Sounded kinda rude without it. Sorry. -Original Message- From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 12:29 PM To: 'Struts Users Mailing List' Subject: RE: Database Connection Workflow Question

RE: Database Connection Workflow Question

2005-01-28 Thread Chaikin, Yaakov Y.
anuary 28, 2005 12:24 PM To: Struts Users Mailing List Subject: Re: Database Connection Workflow Question Ok, ok, you convinced me :-P I still want to run some time trials in my environment. On Fri, 28 Jan 2005 12:16:27 -0500, Chaikin, Yaakov Y. <[EMAIL PROTECTED]> wrote: > Quote from th

Re: Database Connection Workflow Question

2005-01-28 Thread Eddie Bush
Ok, ok, you convinced me :-P I still want to run some time trials in my environment. On Fri, 28 Jan 2005 12:16:27 -0500, Chaikin, Yaakov Y. <[EMAIL PROTECTED]> wrote: > Quote from the ServiceLocator Pattern about performance and JNDI: > > Initial context creation and service object lookups, if f

Re: Database Connection Workflow Question

2005-01-28 Thread Eddie Bush
in-line On Fri, 28 Jan 2005 12:13:16 -0500, Chaikin, Yaakov Y. <[EMAIL PROTECTED]> wrote: > Eddie, > > How long it takes to look up things through JNDI? Lng is the answer. > That's even if your JNDI is sitting on the same machine as your servlet/EJB > container. But if it's a distributed

RE: Database Connection Workflow Question

2005-01-28 Thread Chaikin, Yaakov Y.
-Original Message- From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 12:13 PM To: 'Struts Users Mailing List' Subject: RE: Database Connection Workflow Question Eddie, How long it takes to look up things through JNDI? Lng is the answer. T

RE: Database Connection Workflow Question

2005-01-28 Thread Chaikin, Yaakov Y.
to take care of this one situation where you would change the data source on the fly. That's my understanding of the issue... Yaakov. -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 11:56 AM To: Struts Users Mailing List; Larry Meadors Subject: Re

RE: Database Connection Workflow Question

2005-01-28 Thread Chaikin, Yaakov Y.
Sent: Friday, January 28, 2005 11:29 AM To: Struts Users Mailing List Subject: RE: Database Connection Workflow Question Yes, This is what I want to do. I am just getting underway with this new project, and am looking for a solution to handle this. I have read the full O'Reilly struts book,

Re: Database Connection Workflow Question

2005-01-28 Thread Eddie Bush
I wouldn't even store the DataSource. You may wish to have multiple DataSource instances you wish to use in a given project. I have Business Objects that extends a "BaseBO" object, which are generated by a factory (the factory reads an XML file using digester). My DAOs are generated similarly.

RE: Database Connection Workflow Question

2005-01-28 Thread Chaikin, Yaakov Y.
ks, Yaakov. -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 11:24 AM To: Struts Users Mailing List Subject: Re: Database Connection Workflow Question On Fri, 28 Jan 2005 11:09:41 -0500, Chaikin, Yaakov Y. wrote: > 1) I hope the code you show

RE: Database Connection Workflow Question

2005-01-28 Thread Scott Purcell
icles for me to review, or comment, please let me know, Sincerely Scott -Original Message- From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 10:10 AM To: 'Struts Users Mailing List' Subject: RE: Database Connection Workflow Question Scott,

Re: Database Connection Workflow Question

2005-01-28 Thread Larry Meadors
On Fri, 28 Jan 2005 11:09:41 -0500, Chaikin, Yaakov Y. wrote: > 1) I hope the code you showed is sitting inside a DAO, not your Action. Heheh, me too. ;-) > 2) It looks much messier because you are not using something like a > ServiceLocator Pattern. Look up and cache the reference to your DataSo

RE: Database Connection Workflow Question

2005-01-28 Thread Chaikin, Yaakov Y.
very efficient and clean way. HTH, Yaakov. -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 9:47 AM To: user@struts.apache.org Subject: Database Connection Workflow Question Hello, I am running Tomcat struts. I am beginning a new project usin

Re: Database Connection Workflow Question

2005-01-28 Thread Larry Meadors
Rick has some GREAT struts stuff here: http://reumann.net/struts/ibatisLesson1.do He talks about using a DAO pattern, and getting that connection type of stuff (as well as other JDBC specific stuff) out of your application code. Larry On Fri, 28 Jan 2005 08:46:30 -0600, Scott Purcell <[EMAIL P

Re: Database Connection Workflow Question

2005-01-28 Thread Alex Kravets
I think you can still use your DAO classes in Struts. In my application, which was not written in Struts I use DAOs written as Singleton, Factory DP everywhere, I guess in Struts you can call your DAOs from Action Class to access database. Scott Purcell wrote: Hello, I am running Tomcat struts.

Database Connection Workflow Question

2005-01-28 Thread Scott Purcell
Hello, I am running Tomcat struts. I am beginning a new project using the struts technologies and have a question in regards to handling connections. First off, just to give you some background, older projects I worked on had a singleton class that handed me database connections. So when I ne

Re: Re: Database connection question - seeking expert opinion

2005-01-13 Thread sales
Kindly send all your messages to [EMAIL PROTECTED] This mail account is not functioning anymore. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Database connection question - seeking expert opinion

2005-01-13 Thread Erik Weber
ing ConnectionManager). Also, it's important to clean up connections properly, if you are using a DataSource that pools connections. Use this idiom or similar: Connection c = null; PreparedStatement p = null; ResultSet r = null; ArrayList items = new ArrayList(

Re: Database connection question - seeking expert opinion

2005-01-12 Thread Manisha Sathe
ResultSet r = null; ArrayList items = new ArrayList(); try { c = ConnectionManager.getConnection(); if (c == null) throw new SystemException("no database connection available"); String sql = SQLManager.getSQL(SQLManager.GUMMY_BEAR_FLAVORS_SELECT); p = c.prepareStatement(sql); r = p.ex

RE: Database connection question - seeking expert opinion

2005-01-12 Thread Jim Barrows
> -Original Message- > From: Manisha Sathe [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 11, 2005 11:10 PM > To: user@struts.apache.org > Subject: Database connection question - seeking expert opinion > > > I am still new to struts and even servlets. Last

Re: Database connection question - seeking expert opinion

2005-01-12 Thread Larry Meadors
Why not use something like iBATIS to eliminate the need for connection management? Here is a tutorial on using struts with iBATIS: http://www.reumann.net/struts/ibatisLesson1.do Larry On Tue, 11 Jan 2005 22:10:20 -0800 (PST), <[EMAIL PROTECTED]> wrote: > I am still new to struts and even servl

Re: Database connection question - seeking expert opinion

2005-01-12 Thread Erik Weber
rtant to clean up connections properly, if you are using a DataSource that pools connections. Use this idiom or similar: Connection c = null; PreparedStatement p = null; ResultSet r = null; ArrayList items = new ArrayList(); try { c = ConnectionManager.getConnection(); if (c == null) throw new System

RE: Database connection question - seeking expert opinion

2005-01-12 Thread Amit Gupta
tainn -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 2:56 PM To: Struts Users Mailing List Subject: RE: Database connection question - seeking expert opinion oh, so mean to say automatically i get connection pool - In my servlet i am usin

RE: Database connection question - seeking expert opinion

2005-01-12 Thread Manisha Sathe
only Action class ? Can i develop some sort of common class to get the connection ? regards Manisha Amit Gupta <[EMAIL PROTECTED]> wrote: Hi Manisha, Struts database method uses DBCP. It offer database connection pooling. So I think struts db method is better Amit Gupta Mobi

RE: Database connection question - seeking expert opinion

2005-01-11 Thread Amit Gupta
Hi Manisha, Struts database method uses DBCP. It offer database connection pooling. So I think struts db method is better Amit Gupta Mobile: 91-9891062552 Yahoo IM: amitguptainn MSN IM : amitguptainn -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Wednesday

Database connection question - seeking expert opinion

2005-01-11 Thread Manisha Sathe
I am still new to struts and even servlets. Last time when i developed servlets, i created one common class method to get the connection (with regular JDBC call). All database related parameters i stored in a constant variable file. Now in struts i found out that we can specify the datasource

Storing encrypted passwords for database connection

2004-04-13 Thread Ramil Mirhasanov
In my project I want to encrypt database users' passwords. They can be stored in .properties file or deployment descriptor, maybe. Are there any suggestions how to implement this task? Are there some mechanisms in struts framework that support the encrypted storage of passwords? Thank you in advan