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,
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
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 ?
>
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
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
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
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
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
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
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
>
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
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]
-
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'
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
.
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
-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
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
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
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
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
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
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
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
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
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.
|
-
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
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
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
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
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
> 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,
> >
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
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:
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
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
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
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
&
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
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
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
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
-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
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
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,
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.
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
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,
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
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
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
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.
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
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]
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(
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
> -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
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
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
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
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
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
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
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
63 matches
Mail list logo