When it comes to connection pools, it's the responsibility of each
pool to ensure that their connections are closed. iBATIS can't do
much in this regard. I suggest you enforce a manual shutdown policy
for your datasources, as simply shutting down a JVM (i.e. service)
won't cut it.
If you're using
Carl Brodeur wrote:
Would like to know how Ibatis releases or close its connections. I use
a JNDI datasource type (connection pool). I look at the debug trace,
see when connection are requested but not when they are released.
I have a similar problem. I am using sqlmaps only, and I'm gettin
Well, I we don't log any such information, so this would mostly have
to do with your DataSource implementation. It has little to do with
iBATIS.
We simply call DataSource.getConnection() and Connection.close().
No magic.
Clinton
On Thu, 6 Jan 2005 12:41:46 -0500, Carl Brodeur
<[EMAIL PROTECT
Depends on your configuration. First, i would suggest you read the
sqlmap and/or dao manual. Then, if you do not see the answer there go
ahead and post your dao and/or sqlmap configs along with a sample of
how you are calling the code.
Brandon
On Thu, 6 Jan 2005 12:41:46 -0500, Carl Brodeur
<[E
Hi:
Would like to know how Ibatis releases or close its connections. I use
a JNDI datasource type (connection pool). I look at the debug trace,
see when connection are requested but not when they are released.
Can someone help ?
If you're using SQL Maps 2.0, then here's what you want to do (in
order of importance):
1) Ensure you've specified a parameterMap or parameterClass attribute
on your statement.
2) Use an explicitly defined and DON'T allow remapping of
results (new 2.0.9 feature)
3) Use a JavaBean (not a Map or
Ok, I got it to work. I was mis-inturrpreting what those pages were
saying. Thanks for all the suggestions.
Gregg
-Original Message-
From: Bolinger, Gregg D [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 06, 2005 3:12 PM
To: ibatis-user-java@incubator.apache.org; Brandon Goodin
Subj
Basically I need to run a query similar to
SELECT i.*, u.* from t_issue i LEFT JOIN t_user u ON i.creating_user_id
= u.user_id WHERE i.issue_id = 20
And have Issue and User populated with their relavent properties.
Gregg
-Original Message-
From: Bolinger, Gregg D [mailto:[EMAIL PROTECT
I did read those pages. Over and over. And my very first example was
identical to what was on those pages. Those pages show that Category
has multiple columns in the Product table. I have 1 column in my Issue
table referring to User and I need to fill the entire User object.
Gregg
-Origina
You need to read page 25--26 of the SqlMaps Manual.
Brandon
On Thu, 6 Jan 2005 14:59:57 -0600, Bolinger, Gregg D
<[EMAIL PROTECTED]> wrote:
>
> But there aren't other columns for those properties. Let me explain...
> Here is some test code. T_user and t_issue are tables in a database.
> Below
But there aren't other columns for those properties. Let me explain...
Here is some test code. T_user and t_issue are tables in a database.
Below that are 2 java files. This is pseudo code and outlook keeps
correctly cap mistakes so don't poke fun at the bad syntax. :)
t_user
--
User_id
Fi
I assume you mean:
Well, would I map my other properties lke
Etc?
If so, is that the only way? If not, then could you explain what you
mean? Or maybe we are both misunderstanding each other. :)
Thanks.
Gregg
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]
Se
Am I reading this wrong? It looks to me like that is the only result
you have mapped to that bean. The others are all to the Issue bean.
Add other properties, and they will get mapped.
Larry
On Thu, 6 Jan 2005 13:49:24 -0600, Bolinger, Gregg D
<[EMAIL PROTECTED]> wrote:
> I have a JavaBean with
I have a JavaBean with several properties. Some of these properties are
other JavaBeans. Currently with the code I have I can load these
complex properties, however, it is only loading 1 property. Here is my
file(s)
bingo
On Thu, 6 Jan 2005 11:45:25 -0600, Bolinger, Gregg D
<[EMAIL PROTECTED]> wrote:
> Wait, it may have just hit me. Would it be something like...
>
> Insert into issues values (#workstation.id#, #hardware.id#)
>
> Where hardware and workstation have a getId() method?
Wait, it may have just hit me. Would it be something like...
Insert into issues values (#workstation.id#, #hardware.id#)
Where hardware and workstation have a getId() method?
Gregg
-Original Message-
From: Bolinger, Gregg D [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 06, 2005 1
Could you elaborate a little bit? I don't see anything in the online
docs that look similar to what you are suggesting. Maybe you could just
tell me what page in the online docs?
Gregg
-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 06, 2005 11:
same way - workstation.propertyName, or hardware.propertyName
On Thu, 6 Jan 2005 11:16:42 -0600, Bolinger, Gregg D
<[EMAIL PROTECTED]> wrote:
> So how do I map an insert to pull the ID from workstation and hardware to be
> inserted into the Issue table? Thanks
Reading the online docs I know how to map complex properties
for queries. But I couldn’t find any information about inserting
these complex properties. For example, I have a class called
Issues. Issues looks like:
public class Issues
{
private Workstation workstation;
privat
Hi all,
I have result-maps with more than 50 fields. The
big problem is the time of the first access. It may takes 10 to 15 seconds
witch is really long to get the result of a query. I know the result-map and
query get parsed at the first access. Is there a way to speed up the proces
Awesome. Thanks Nathan!
On Thu, 06 Jan 2005 09:34:47 -0700, Nathan Maves <[EMAIL PROTECTED]> wrote:
> I have found that I dont need any inline parameter. I just put up an
> example here
> http://wiki.apache.org/ibatis/
> How_20do_20I_20use_20a_20Custom_20Type_20Handler_20with_20complex_20prop
>
There is now a FAQ for iBATIS at Apache:
http://wiki.apache.org/ibatis/Frequently_20Asked_20Questions
Please consult it before posting, and if you have any additions, feel
free to add them!
Larry
I have found that I dont need any inline parameter. I just put up an
example here
http://wiki.apache.org/ibatis/
How_20do_20I_20use_20a_20Custom_20Type_20Handler_20with_20complex_20prop
erty_20_28Type_20Safe_20Enumeration_29
Nathan
On Jan 5, 2005, at 8:26 AM, Clasen, Scott wrote:
Is it poss
That might work, but why would you do that?
Cheers,
Clinton
On Wed, 5 Jan 2005 10:56:49 -0500, Clasen, Scott <[EMAIL PROTECTED]> wrote:
> Is it possible to use a type handler for a complex property?
>
> Something like this, where the query for the child List returns a list of
> strings, that I
Yep. #myColumn,typeHandlerCallback=someClassOrAlias#
Clinton
On Wed, 5 Jan 2005 10:26:22 -0500, Clasen, Scott <[EMAIL PROTECTED]> wrote:
> Is it possible to use a type handler in an inline parameter map? If so, what
> is the syntax?
>
> Thanks
> Scott C
>
> ===
David, thanks for the detailed post on this. I'll try to have a look
at it today.
Clinton
On Tue, 4 Jan 2005 21:38:45 -0600, David Putnam <[EMAIL PROTECTED]> wrote:
>
>
> I have loaded the source into my IDE and have walked through the storage of
> my null value.
>
> When I am in the Basic
As far as iBATIS goes, testing/mocking SqlMapClient is very easy.
Because it's an interface, you don't even really need a Mock
framework.
The problem you're seeing has more to do with Spring, and is a
question best asked of the Spring teamthat is: How do you mock
their SqlMapClientTemplate.
I'm not sure i explained myself correctly. I think that with some code
i'll explain myself better.
I have this simplified DAO:
public final class SqlMapUserDao extends SqlMapClientDaoSupport
implements UserDao
{
public User getUser(String username)
{
User user =
(User)getSqlMapClientT
Title: Incorrect usage of n+1 fix?
Thanks Michal.
Larry and I worked through this yesterday.
It's on the wiki now.
http://wiki.apache.org/ibatis/How_20do_20I_20get_20around_20the_20n_2b1_20selects_20problem_3f
In short, it was a namespace issue.
It was namespace aware but I didn't inc
Hugo Palma wrote:
I'm using Spring with iBATIS SqlMap.
I'm trying to test my DAOs with junit and easyMock.
All my DAOs extend
org.springframework.orm.ibatis.support.SqlMapClientDaoSupport, as
such, for doing a database operation i invoke method
getSqlMapClientTemplate()..
What seemed like an obv
can you post your mappings?
On Tue, 4 Jan 2005 21:38:45 -0600, David Putnam <[EMAIL PROTECTED]> wrote:
> When I am in the BasicParameterMap.setParameter method, the mapping has a
> jdbcType of 0 or Types.NULL, rather than a value of Types.DATE (91). Also
> because the DateTypeHandler does not exte
Title: Incorrect usage of n+1 fix?
Shouldn't groupBy="name"
be rather in the quarterMap? It is there, where the grouping
happens.
Michał Małecki
Following the threads on the mailing list archive I
tried to use the n+1 fix but I get the following from my query.
Below is the exception a
Title: Caused by: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported SQL type 0.
Ibatis support group,
I am getting this error message whenever I try to pass a null attribute to the database server. I believe this to be the case, because I can cause th
Title: RE: Caused by: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported SQL type 0.
I have loaded the source into my IDE and have walked through the storage of my null value.
When I am in the BasicParameterMap.setParameter method, the mapping has a jdb
Is it possible to use a type handler for a complex property?
Something like this, where the query for the child List returns a list of
strings, that I want to convert to "Child" objects?
select childValueString from child where parentId = #id#
Thanks
Scott C
=
Is it possible to use a type handler in an inline parameter map? If so, what
is the syntax?
Thanks
Scott C
==
This e-mail is intended only for the use of the addressees. Any copying,
forwarding, printing or other use of
I'm using Spring with iBATIS SqlMap.
I'm trying to test my DAOs with junit and easyMock.
All my DAOs extend
org.springframework.orm.ibatis.support.SqlMapClientDaoSupport, as such,
for doing a database operation i invoke method
getSqlMapClientTemplate()..
What seemed like an obvious way to test t
37 matches
Mail list logo