You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(55) |
Mar
(100) |
Apr
(203) |
May
(330) |
Jun
(190) |
Jul
(302) |
Aug
(323) |
Sep
(197) |
Oct
(245) |
Nov
(490) |
Dec
(330) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(194) |
Feb
(400) |
Mar
(416) |
Apr
(415) |
May
(359) |
Jun
(381) |
Jul
(491) |
Aug
(311) |
Sep
(291) |
Oct
(273) |
Nov
(355) |
Dec
(266) |
| 2005 |
Jan
(306) |
Feb
(303) |
Mar
(520) |
Apr
(346) |
May
(255) |
Jun
(221) |
Jul
(171) |
Aug
(247) |
Sep
(147) |
Oct
(125) |
Nov
(165) |
Dec
(65) |
| 2006 |
Jan
(90) |
Feb
(53) |
Mar
(121) |
Apr
(103) |
May
(113) |
Jun
(103) |
Jul
(104) |
Aug
(67) |
Sep
(78) |
Oct
(82) |
Nov
(78) |
Dec
(70) |
| 2007 |
Jan
(77) |
Feb
(76) |
Mar
(63) |
Apr
(30) |
May
(47) |
Jun
(41) |
Jul
(44) |
Aug
(44) |
Sep
(49) |
Oct
(33) |
Nov
(25) |
Dec
(21) |
| 2008 |
Jan
(45) |
Feb
(13) |
Mar
(15) |
Apr
(12) |
May
(9) |
Jun
(33) |
Jul
(30) |
Aug
(7) |
Sep
(20) |
Oct
(17) |
Nov
(20) |
Dec
(10) |
| 2009 |
Jan
(8) |
Feb
(5) |
Mar
(12) |
Apr
(17) |
May
(19) |
Jun
(97) |
Jul
(77) |
Aug
(33) |
Sep
(24) |
Oct
(41) |
Nov
(16) |
Dec
(32) |
| 2010 |
Jan
(24) |
Feb
(14) |
Mar
(50) |
Apr
(71) |
May
(70) |
Jun
(64) |
Jul
(45) |
Aug
(62) |
Sep
(32) |
Oct
(4) |
Nov
(12) |
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(1) |
Jul
(4) |
Aug
(3) |
Sep
(4) |
Oct
(6) |
Nov
(3) |
Dec
(3) |
| 2012 |
Jan
(4) |
Feb
(8) |
Mar
(6) |
Apr
(10) |
May
(2) |
Jun
(3) |
Jul
(11) |
Aug
(10) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
(9) |
Apr
(1) |
May
(8) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(10) |
Dec
(8) |
| 2014 |
Jan
(3) |
Feb
(12) |
Mar
(9) |
Apr
(12) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(2) |
| 2015 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(9) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(7) |
Oct
(9) |
Nov
(7) |
Dec
(9) |
| 2016 |
Jan
(7) |
Feb
(5) |
Mar
(5) |
Apr
(5) |
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
(6) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
| 2017 |
Jan
(7) |
Feb
(8) |
Mar
(7) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(5) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jue...@we...> - 2004-05-29 23:07:33
|
Repeated complaints that there were no default editors for = java.lang.Boolean, java.lang.Integer etc prompted that change. What we = register by default now are standard instances of CustomBooleanEditor = and CustomNumberEditor; in the latter case, using = Integer.parseInt/toString and co rather than a NumberFormat instance. =20 Of course, those defaults can still be overridden by the usual = registerCustomEditor calls, typically with custom instances of = CustomBooleanEditor and CustomNumberEditor. What makes those editors = "custom" is that they're configurable, in contrast to most other = PropertyEditors. We just provide default instances of them now, but = still allow for registering customized instances. =20 All things considered, that change should be completely = backward-compatible. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Seth Ladd Gesendet: Fr 28.05.2004 19:54 An: spr...@li... Betreff: Re: [Springframework-developer] Preparing for 1.0.2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 j=FCrgen h=F6ller [werk3AT] wrote: | I plan to release 1.0.2 tomorrow morning - finally... | | BTW, I'm committing a couple of minor refinements during the course of today. Among them is that BeanWrapperImpl registers default editors for Boolean and Number objects now, using Integer.valueOf/toString etc. Interesting... what prompted the change? The javadocs previously mentioned that they weren't meant for system wide property editors. Will we still be able to bind a NumberFormat w/ a Locale (per request) as a property editor to override the default property editor? Thanks! Seth -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3-nr1 (Windows XP) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFAt3zsKZsFSwtW+wIRAokOAJ4gHiJ6DnMoqCp4el3sTXN0eLozNgCfTXBZ ryg/UsA2aTfw8lEdEGY3AkM=3D =3D7tKb -----END PGP SIGNATURE----- ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-29 23:03:18
|
I've actually added the "queryWithRowHandler" method in the course of my =
changes today, and deprecated the "queryForList(..., RowHandler)" =
version. I've noticed the deprecation already at the time of SQL Maps =
2.0 RC4, but somehow forgot to adapt Spring's support classes =
immediately (although I promised to do it on the iBATIS forums).
=20
So if you fetch the DataSource/TransactionManager changes, you should =
get the "queryWithRowHandler" version too. Once we ship SQL Maps 2.0 =
final (probably in Spring 1.0.3?), I'll probably remove the =
"queryForList(..., RowHandler)" method entirely.
=20
Regarding SqlMapClientCallback: That's mainly used for implementing =
SqlMapClientTemplate's one-line operations. It's also available for =
applications, but the only scenario where I actually recommend this is =
statement batching: executor.startBatch, various operations, =
executor.executeBatch(). Such a batch needs to be executed on one single =
SqlMapExecutor, which SqlMapClientCallback provides.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Brandon Goodin
Gesendet: So 30.05.2004 01:53
An: spr...@li...
Betreff: RE: [Springframework-developer] Ibatis integration corrections =
needed
Sorry if this was received 2 or 3 times. I received a message email back =
2
times that said the last one I sent was too large. So, I felt it =
important
to post again.
Followin are some issues that need to be resolved...
Line 54 of SqlMapClientOperations:
List queryForList(String statementName, Object parameterObject, =
RowHandler
rowHandler)
throws DataAccessException;
=20
should be..
void queryWithRowhandler(String statementName, Object parameterObject,
RowHandler rowHandler)
throws DataAccessException;
=20
Line 185-192 of SqlMapClientTemplate needs to be changed in a similar
manner:
public List queryForList(final String statementName, final Object
parameterObject,
final RowHandler rowHandler) throws DataAccessException {
return executeWithListResult(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {
return executor.queryForList(statementName, parameterObject,
rowHandler);
}
});
}
Should be:
I am assuming you do not want to implement another method on your
SqlMapClientCallback just to accommodate the queryWithRowHandler. So, I
simply pass back a null from the doInSqlMapClient of the
SqlMapClientCallback implementation and ignore it.
public void queryWithRowHandler(final String statementName, final Object
parameterObject,
final RowHandler rowHandler) throws DataAccessException {
executeWithRowHandler(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {
executor.queryWithRowHandler(statementName, parameterObject,
rowHandler);
return null;
}
});
}
Also, the following should be added to the SqlMapClientTemplate
/**
* Execute the given data access action on a SqlMapSession
* with a RowHandler.
* @param action callback object that specifies the data access action
* @return the List result
* @throws DataAccessException in case of SQL Maps errors
*/
public void executeWithRowHandler(SqlMapClientCallback action) throws
DataAccessException {
execute(action);
}
Apart from all of this I am rather curious about the purpose the
SqlMapClientCallback? I read the javadoc and am wondering what role it =
plays
in the process of Spring integration with iBatis. Could you provide me =
with
a explanation of it's role?
Thanks,
Brandon Goodin
http://www.ibatis.com
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Brandon G. <ma...@ph...> - 2004-05-29 22:47:57
|
Sorry if this was received 2 or 3 times. I received a message email back 2
times that said the last one I sent was too large. So, I felt it important
to post again.
Followin are some issues that need to be resolved...
Line 54 of SqlMapClientOperations:
List queryForList(String statementName, Object parameterObject, RowHandler
rowHandler)
throws DataAccessException;
should be..
void queryWithRowhandler(String statementName, Object parameterObject,
RowHandler rowHandler)
throws DataAccessException;
Line 185-192 of SqlMapClientTemplate needs to be changed in a similar
manner:
public List queryForList(final String statementName, final Object
parameterObject,
final RowHandler rowHandler) throws DataAccessException {
return executeWithListResult(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {
return executor.queryForList(statementName, parameterObject,
rowHandler);
}
});
}
Should be:
I am assuming you do not want to implement another method on your
SqlMapClientCallback just to accommodate the queryWithRowHandler. So, I
simply pass back a null from the doInSqlMapClient of the
SqlMapClientCallback implementation and ignore it.
public void queryWithRowHandler(final String statementName, final Object
parameterObject,
final RowHandler rowHandler) throws DataAccessException {
executeWithRowHandler(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {
executor.queryWithRowHandler(statementName, parameterObject,
rowHandler);
return null;
}
});
}
Also, the following should be added to the SqlMapClientTemplate
/**
* Execute the given data access action on a SqlMapSession
* with a RowHandler.
* @param action callback object that specifies the data access action
* @return the List result
* @throws DataAccessException in case of SQL Maps errors
*/
public void executeWithRowHandler(SqlMapClientCallback action) throws
DataAccessException {
execute(action);
}
Apart from all of this I am rather curious about the purpose the
SqlMapClientCallback? I read the javadoc and am wondering what role it plays
in the process of Spring integration with iBatis. Could you provide me with
a explanation of it's role?
Thanks,
Brandon Goodin
http://www.ibatis.com
|
|
From: Brandon G. <ma...@ph...> - 2004-05-29 22:39:55
|
Sorry if this was received twice. I received a message email back that said
the last one I sent was too large. So, I felt it important to post again.
I know I should be adding these to a bug report. But, I figured that I could
do it all in one bug report once the more complex issue of transaction
management is resolved.
I have found another issue that needs to be remedied.
Line 54 of SqlMapClientOpertaions:
List queryForList(String statementName, Object parameterObject, RowHandler
rowHandler)
throws DataAccessException;
should be..
void queryWithRowhandler(String statementName, Object parameterObject,
RowHandler rowHandler)
throws DataAccessException;
Line 185-192 of SqlMapClientTemplate needs to be changed in a similar
manner:
public List queryForList(final String statementName, final Object
parameterObject,
final RowHandler rowHandler) throws DataAccessException {
return executeWithListResult(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {
return executor.queryForList(statementName,
parameterObject, rowHandler);
}
});
}
Should be:
I am assuming you do not want to implement another method on your
SqlMapClientCallback just to accommodate the queryWithRowHandler. So, I
simply pass back a null from the doInSqlMapClient of the
SqlMapClientCallback implementation and ignore it.
public void queryWithRowHandler(final String statementName, final Object
parameterObject,
final RowHandler rowHandler) throws DataAccessException {
executeWithRowHandler(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {
executor.queryWithRowHandler(statementName,
parameterObject, rowHandler);
return null;
}
});
}
Also, the following should be added to the SqlMapClientTemplate
/**
* Execute the given data access action on a SqlMapSession
* with a RowHandler.
* @param action callback object that specifies the data access action
* @return the List result
* @throws DataAccessException in case of SQL Maps errors
*/
public void executeWithRowHandler(SqlMapClientCallback action) throws
DataAccessException {
execute(action);
}
Apart from all of this I am rather curious about the purpose the
SqlMapClientCallback? I read the javadoc and am wondering what role it plays
in the process of Spring integration with iBatis. Could you provide me with
a explanation of it's role?
Thanks,
Brandon Goodin
http://www.ibatis.com
|
|
From: Brandon G. <ma...@ph...> - 2004-05-29 22:37:06
|
Juergen, Did you get the changes for the executeWithRowHandler changes committed? Those are important. Because once the final release of ibatis is out the current integration with Spring will break. I wasn't sure if you got the email because I received an email from the list that said my posting was = too large and it was awaiting approval by the moderator. Brandon > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On = Behalf > Of j=FCrgen h=F6ller [werk3AT] > Sent: Saturday, May 29, 2004 2:31 PM > To: spr...@li... > Subject: Re: [Springframework-developer] Ibatis integration = corrections > needed >=20 > :-)) >=20 > The difference is: This time it's gonna happen. I know, I already said > that earlier too ;-) Argh, release management, argh, time planning... = and > the ability to say "rien ne va plus" for a specific release. >=20 > Some of the stuff that I've still considered for 1.0.2, like Keith's > BatchSqlUpdate class or opening up the ApplicationEventMulticaster, is = now > *not* gonna happen for 1.0.2. But today's iBATIS SQL Maps refinements = will > be included! >=20 > Juergen >=20 >=20 > ________________________________ >=20 > Von: spr...@li... im Auftrag = von > Fernando Martins > Gesendet: Sa 29.05.2004 23:11 > An: spr...@li... > Betreff: Re: [Springframework-developer] Ibatis integration = corrections > needed >=20 >=20 >=20 >=20 > On Saturday 29 May 2004 22:38, j=FCrgen h=F6ller [werk3AT] wrote: > > ... Just in time for 1.0.2, to be released tomorrow. >=20 > http://imdb.com/title/tt0107048/ >=20 > ;-) >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-29 21:36:23
|
:-)) =20 The difference is: This time it's gonna happen. I know, I already said = that earlier too ;-) Argh, release management, argh, time planning... = and the ability to say "rien ne va plus" for a specific release. =20 Some of the stuff that I've still considered for 1.0.2, like Keith's = BatchSqlUpdate class or opening up the ApplicationEventMulticaster, is = now *not* gonna happen for 1.0.2. But today's iBATIS SQL Maps = refinements will be included! =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Fernando Martins Gesendet: Sa 29.05.2004 23:11 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections = needed On Saturday 29 May 2004 22:38, j=FCrgen h=F6ller [werk3AT] wrote: > ... Just in time for 1.0.2, to be released tomorrow. http://imdb.com/title/tt0107048/ ;-) ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-29 21:31:39
|
Just committed. As I said, might take a while before it's available from = public CVS. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 22:59 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections = needed excellent, thanks a ton j=FCrgen. Brandon -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 2:39 PM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed I've just tried with a lazy-loading PaginatedList - works like a charm! = And it still works nicely with the old usage pattern too. Gonna commit it within the next 30 minutes... might take about 2 or 3 = hours to be available from public CVS, though. Brandon, thanks for that really valuable hint :-) Just in time for = 1.0.2, to be released tomorrow. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 22:25 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed excellent, i'll give it a try. -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 2:07 PM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Actually, this seems to work great: Specify the DataSource once on SqlMapClientFactoryBean rather than on each DAO, and still set the UserConnection in SqlMapClientTemplate. The latter simply fetches the DataSource from the SqlMapClient in this case. As far as I understand = that, this should allow for proper lazy loading... Juergen ________________________________ Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:46 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections needed What about initializing the iBATIS TransactionManager in the way that = you suggested, and *still* pass in transactional Connections via setUserConnection? That could give the best of both worlds: = participating in all kinds of Spring-managed transactions, and allowing for lazy loading. = It would also avoid the need to pass the DataSource to each and every SQL-Maps-based DAO; a single passing of the DataSource to the SqlMapClientFactoryBean would then be sufficient. Juergen ________________________________ Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:24 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections needed The problem is that we'd pass the DataSource to the iBATIS TransactionManager here, but not Spring-managed transactional = Connections. SQL Maps would fetch its own Connections from the given DataSource, = failing to participate in Spring-managed transactions (other than JTA). I'm aware that lazy loading won't work with Spring's current iBATIS integration strategy. However, I'm not aware of any other disadvantages; = can you give details in that respect? I wouldn't mind letting SQL Maps create its own Connections from the DataSource for lazy loading, if told to do so. But we'd need to figure = out a way to pass a transactional Connection in for the actual operation (like = we do currently) and still allow for lazy loading via a given DataSource. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 20:48 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL = TransactionConfig to use in the TransactionManager. Please review my previous code. It = shows exactly how that is set. If you feel that iBatis may need to provide = better integrtion points for Spring to take advantage of... feel free to = provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those = classes are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction = management. So effectively, you don't need to use Spring's SqlMapClientTemplate in = that scenario: Simply use the SqlMapClient instance directly. Of course, you = can still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient = in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you = have to deal with checked SQLExceptions that your DAOs throw. However, that's = also the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use = Spring's resource and transaction management: throwing unchecked = DataAccessExceptions from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation = facilities do). So in the end, there are two choices for using Spring in combination = with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the = SqlMapDaos. This is not good. What happens when someone wants to allow iBatis to = manage transactions on it's own? I think that the datasource requirement needs = to be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections = needed Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring = product and began to explore the code base. I specifically have examined the = iBatis integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig = which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates = how the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) = Resources.instantiate(type); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could = not instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is = left is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig)= for the configuration of the datasource. The ExternalTransactionConfig = will allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or = provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Fernando M. <fm...@ar...> - 2004-05-29 21:07:18
|
On Saturday 29 May 2004 22:38, j=FCrgen h=F6ller [werk3AT] wrote: > ... Just in time for 1.0.2, to be released tomorrow. http://imdb.com/title/tt0107048/ ;-) |
|
From: Brandon G. <ma...@ph...> - 2004-05-29 20:57:26
|
excellent, thanks a ton j=FCrgen. Brandon -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 2:39 PM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed I've just tried with a lazy-loading PaginatedList - works like a charm! A= nd it still works nicely with the old usage pattern too. Gonna commit it within the next 30 minutes... might take about 2 or 3 hou= rs to be available from public CVS, though. Brandon, thanks for that really valuable hint :-) Just in time for 1.0.2,= to be released tomorrow. Juergen ________________________________ Von: spr...@li... im Auftrag von Brandon Goodin Gesendet: Sa 29.05.2004 22:25 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed excellent, i'll give it a try. -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 2:07 PM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Actually, this seems to work great: Specify the DataSource once on SqlMapClientFactoryBean rather than on each DAO, and still set the UserConnection in SqlMapClientTemplate. The latter simply fetches the DataSource from the SqlMapClient in this case. As far as I understand tha= t, this should allow for proper lazy loading... Juergen ________________________________ Von: spr...@li... im Auftrag von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:46 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections needed What about initializing the iBATIS TransactionManager in the way that you suggested, and *still* pass in transactional Connections via setUserConnection? That could give the best of both worlds: participating= in all kinds of Spring-managed transactions, and allowing for lazy loading. = It would also avoid the need to pass the DataSource to each and every SQL-Maps-based DAO; a single passing of the DataSource to the SqlMapClientFactoryBean would then be sufficient. Juergen ________________________________ Von: spr...@li... im Auftrag von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:24 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections needed The problem is that we'd pass the DataSource to the iBATIS TransactionManager here, but not Spring-managed transactional Connections. SQL Maps would fetch its own Connections from the given DataSource, faili= ng to participate in Spring-managed transactions (other than JTA). I'm aware that lazy loading won't work with Spring's current iBATIS integration strategy. However, I'm not aware of any other disadvantages; = can you give details in that respect? I wouldn't mind letting SQL Maps create its own Connections from the DataSource for lazy loading, if told to do so. But we'd need to figure ou= t a way to pass a transactional Connection in for the actual operation (like = we do currently) and still allow for lazy loading via a given DataSource. Juergen ________________________________ Von: spr...@li... im Auftrag von Brandon Goodin Gesendet: Sa 29.05.2004 20:48 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL TransactionConf= ig to use in the TransactionManager. Please review my previous code. It show= s exactly how that is set. If you feel that iBatis may need to provide bett= er integrtion points for Spring to take advantage of... feel free to provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those clas= ses are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction managemen= t. So effectively, you don't need to use Spring's SqlMapClientTemplate in th= at scenario: Simply use the SqlMapClient instance directly. Of course, you c= an still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you have= to deal with checked SQLExceptions that your DAOs throw. However, that's als= o the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use Spring's resource and transaction management: throwing unchecked DataAccessExcepti= ons from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation faciliti= es do). So in the end, there are two choices for using Spring in combination with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the SqlMapDao= s. This is not good. What happens when someone wants to allow iBatis to mana= ge transactions on it's own? I think that the datasource requirement needs t= o be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections neede= d Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring prod= uct and began to explore the code base. I specifically have examined the iBat= is integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates ho= w the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) Resources.instantiate(ty= pe); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could n= ot instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is lef= t is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig) for the configuration of the datasource. The ExternalTransactionConfig wi= ll allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-29 20:41:32
|
I've just tried with a lazy-loading PaginatedList - works like a charm! = And it still works nicely with the old usage pattern too. =20 Gonna commit it within the next 30 minutes... might take about 2 or 3 = hours to be available from public CVS, though. =20 Brandon, thanks for that really valuable hint :-) Just in time for = 1.0.2, to be released tomorrow. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 22:25 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections = needed excellent, i'll give it a try. -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 2:07 PM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Actually, this seems to work great: Specify the DataSource once on SqlMapClientFactoryBean rather than on each DAO, and still set the UserConnection in SqlMapClientTemplate. The latter simply fetches the DataSource from the SqlMapClient in this case. As far as I understand = that, this should allow for proper lazy loading... Juergen ________________________________ Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:46 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections needed What about initializing the iBATIS TransactionManager in the way that = you suggested, and *still* pass in transactional Connections via setUserConnection? That could give the best of both worlds: = participating in all kinds of Spring-managed transactions, and allowing for lazy loading. = It would also avoid the need to pass the DataSource to each and every SQL-Maps-based DAO; a single passing of the DataSource to the SqlMapClientFactoryBean would then be sufficient. Juergen ________________________________ Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:24 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections needed The problem is that we'd pass the DataSource to the iBATIS TransactionManager here, but not Spring-managed transactional = Connections. SQL Maps would fetch its own Connections from the given DataSource, = failing to participate in Spring-managed transactions (other than JTA). I'm aware that lazy loading won't work with Spring's current iBATIS integration strategy. However, I'm not aware of any other disadvantages; = can you give details in that respect? I wouldn't mind letting SQL Maps create its own Connections from the DataSource for lazy loading, if told to do so. But we'd need to figure = out a way to pass a transactional Connection in for the actual operation (like = we do currently) and still allow for lazy loading via a given DataSource. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 20:48 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL = TransactionConfig to use in the TransactionManager. Please review my previous code. It = shows exactly how that is set. If you feel that iBatis may need to provide = better integrtion points for Spring to take advantage of... feel free to = provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those = classes are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction = management. So effectively, you don't need to use Spring's SqlMapClientTemplate in = that scenario: Simply use the SqlMapClient instance directly. Of course, you = can still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient = in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you = have to deal with checked SQLExceptions that your DAOs throw. However, that's = also the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use = Spring's resource and transaction management: throwing unchecked = DataAccessExceptions from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation = facilities do). So in the end, there are two choices for using Spring in combination = with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the = SqlMapDaos. This is not good. What happens when someone wants to allow iBatis to = manage transactions on it's own? I think that the datasource requirement needs = to be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections = needed Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring = product and began to explore the code base. I specifically have examined the = iBatis integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig = which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates = how the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) = Resources.instantiate(type); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could = not instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is = left is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig)= for the configuration of the datasource. The ExternalTransactionConfig = will allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or = provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Brandon G. <ma...@ph...> - 2004-05-29 20:23:03
|
excellent, i'll give it a try. -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 2:07 PM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Actually, this seems to work great: Specify the DataSource once on SqlMapClientFactoryBean rather than on each DAO, and still set the UserConnection in SqlMapClientTemplate. The latter simply fetches the DataSource from the SqlMapClient in this case. As far as I understand tha= t, this should allow for proper lazy loading... Juergen ________________________________ Von: spr...@li... im Auftrag von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:46 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections needed What about initializing the iBATIS TransactionManager in the way that you suggested, and *still* pass in transactional Connections via setUserConnection? That could give the best of both worlds: participating= in all kinds of Spring-managed transactions, and allowing for lazy loading. = It would also avoid the need to pass the DataSource to each and every SQL-Maps-based DAO; a single passing of the DataSource to the SqlMapClientFactoryBean would then be sufficient. Juergen ________________________________ Von: spr...@li... im Auftrag von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:24 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections needed The problem is that we'd pass the DataSource to the iBATIS TransactionManager here, but not Spring-managed transactional Connections. SQL Maps would fetch its own Connections from the given DataSource, faili= ng to participate in Spring-managed transactions (other than JTA). I'm aware that lazy loading won't work with Spring's current iBATIS integration strategy. However, I'm not aware of any other disadvantages; = can you give details in that respect? I wouldn't mind letting SQL Maps create its own Connections from the DataSource for lazy loading, if told to do so. But we'd need to figure ou= t a way to pass a transactional Connection in for the actual operation (like = we do currently) and still allow for lazy loading via a given DataSource. Juergen ________________________________ Von: spr...@li... im Auftrag von Brandon Goodin Gesendet: Sa 29.05.2004 20:48 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL TransactionConf= ig to use in the TransactionManager. Please review my previous code. It show= s exactly how that is set. If you feel that iBatis may need to provide bett= er integrtion points for Spring to take advantage of... feel free to provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those clas= ses are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction managemen= t. So effectively, you don't need to use Spring's SqlMapClientTemplate in th= at scenario: Simply use the SqlMapClient instance directly. Of course, you c= an still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you have= to deal with checked SQLExceptions that your DAOs throw. However, that's als= o the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use Spring's resource and transaction management: throwing unchecked DataAccessExcepti= ons from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation faciliti= es do). So in the end, there are two choices for using Spring in combination with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the SqlMapDao= s. This is not good. What happens when someone wants to allow iBatis to mana= ge transactions on it's own? I think that the datasource requirement needs t= o be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections neede= d Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring prod= uct and began to explore the code base. I specifically have examined the iBat= is integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates ho= w the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) Resources.instantiate(ty= pe); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could n= ot instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is lef= t is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig) for the configuration of the datasource. The ExternalTransactionConfig wi= ll allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-29 20:09:36
|
Actually, this seems to work great: Specify the DataSource once on = SqlMapClientFactoryBean rather than on each DAO, and still set the = UserConnection in SqlMapClientTemplate. The latter simply fetches the = DataSource from the SqlMapClient in this case. As far as I understand = that, this should allow for proper lazy loading... =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:46 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections = needed What about initializing the iBATIS TransactionManager in the way that = you suggested, and *still* pass in transactional Connections via = setUserConnection? That could give the best of both worlds: = participating in all kinds of Spring-managed transactions, and allowing = for lazy loading. It would also avoid the need to pass the DataSource to = each and every SQL-Maps-based DAO; a single passing of the DataSource to = the SqlMapClientFactoryBean would then be sufficient. Juergen ________________________________ Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:24 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections = needed The problem is that we'd pass the DataSource to the iBATIS = TransactionManager here, but not Spring-managed transactional = Connections. SQL Maps would fetch its own Connections from the given = DataSource, failing to participate in Spring-managed transactions (other = than JTA). I'm aware that lazy loading won't work with Spring's current iBATIS = integration strategy. However, I'm not aware of any other disadvantages; = can you give details in that respect? I wouldn't mind letting SQL Maps create its own Connections from the = DataSource for lazy loading, if told to do so. But we'd need to figure = out a way to pass a transactional Connection in for the actual operation = (like we do currently) and still allow for lazy loading via a given = DataSource. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 20:48 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections = needed The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL = TransactionConfig to use in the TransactionManager. Please review my previous code. It = shows exactly how that is set. If you feel that iBatis may need to provide = better integrtion points for Spring to take advantage of... feel free to = provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those = classes are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction = management. So effectively, you don't need to use Spring's SqlMapClientTemplate in = that scenario: Simply use the SqlMapClient instance directly. Of course, you = can still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient = in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you = have to deal with checked SQLExceptions that your DAOs throw. However, that's = also the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use = Spring's resource and transaction management: throwing unchecked = DataAccessExceptions from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation = facilities do). So in the end, there are two choices for using Spring in combination = with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the = SqlMapDaos. This is not good. What happens when someone wants to allow iBatis to = manage transactions on it's own? I think that the datasource requirement needs = to be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections = needed Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring = product and began to explore the code base. I specifically have examined the = iBatis integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig = which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates = how the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) = Resources.instantiate(type); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could = not instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is = left is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig)= for the configuration of the datasource. The ExternalTransactionConfig = will allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or = provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-29 19:49:36
|
What about initializing the iBATIS TransactionManager in the way that = you suggested, and *still* pass in transactional Connections via = setUserConnection? That could give the best of both worlds: = participating in all kinds of Spring-managed transactions, and allowing = for lazy loading. It would also avoid the need to pass the DataSource to = each and every SQL-Maps-based DAO; a single passing of the DataSource to = the SqlMapClientFactoryBean would then be sufficient. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] Gesendet: Sa 29.05.2004 21:24 An: spr...@li... Betreff: Re: [Springframework-developer] Ibatis integration corrections = needed The problem is that we'd pass the DataSource to the iBATIS = TransactionManager here, but not Spring-managed transactional = Connections. SQL Maps would fetch its own Connections from the given = DataSource, failing to participate in Spring-managed transactions (other = than JTA). I'm aware that lazy loading won't work with Spring's current iBATIS = integration strategy. However, I'm not aware of any other disadvantages; = can you give details in that respect? I wouldn't mind letting SQL Maps create its own Connections from the = DataSource for lazy loading, if told to do so. But we'd need to figure = out a way to pass a transactional Connection in for the actual operation = (like we do currently) and still allow for lazy loading via a given = DataSource. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 20:48 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections = needed The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL = TransactionConfig to use in the TransactionManager. Please review my previous code. It = shows exactly how that is set. If you feel that iBatis may need to provide = better integrtion points for Spring to take advantage of... feel free to = provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those = classes are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction = management. So effectively, you don't need to use Spring's SqlMapClientTemplate in = that scenario: Simply use the SqlMapClient instance directly. Of course, you = can still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient = in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you = have to deal with checked SQLExceptions that your DAOs throw. However, that's = also the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use = Spring's resource and transaction management: throwing unchecked = DataAccessExceptions from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation = facilities do). So in the end, there are two choices for using Spring in combination = with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the = SqlMapDaos. This is not good. What happens when someone wants to allow iBatis to = manage transactions on it's own? I think that the datasource requirement needs = to be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections = needed Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring = product and began to explore the code base. I specifically have examined the = iBatis integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig = which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates = how the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) = Resources.instantiate(type); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could = not instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is = left is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig)= for the configuration of the datasource. The ExternalTransactionConfig = will allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or = provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Brandon G. <ma...@ph...> - 2004-05-29 19:48:29
|
Thanks for the clarification of Spring's mode of operation. I need to loo= k at the iBatis code and see how we can accomodate. Thanks Brandon Goodin -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 1:25 PM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed The problem is that we'd pass the DataSource to the iBATIS TransactionManager here, but not Spring-managed transactional Connections. SQL Maps would fetch its own Connections from the given DataSource, faili= ng to participate in Spring-managed transactions (other than JTA). I'm aware that lazy loading won't work with Spring's current iBATIS integration strategy. However, I'm not aware of any other disadvantages; = can you give details in that respect? I wouldn't mind letting SQL Maps create its own Connections from the DataSource for lazy loading, if told to do so. But we'd need to figure ou= t a way to pass a transactional Connection in for the actual operation (like = we do currently) and still allow for lazy loading via a given DataSource. Juergen ________________________________ Von: spr...@li... im Auftrag von Brandon Goodin Gesendet: Sa 29.05.2004 20:48 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL TransactionConf= ig to use in the TransactionManager. Please review my previous code. It show= s exactly how that is set. If you feel that iBatis may need to provide bett= er integrtion points for Spring to take advantage of... feel free to provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those clas= ses are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction managemen= t. So effectively, you don't need to use Spring's SqlMapClientTemplate in th= at scenario: Simply use the SqlMapClient instance directly. Of course, you c= an still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you have= to deal with checked SQLExceptions that your DAOs throw. However, that's als= o the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use Spring's resource and transaction management: throwing unchecked DataAccessExcepti= ons from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation faciliti= es do). So in the end, there are two choices for using Spring in combination with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the SqlMapDao= s. This is not good. What happens when someone wants to allow iBatis to mana= ge transactions on it's own? I think that the datasource requirement needs t= o be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections neede= d Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring prod= uct and began to explore the code base. I specifically have examined the iBat= is integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates ho= w the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) Resources.instantiate(ty= pe); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could n= ot instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is lef= t is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig) for the configuration of the datasource. The ExternalTransactionConfig wi= ll allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-29 19:25:33
|
The problem is that we'd pass the DataSource to the iBATIS = TransactionManager here, but not Spring-managed transactional = Connections. SQL Maps would fetch its own Connections from the given = DataSource, failing to participate in Spring-managed transactions (other = than JTA). =20 I'm aware that lazy loading won't work with Spring's current iBATIS = integration strategy. However, I'm not aware of any other disadvantages; = can you give details in that respect? =20 I wouldn't mind letting SQL Maps create its own Connections from the = DataSource for lazy loading, if told to do so. But we'd need to figure = out a way to pass a transactional Connection in for the actual operation = (like we do currently) and still allow for lazy loading via a given = DataSource. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 20:48 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections = needed The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL = TransactionConfig to use in the TransactionManager. Please review my previous code. It = shows exactly how that is set. If you feel that iBatis may need to provide = better integrtion points for Spring to take advantage of... feel free to = provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those = classes are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction = management. So effectively, you don't need to use Spring's SqlMapClientTemplate in = that scenario: Simply use the SqlMapClient instance directly. Of course, you = can still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient = in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you = have to deal with checked SQLExceptions that your DAOs throw. However, that's = also the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use = Spring's resource and transaction management: throwing unchecked = DataAccessExceptions from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation = facilities do). So in the end, there are two choices for using Spring in combination = with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the = SqlMapDaos. This is not good. What happens when someone wants to allow iBatis to = manage transactions on it's own? I think that the datasource requirement needs = to be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections = needed Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring = product and began to explore the code base. I specifically have examined the = iBatis integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig = which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates = how the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) = Resources.instantiate(type); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could = not instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is = left is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig)= for the configuration of the datasource. The ExternalTransactionConfig = will allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or = provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Brandon G. <ma...@ph...> - 2004-05-29 18:48:55
|
The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL TransactionConf= ig to use in the TransactionManager. Please review my previous code. It show= s exactly how that is set. If you feel that iBatis may need to provide bett= er integrtion points for Spring to take advantage of... feel free to provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those clas= ses are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction managemen= t. So effectively, you don't need to use Spring's SqlMapClientTemplate in th= at scenario: Simply use the SqlMapClient instance directly. Of course, you c= an still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you have= to deal with checked SQLExceptions that your DAOs throw. However, that's als= o the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use Spring's resource and transaction management: throwing unchecked DataAccessExcepti= ons from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation faciliti= es do). So in the end, there are two choices for using Spring in combination with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the SqlMapDao= s. This is not good. What happens when someone wants to allow iBatis to mana= ge transactions on it's own? I think that the datasource requirement needs t= o be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections neede= d Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring prod= uct and began to explore the code base. I specifically have examined the iBat= is integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates ho= w the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) Resources.instantiate(ty= pe); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could n= ot instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is lef= t is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig) for the configuration of the datasource. The ExternalTransactionConfig wi= ll allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Brandon G. <br...@za...> - 2004-05-29 18:46:03
|
The issue here of setting the datasource still remains. If you set the connection via the setUserConnection it doesn't take full advantage of ibatis. However, it is possible to allow for Spring to be the iBatis TransactionManager. You simply need to set up an EXTERNAL TransactionConf= ig to use in the TransactionManager. Please review my previous code. It show= s exactly how that is set. If you feel that iBatis may need to provide bett= er integrtion points for Spring to take advantage of... feel free to provide suggestions. Thanks, Brandon Goodin http://www.ibatis.com -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of j=FCrgen h=F6ller [werk3AT] Sent: Saturday, May 29, 2004 11:53 AM To: spr...@li... Subject: Re: [Springframework-developer] Ibatis integration corrections needed Hi again, Brandon, While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does not necessarily affect the iBATIS support classes that we provide: Those clas= ses are specifically meant to integrate SQL Maps into Spring's resource and transaction management, potentially sharing transactions with other data access strategies within Spring (for example, plain JDBC or Hibernate). As far as I understand, the SqlMapClient API already allows for simple one-line operations when using its own resource and transaction managemen= t. So effectively, you don't need to use Spring's SqlMapClientTemplate in th= at scenario: Simply use the SqlMapClient instance directly. Of course, you c= an still use Spring's SqlMapClientFactoryBean to set up your SqlMapClient in the application context, passing it to your DAOs via bean references. A disadvantage that I see with direct SqlMapClient usage is that you have= to deal with checked SQLExceptions that your DAOs throw. However, that's als= o the case with your iBATIS transaction demarcation code, so that will be consistent throughout the application. The alternative is to use Spring's resource and transaction management: throwing unchecked DataAccessExcepti= ons from DAOs (like SqlMapClientTemplate does), and unchecked TransactionExceptions from transaction demarcation code (like Spring's PlatformTransactionManager interface and declarative demarcation faciliti= es do). So in the end, there are two choices for using Spring in combination with iBATIS SQL Maps: either Spring resource and transaction management (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use SqlMapClient directly in your scenario; you can still leverage all of Spring's IoC facilities. Juergen ________________________________ Von: spr...@li... im Auftrag von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the SqlMapDao= s. This is not good. What happens when someone wants to allow iBatis to mana= ge transactions on it's own? I think that the datasource requirement needs t= o be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections neede= d Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring prod= uct and began to explore the code base. I specifically have examined the iBat= is integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates ho= w the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) Resources.instantiate(ty= pe); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= cti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could n= ot instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is lef= t is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig) for the configuration of the datasource. The ExternalTransactionConfig wi= ll allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-29 18:29:09
|
Guillaume, =20 I've prototypically added an Introspector.flushCaches call to context = shutdown: I don't see any difference in the profiler. That's not too = surprising, as the originally leaking classes are not managed by beans = facilities in the first place: for example, SQLErrorCodesFactory, which = is just used internally by SQLErrorCodeSQLExceptionTranslator. =20 Of course, since my changes from a week ago, those classes don't leak = anymore, as they hold their singleton instance in a WeakReference now... = I still don't understand why this is necessary, but I'm 100% sure that = it does make a difference on both Sun JDK 1.4.2 and Sun JDK 1.3.1. I've = also tried various GC configuration options - always the same effect. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Guillaume Poirier Gesendet: Sa 29.05.2004 06:12 An: spr...@li... Betreff: Re: [Springframework-developer] Cleanup of context resources on = webapp reload I experimented some more about this cleanup issue, and I was able to = narrow down the problem to the caching done by the java.beans.Introspector. It stores the BeanInfo instances in a WeakHashMap, but in that Map implementation, only the keys uses WeakReference, the values are stored = with hard references since BeanInfo has an hard reference on the class it = gives info about (indirectly through BeanDescriptor and others), any time Introspector.getBeanInfo(Class) is used, that class and it's static = members will not ever be able to be garbage collected. I kind of remember = someone mentioning something related to this in the mailling list, but I cannot = find the mail. I wonder if there's other case where the java[x] classes = might have an hard reference on a class or its instances. A fix for this particular problem is to have a ServletContextListener call Introspector.flushCaches() when the context is destroyed. It seems like a known issue at Sun : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D4291376 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D4730581 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D4809008 So, unless I'm missing something here, that means fixes like using synchronization and WeakReference on singleton probably won't help much = if at all. The only way that I can see for a class not to be gargage = collected when no more active thread use it, is if another ClassLoader has an hard reference to the class instance, or an instance of that class. Having = the class itself have an hard reference on a its own singleton has no = effect, it's a circular reference that will not prevent the class or the = instance to be gargabe collected when neither is being refered to by something else. Guillaume ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-29 17:54:08
|
Hi again, Brandon, =20 While I agree that Spring allows iBATIS users to choose between Spring's = own transaction management and iBATIS transaction management, this does = not necessarily affect the iBATIS support classes that we provide: Those = classes are specifically meant to integrate SQL Maps into Spring's = resource and transaction management, potentially sharing transactions = with other data access strategies within Spring (for example, plain JDBC = or Hibernate). =20 As far as I understand, the SqlMapClient API already allows for simple = one-line operations when using its own resource and transaction = management. So effectively, you don't need to use Spring's = SqlMapClientTemplate in that scenario: Simply use the SqlMapClient = instance directly. Of course, you can still use Spring's = SqlMapClientFactoryBean to set up your SqlMapClient in the application = context, passing it to your DAOs via bean references. =20 A disadvantage that I see with direct SqlMapClient usage is that you = have to deal with checked SQLExceptions that your DAOs throw. However, = that's also the case with your iBATIS transaction demarcation code, so = that will be consistent throughout the application. The alternative is = to use Spring's resource and transaction management: throwing unchecked = DataAccessExceptions from DAOs (like SqlMapClientTemplate does), and = unchecked TransactionExceptions from transaction demarcation code (like = Spring's PlatformTransactionManager interface and declarative = demarcation facilities do). =20 So in the end, there are two choices for using Spring in combination = with iBATIS SQL Maps: either Spring resource and transaction management = (-> coding your DAOs with SqlMapClientTemplate), or iBATIS resource and = transaction management (-> coding your DAOs with SqlMapClient directly). = I don't see a need to rework SqlMapClientTemplate here: Simply use = SqlMapClient directly in your scenario; you can still leverage all of = Spring's IoC facilities. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Brandon Goodin Gesendet: Sa 29.05.2004 07:42 An: spr...@li... Betreff: RE: [Springframework-developer] Ibatis integration corrections = needed Also, after some exploration I have discovered that Spring requires that = the Datasource be set via the <property name=3D"dataSource"> on the = SqlMapDaos. This is not good. What happens when someone wants to allow = iBatis to manage transactions on it's own? I think that the datasource = requirement needs to be removed. Setting the datasource via spring = should be optional not required. =20 Brandon Goodin http://www.ibatis.com =20 ________________________________ From: spr...@li... = [mailto:spr...@li...] On Behalf = Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections = needed =20 Greetings, =20 My name is Brandon Goodin. I am committer on the iBatis project. As I've = had time recently I've become increasingly more familiar with the Spring = product and began to explore the code base. I specifically have examined = the iBatis integration and noticed a problem in how the datasource is = being set. =20 In the SqlMapClientTemplate the execute method is using = session.setUserConnection(con);. Setting the connection using = setUserConnection on the SqlMapSession will not take full advantage of = ibatis functionality (i.e. lazy loading will not work). =20 The short explanation is that Spring needs to set the the Datasource via = the TransactionConfig which is stored in the TransactionManager. The = TransactionManager needs to be set via the SqlMapExecutorDelegate of the = SqlMapClient. The TransactionManager contains the TransactionConfig = which contains the datasource and various other pertinent config info = for transactions. =20 Following is a chunk from the XmlSqlMapClientBuilder that demonstrates = how the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager =3D null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config =3D (TransactionConfig) = Resources.instantiate(type); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransa= ctions()); errorCtx.setMoreInfo("Check the transactio nmanager properties or = configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager =3D new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could = not instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- =20 From what I can tell Spring allows for iBatis users to take advantage of = the iBatis transaction facilities if they choose (i.e. avoid using = spring transaction management if they so choose). So, the only thing = that is left is for Spring to use the proper implementation of the = TransactionConfig = (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig)= for the configuration of the datasource. The ExternalTransactionConfig = will allow for Spring to manage the commit and rollback functionality = without losing valuable functionality in iBatis (lazy loading). =20 I'd be happy to work on the Spring code base if you would like or = provide you with more insight if you need. Let me know. =20 Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/>=20 =20 |
|
From: Brandon G. <ma...@ph...> - 2004-05-29 15:13:22
|
I know I should be adding these to a bug report. But, I figured that I could
do it all in one bug report once the more complex issue of transaction
management is resolved.
I have found another issue that needs to be remedied.
Line 54 of SqlMapClientOpertaions:
List queryForList(String statementName, Object parameterObject, RowHandler
rowHandler)
throws DataAccessException;
should be..
void queryWithRowhandler(String statementName, Object parameterObject,
RowHandler rowHandler)
throws DataAccessException;
Line 185-192 of SqlMapClientTemplate needs to be changed in a similar
manner:
public List queryForList(final String statementName, final Object
parameterObject,
final RowHandler rowHandler) throws DataAccessException {
return executeWithListResult(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {
return executor.queryForList(statementName,
parameterObject, rowHandler);
}
});
}
Should be:
I am assuming you do not want to implement another method on your
SqlMapClientCallback just to accommodate the queryWithRowHandler. So, I
simply pass back a null from the doInSqlMapClient of the
SqlMapClientCallback implementation and ignore it.
public void queryWithRowHandler(final String statementName, final Object
parameterObject,
final RowHandler rowHandler) throws DataAccessException {
executeWithRowHandler(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {
executor.queryWithRowHandler(statementName,
parameterObject, rowHandler);
return null;
}
});
}
Also, the following should be added to the SqlMapClientTemplate
/**
* Execute the given data access action on a SqlMapSession
* with a RowHandler.
* @param action callback object that specifies the data access action
* @return the List result
* @throws DataAccessException in case of SQL Maps errors
*/
public void executeWithRowHandler(SqlMapClientCallback action) throws
DataAccessException {
execute(action);
}
Apart from all of this I am rather curious about the purpose the
SqlMapClientCallback? I read the javadoc and am wondering what role it plays
in the process of Spring integration with iBatis. Could you provide me with
a explanation of it's role?
Thanks,
Brandon Goodin
http://www.ibatis.com
_____
From: spr...@li...
[mailto:spr...@li...] On Behalf Of
Brandon Goodin
Sent: Friday, May 28, 2004 10:42 PM
To: spr...@li...
Subject: RE: [Springframework-developer] Ibatis integration corrections
needed
Also, after some exploration I have discovered that Spring requires that the
Datasource be set via the <property name="dataSource"> on the SqlMapDaos.
This is not good. What happens when someone wants to allow iBatis to manage
transactions on it's own? I think that the datasource requirement needs to
be removed. Setting the datasource via spring should be optional not
required.
Brandon Goodin
http://www.ibatis.com
_____
From: spr...@li...
[mailto:spr...@li...] On Behalf Of
Brandon Goodin
Sent: Friday, May 28, 2004 6:57 PM
To: spr...@li...
Subject: [Springframework-developer] Ibatis integration corrections needed
Greetings,
My name is Brandon Goodin. I am committer on the iBatis project. As I've had
time recently I've become increasingly more familiar with the Spring product
and began to explore the code base. I specifically have examined the iBatis
integration and noticed a problem in how the datasource is being set.
In the SqlMapClientTemplate the execute method is using
session.setUserConnection(con);. Setting the connection using
setUserConnection on the SqlMapSession will not take full advantage of
ibatis functionality (i.e. lazy loading will not work).
The short explanation is that Spring needs to set the the Datasource via the
TransactionConfig which is stored in the TransactionManager. The
TransactionManager needs to be set via the SqlMapExecutorDelegate of the
SqlMapClient. The TransactionManager contains the TransactionConfig which
contains the datasource and various other pertinent config info for
transactions.
Following is a chunk from the XmlSqlMapClientBuilder that demonstrates how
the datasource should be configured in ibatis:
---- start code ---
TransactionManager txManager = null;
try {
errorCtx.setMoreInfo("Check the transaction manager type or class.");
TransactionConfig config = (TransactionConfig) Resources.instantiate(type);
config.setDataSource(dataSource);
config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransacti
ons());
errorCtx.setMoreInfo("Check the transactio nmanager properties or
configuration.");
config.initialize(initProperties);
errorCtx.setMoreInfo(null);
txManager = new TransactionManager(config);
} catch (Exception e) {
if (e instanceof SqlMapException) {
throw (SqlMapException) e;
} else {
throw new SqlMapException("Error initializing TransactionManager. Could not
instantiate TransactionConfig. Cause: " + e, e);
}
}
client.getDelegate().setTxManager(txManager);
--- end code ---
From what I can tell Spring allows for iBatis users to take advantage of the
iBatis transaction facilities if they choose (i.e. avoid using spring
transaction management if they so choose). So, the only thing that is left
is for Spring to use the proper implementation of the TransactionConfig
(com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig)
for the configuration of the datasource. The ExternalTransactionConfig will
allow for Spring to manage the commit and rollback functionality without
losing valuable functionality in iBatis (lazy loading).
I'd be happy to work on the Spring code base if you would like or provide
you with more insight if you need. Let me know.
Thanks,
Brandon Goodin
http://www.ibatis.com <http://www.ibatis.com/>
|
|
From: Brandon G. <ma...@ph...> - 2004-05-29 04:36:38
|
Also, after some exploration I have discovered that Spring requires that the Datasource be set via the <property name="dataSource"> on the SqlMapDaos. This is not good. What happens when someone wants to allow iBatis to manage transactions on it's own? I think that the datasource requirement needs to be removed. Setting the datasource via spring should be optional not required. Brandon Goodin http://www.ibatis.com _____ From: spr...@li... [mailto:spr...@li...] On Behalf Of Brandon Goodin Sent: Friday, May 28, 2004 6:57 PM To: spr...@li... Subject: [Springframework-developer] Ibatis integration corrections needed Greetings, My name is Brandon Goodin. I am committer on the iBatis project. As I've had time recently I've become increasingly more familiar with the Spring product and began to explore the code base. I specifically have examined the iBatis integration and noticed a problem in how the datasource is being set. In the SqlMapClientTemplate the execute method is using session.setUserConnection(con);. Setting the connection using setUserConnection on the SqlMapSession will not take full advantage of ibatis functionality (i.e. lazy loading will not work). The short explanation is that Spring needs to set the the Datasource via the TransactionConfig which is stored in the TransactionManager. The TransactionManager needs to be set via the SqlMapExecutorDelegate of the SqlMapClient. The TransactionManager contains the TransactionConfig which contains the datasource and various other pertinent config info for transactions. Following is a chunk from the XmlSqlMapClientBuilder that demonstrates how the datasource should be configured in ibatis: ---- start code --- TransactionManager txManager = null; try { errorCtx.setMoreInfo("Check the transaction manager type or class."); TransactionConfig config = (TransactionConfig) Resources.instantiate(type); config.setDataSource(dataSource); config.setMaximumConcurrentTransactions(client.getDelegate().getMaxTransacti ons()); errorCtx.setMoreInfo("Check the transactio nmanager properties or configuration."); config.initialize(initProperties); errorCtx.setMoreInfo(null); txManager = new TransactionManager(config); } catch (Exception e) { if (e instanceof SqlMapException) { throw (SqlMapException) e; } else { throw new SqlMapException("Error initializing TransactionManager. Could not instantiate TransactionConfig. Cause: " + e, e); } } client.getDelegate().setTxManager(txManager); --- end code --- From what I can tell Spring allows for iBatis users to take advantage of the iBatis transaction facilities if they choose (i.e. avoid using spring transaction management if they so choose). So, the only thing that is left is for Spring to use the proper implementation of the TransactionConfig (com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig) for the configuration of the datasource. The ExternalTransactionConfig will allow for Spring to manage the commit and rollback functionality without losing valuable functionality in iBatis (lazy loading). I'd be happy to work on the Spring code base if you would like or provide you with more insight if you need. Let me know. Thanks, Brandon Goodin http://www.ibatis.com <http://www.ibatis.com/> |
|
From: Keith D. <kd...@cs...> - 2004-05-29 04:25:32
|
Ben, If you would, let me know when you begin your journey developing a Swing GUI built on top of Spring. As the developer for Spring's in-development rich client support (which is built directly on Swing), I'd love to be able to combine what we've done so far and our future plans with your expertise and the ideas you have in mind. I could really use a sharp mind like yours to critique and help further evolve the code base! Right now there is already a substantial amount of functionality in our project that should considerably jumpstart any swing application development effort. The codebase is actively (daily) progressing and will continue to do so over the coming weeks/months as we work towards release candidate form. The mailing list is also starting to get some traffic; and I will be checking in our first set of real samples later this weekend. Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Ben Alex Sent: Friday, May 28, 2004 7:02 PM To: spr...@li... Subject: RE: [Springframework-developer] Spring / Mule integration - step 1 > I am in the thick of things at work so can't really put > enough thought into this to comment much, but I would prefer > to hold this until after > 1.0.3 is out... I just wanted to chime in here and mention what Ross is working towards is strategically very useful for Spring users. By simply adding Mule (which BTW is now configurable directly from a Spring ApplicationContext) Spring users will have the ability to receive events from external sources (JMS, DB, HTTP etc), then transform them into native ApplicationEvents and publish them in the ApplicationContext, and then send ApplicationEvent replies to the ApplicationContext and have Mule send them off to external sources. So Mule acts as an adapter between ApplicationEvents and the external world. Mule can also be used directly to take advantage of the growing library of Mule objects that perform message transformation etc. I recently added some ApplicationEvent support to Acegi Security CVS (login success/password fail events), and am about to embark on a Swing GUI built on top of Spring where it will be used again. It's nice for these sort of internal-to-the-ApplicationContext usages, but if I want to publish a CustomerOrder to a remote CustomerOrderConsumer, it will be nice when Mule can deliver it for me. Best regards Ben ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Guillaume P. <gpo...@gl...> - 2004-05-29 04:12:44
|
I experimented some more about this cleanup issue, and I was able to narrow down the problem to the caching done by the java.beans.Introspector. It stores the BeanInfo instances in a WeakHashMap, but in that Map implementation, only the keys uses WeakReference, the values are stored with hard references since BeanInfo has an hard reference on the class it gives info about (indirectly through BeanDescriptor and others), any time Introspector.getBeanInfo(Class) is used, that class and it's static members will not ever be able to be garbage collected. I kind of remember someone mentioning something related to this in the mailling list, but I cannot find the mail. I wonder if there's other case where the java[x] classes might have an hard reference on a class or its instances. A fix for this particular problem is to have a ServletContextListener call Introspector.flushCaches() when the context is destroyed. It seems like a known issue at Sun : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4291376 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4730581 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809008 So, unless I'm missing something here, that means fixes like using synchronization and WeakReference on singleton probably won't help much if at all. The only way that I can see for a class not to be gargage collected when no more active thread use it, is if another ClassLoader has an hard reference to the class instance, or an instance of that class. Having the class itself have an hard reference on a its own singleton has no effect, it's a circular reference that will not prevent the class or the instance to be gargabe collected when neither is being refered to by something else. Guillaume |
|
From: Mason, R. <ros...@vi...> - 2004-05-29 02:16:09
|
Tmlj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