This is exactly how I've always done the DAO in Struts. I'm looking
into Hibernate now, but don't yet see it's value over the POJ J2EE
way.
buddy
On 7/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I suggest not involving Struts at all when it comes to configuration of and
> access to dat
I suggest not involving Struts at all when it comes to configuration of and
access to data stores.
Write a ConnectionManager (sounds like you've already got that idea), who will
be in charge of Connections. In the ConnectionManager's init block or
constructor, look up your DataSource using a JN
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
thank you for answering so fast.
i knew there were this object but i don't find how to use it.
i've tried : DataSource aDataSource = (DataSource)
dataSources.entrySet().iterator().next();
but it doesn't work.
Martin Gainty a écrit :
should be identified as DataSources within your ActionServlet
should be identified as DataSources 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: Dat
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
Scott,
1) I hope the code you showed is sitting inside a DAO, not your Action.
2) It looks much messier because you are not using something like a
ServiceLocator Pattern. Look up and cache the reference to your DataSource
there. It's cleaner and way faster than doing it every time in your DAO.
3)
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.
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]
Manisha Sathe wrote:
Hi all,
This is to give big thanks to all.
Erik - i will go thr it - i think i need some some time to grasp it.
You are welcome. Please note that there are many good patterns or idioms
for this sort of thing -- check as many out as you can, including
frameworks like iBa
Hi all,
This is to give big thanks to all.
Erik - i will go thr it - i think i need some some time to grasp it.
Regards and Have a nice day,
Manisha
Erik Weber <[EMAIL PROTECTED]> wrote:
Manisha Sathe wrote:
>I am still new to struts and even servlets. Last time when i developed
>servle
> -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 time when i
> developed s
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
Manisha Sathe wrote:
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.
That's the way I do it, with or without S
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
oh, so mean to say automatically i get connection pool - In my servlet i am
using (at least currently) normal JDBC call - which i was thinking how i can
convert in to connection pool as i heard of it a lot !!! .
ok, then can i use struts database method in any class ? or is it restricted to
o
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, Janua
40 matches
Mail list logo