Just an FYI:
DBCP and most app server pools also support validation/ping queries.
ClintonOn 6/29/05, Meindert <[EMAIL PROTECTED]> wrote:
Ok, sorry I didn't look very well.
The answer is in the back of the manual:
SimpleDataSource
Property Name: Pool.PingQuery
The pin
Thanks for the response Clinton.
Since the last post, I have implemented my system using the
queryForList() and am managing my pages using an index & offset.
Take care.
Aladin
Clinton Begin wrote:
Hi Aladin,
PaginatedList is meant for simple systems that have the luxury of
keeping a page
Commons logging is supported. with log4j, you simply use:
java.sql=DEBUG
com.ibatis=DEBUG
and you should get the appropriate SQL statements, results and parameters.
PS: In 2.1.5 the dependency on commons logging will be removed...CL
will still be supported, but so will L4J and JDK14 without
co
Can you post the exception?
On 6/29/05, Folashade Adeyosoye <[EMAIL PROTECTED]> wrote:
This works fine, the problem is it throws an exception at the very lastrecord that it tries to put in the Map.What list are you referring to?-Original Message-From: Larry Meadors [mailto:
[EMAIL PROTECT
Unfortunately you're going to have to look here for your problem:
com.sun.enterprise.resource.JdbcAllocator.(JdbcAllocator.java:58)
It looks like the last thing iBATIS does is
DataSource.getConnection(). After that, it's all up to Sun's app
server. They just open sourced it, so you might be ab
It looks rightbut this is the second time this has been reported in
recent months. We have about 6 unit tests just to verify cache
flushing on execution, so I'm not sure what it could be. Any
chance you could debug using the ibatis source code, so you could step
through the cache model? (put
Hi Aladin,
PaginatedList is meant for simple systems that have the luxury of
keeping a page of data around in memory. In a high performance
system that needs to scale, keeping even a page of records in memory is
a bad idea...regardless of PaginatedList. Even 25 records per
page could be devastat
To add some closure to this:
after much pain and suffering, reinstalling everything involved,
checking the 'net for info (there were stories about 127.0.0.1 being
removed from the routing table, and a 1.4.2 java version causing the
problem), I went for the last resort and (ugh) reinstalled windows.
The insert would definitely update the cache in that scenario.
Brandon
On 6/29/05, Daniel Henrique Ferreira e Silva <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I may be saying something really stupid, so, please, be cool with me! ;-)
>
> Based on what Brandon stated i have one question:
>
> How w
I understand what you are saying. But, it may not be desireable to
express equality the same across your whole application or across all
caches. A hashcode allows you to define only one way for that objects
equality to be checked. I've never been a fan of messing around with
hashcodes and equals be
http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+use+LIKE+in+my+queries%3F
On 6/29/05, Rao, Satish <[EMAIL PROTECTED]> wrote:
>
>
> I have the following entry in my sqlmap:
>
> resultMap="list-users-result" cacheModel="user-cache">
>
> SELECT
>
This works fine, the problem is it throws an exception at the very last
record that it tries to put in the Map.
What list are you referring to?
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 29, 2005 4:02 PM
To: user-java@ibatis.apache.org
Subject
Good grief, why are you reinventing the wheel?
I guess you can iterate through the list, then iterate through the
maps in the list, examining the types of the entries, escaping the
strings/numbers/dates, etc into a text file...but man, that sure seems
like a ton of work.
Larry
On 6/29/05, Folas
Hi all,
I the last couple of days I have been spinning my wheel on
this….
My parameterObject are table names and I can get it to
execute
JAVA
Map hash = new HashMap();
hash =
(Map)super.getObject("systemDatabaseBackup", parameterObject);
SQLMAP
SELECT * FR
Makes good sense...
The approach I took on the last project (which was not very good) and which
involved Struts was to use "intelligent", heavy-weight domain objects. We did
not have a DAO layer, instead the domain objects talked to the database
directly. Not separating the data access into a
Hi Satish,
I don't know if there is a way in iBatis to do this. But you can use p6spy to
monitor the sql
generated. It is very simple to setup.
Rgds
Prashanth.
--- "Rao, Satish" <[EMAIL PROTECTED]> wrote:
> I am using dynamic SQL and wanted to know if there is a way to print the
> generated
Test
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 29, 2005 1:27 PM
To: user-java@ibatis.apache.org
Subject: Replies going to individuals again?
Why are replies to the list going only to the poster, instead of the list?
Is this just me?
Larry
Hmm..looks like the last few posts from me are in the list...but Outlook
includes the poster by default in the reply...I'm a bit new to the lists - is
it bad etiquette to include the poster? I'll make sure it's removed if so...
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTE
Heh, after sending it, I thouhght "Yuk, what a crappy idea" and
smacked m'self on the forehead for suggesting it. That is what i get
for coding in C#.
My general pattern in Java is to make my "domain objects" very
lightweight - more like simple data transfer objects, with no
awareness of the servi
Thanks for the response.
That is an interesting idea. I haven't played much with the caching mechanism.
I'll give it a try. One unrelated question - do lazy-loaded objects check the
cache before going to the db?
At first, I didn't really want the domain-service interaction - I guess I was
t
Could you just have your user object delegate the retrieval of the
list to the service object (instead of storing it internally) and rely
on caching instead of lazy loading?
If an update occurs, the cache gets flushed, and the next call to get
the list gets fresh data.
Larry
On 6/29/05, Mike Fo
Is there any way in
IBATIS to mark an object that was lazy-loaded as "unloaded" so that the object
will be reloaded again? I'm thinking about the following
scenario:
Domain
Objects:
User contains Role
objects (a List)
Sevice
Object:
UserService.removeUserRole(User u, String ro
Hey,
Firstly sorry about the long email.
I have been working happily with iBatis for some time until now :( I
have been tasked with connecting to a database (Informix) that I have
very little or limited visibility. The table and the selects I have to
do are very straight forward however I can
Why the need for the identity-properties? There can only be one
paramter, right? So if the parameter is a primative, testing for
equality is easy. If it is an object, you have to make sure the
object implements hashCode/equals. I think that is a reasonable
requirement, hibernate requires that.
The 3rd parameter is the getXXX method to use as the Map key when put(Object
key, Object value) is called...
E.G.
String userId = "BILL";
Map roles = sqlMapClient.QueryForMap("getUserRoles", userId, "roleCode")
This will create a HashMap containing all the roles for BILL, which are
represente
Sorry, I just have been more concise:
I'm not talking about simple key-value maps that represent a row in a table. I
need to create a Map of objects, not a List of objects. I typically represent
associations using a Map, that way I can easily find/remove objects using the
key.
As an example,
What is the 3rd parameter (keyProperty) used for
QueryForMap(string statementName, object parameterObject, string
keyProperty)
Shardayyy
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 29, 2005 10:39 AM
To: user-java@ibatis.apache.org
Subject: Re:
True.
That would mean that either null objects could not be cached, or
inserts would have to also update the cache.
Larry
On 6/29/05, Daniel Henrique Ferreira e Silva <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I may be saying something really stupid, so, please, be cool with me! ;-)
>
> Based o
Yes, there is.
On 6/29/05, Mike Fotiou <[EMAIL PROTECTED]> wrote:
>
> Is there any way in IBATIS to create a Map via the XML file instead of a
> List/Collection? This is possible programmatically using queryForMap. If
> not, would it be useful in a future version of IBATIS?
Hi all,
I may be saying something really stupid, so, please, be cool with me! ;-)
Based on what Brandon stated i have one question:
How would that work for inserts? When you update or delete an object,
its identity is kept. But insert is supposed to be used for 'new'
objects, so i guess it shoul
Is there any way in
IBATIS to create a Map via the XML file instead of a List/Collection? This
is possible programmatically using queryForMap. If not, would it be useful
in a future version of IBATIS?
Sorted it out.
I put a SET NOCOUNT ON in the beginning of the stored procedure, which
prevents the number of rows affected by a Transact-SQL statement from
being returned as part of the results.
Cheers
Bing
On 6/28/05, Bing Qiao <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> Another stored procedu
Title: RE: No operations allowed after connection closed.
Ok, sorry I didn’t look very well.
The answer is in the back of the manual:
SimpleDataSource
Property Name: Pool.PingQuery
The ping query will be run against the database to test the connection
From: Meindert
[mailto
Title: RE: No operations allowed after connection closed.
I have replaced my JDBC driver but am still
having the same problem.
Looked a bit around on google and got the
following tip:
>We solved this same problem by doing essentially what
Mark advises
>below.
>We set the wait_timeout