|
From: <jue...@we...> - 2004-07-31 14:48:35
|
Implement a custom SqlMapClientCallback for this, a la:
=20
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
executor.startBatch();
executor.update(...);
executor.update(...);
executor.executeBatch();
}
});
=20
Generally, a SqlMapClientCallback allows you to call any methods on the =
passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The template =
will automatically convert SQLExceptions to DataAccessExceptions, just =
like it does for the convenience operations defined on the template =
itself.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Stefan D Sookraj
Gesendet: Sa 31.07.2004 16:08
An: spr...@li...
Cc: spr...@li...; cli...@ib...
Betreff: [Springframework-developer] How to do batch with Spring using =
Ibatis
How do you invoke the underlying Ibatis API batch methods from Spring? I =
am
using org.springframework.orm.ibatis.SqlMapClientTemplate, but the =
iBatis
batch API is not exposed. If I use Ibatis API directly, I have to handle
the SQLExceptions. Is this the right way to be able to use the IBatis =
batch
API from Spring? Thank you.
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Stefan D S. <ste...@us...> - 2004-07-31 17:55:06
|
Juergen,
Thank you for the response. I am getting this error trying to implement=
the
code snippit you provided.
At this line I get the error:
Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
Error:
Cannot reduce the visibility of the inherited method from
SqlMapClientCallback
I am doing this in my DAO in my doUpdate method.
Saturday, July 31, 2004 10:51 AM
To: <spr...@li...>
cc:
From: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
Subject: Re: [Springframework-developer] How to do batch with Spring us=
ing
Ibatis
Implement a custom SqlMapClientCallback for this, a la:
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
executor.startBatch();
executor.update(...);
executor.update(...);
executor.executeBatch();
}
});
Generally, a SqlMapClientCallback allows you to call any methods on the=
passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The template =
will
automatically convert SQLExceptions to DataAccessExceptions, just like =
it
does for the convenience operations defined on the template itself.
Juergen
________________________________
Von: spr...@li... im Auftrag v=
on
Stefan D Sookraj
Gesendet: Sa 31.07.2004 16:08
An: spr...@li...
Cc: spr...@li...; cli...@ib...=
m
Betreff: [Springframework-developer] How to do batch with Spring using
Ibatis
How do you invoke the underlying Ibatis API batch methods from Spring? =
I am
using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iBat=
is
batch API is not exposed. If I use Ibatis API directly, I have to handl=
e
the SQLExceptions. Is this the right way to be able to use the IBatis b=
atch
API from Spring? Thank you.
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technolog=
y
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technolog=
y
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer=
=
|
|
From: Thomas R. <tho...@tr...> - 2004-07-31 18:07:44
|
make it 'public' like:
public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
Thomas
Stefan D Sookraj wrote:
>
>
>Juergen,
>Thank you for the response. I am getting this error trying to implement the
>code snippit you provided.
>
>At this line I get the error:
>Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
>
>Error:
>Cannot reduce the visibility of the inherited method from
>SqlMapClientCallback
>
>
>I am doing this in my DAO in my doUpdate method.
>
>
>
>
>
>
>
>
>
>Saturday, July 31, 2004 10:51 AM
>To: <spr...@li...>
>cc:
>From: jürgen höller [werk3AT] <jue...@we...>
>Subject: Re: [Springframework-developer] How to do batch with Spring using
>Ibatis
>
>
>
>Implement a custom SqlMapClientCallback for this, a la:
>
>getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
>Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
> executor.startBatch();
> executor.update(...);
> executor.update(...);
>
> executor.executeBatch();
> }
>});
>
>Generally, a SqlMapClientCallback allows you to call any methods on the
>passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The template will
>automatically convert SQLExceptions to DataAccessExceptions, just like it
>does for the convenience operations defined on the template itself.
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag von
>Stefan D Sookraj
>Gesendet: Sa 31.07.2004 16:08
>An: spr...@li...
>Cc: spr...@li...; cli...@ib...
>Betreff: [Springframework-developer] How to do batch with Spring using
>Ibatis
>
>
>
>
>
>
>
>How do you invoke the underlying Ibatis API batch methods from Spring? I am
>using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iBatis
>batch API is not exposed. If I use Ibatis API directly, I have to handle
>the SQLExceptions. Is this the right way to be able to use the IBatis batch
>API from Spring? Thank you.
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by OSTG. Have you noticed the changes on
>Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
>one more big change to announce. We are now OSTG- Open Source Technology
>Group. Come see the changes on the new OSTG site. www.ostg.com
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by OSTG. Have you noticed the changes on
>Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
>one more big change to announce. We are now OSTG- Open Source Technology
>Group. Come see the changes on the new OSTG site. www.ostg.com
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by OSTG. Have you noticed the changes on
>Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
>one more big change to announce. We are now OSTG- Open Source Technology
>Group. Come see the changes on the new OSTG site. www.ostg.com
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>
|
|
From: Stefan D S. <ste...@us...> - 2004-07-31 18:13:35
|
OK,
I put 'public' in front of the line and that got rid of the error. i.e.
public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLExcepti=
on
now, the only issue I am having is that I am having an error on the passe=
d in business object (fbo).
The error is: 'Cannot refer to a non-final variable fbo inside an inner c=
lass defined in a different method'
public void deleteFamily(FamiliesBO fbo) throws DataAccessException {
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws S=
QLException {
executor.startBatch();
executor.delete("AuthMaint.deleteCatExtendName", fbo.getMetho=
dElement());
Iterator itr =3D fbo.getRepItem().iterator();
while (itr.hasNext()) {
Map m =3D (HashMap) itr.next();
executor.delete("AuthMaint.deleteDocMap", m);
executor.delete("AuthMaint.deleteRepItem", m);
}
executor.delete("AuthMaint.deleteContentEdition", fbo.getMeth=
odElement());
executor.delete("AuthMaint.deleteMthElem", fbo.getMethodEleme=
nt());
executor.executeBatch();
}
});
}
Juergen,
Thank you for the response. I am getting this error trying to implement t=
he code snippit you provided.
At this line I get the error:
Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
Error:
Cannot reduce the visibility of the inherited method from SqlMapClientCal=
lback
I am doing this in my DAO in my doUpdate method.
Saturday, July 31, 2004 10:51 AM
To: <spr...@li...>
cc: =
From: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
Subject: Re: [Springframework-developer] How to do batch with Spring usin=
g Ibatis
Implement a custom SqlMapClientCallback for this, a la:
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
executor.startBatch();
executor.update(...);
executor.update(...);
executor.executeBatch();
}
});
Generally, a SqlMapClientCallback allows you to call any methods on the p=
assed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The template wil=
l automatically convert SQLExceptions to DataAccessExceptions, just like =
it does for the convenience operations defined on the template itself.
Juergen
________________________________
Von: spr...@li... im Auftrag von=
Stefan D Sookraj
Gesendet: Sa 31.07.2004 16:08
An: spr...@li...
Cc: spr...@li...; cli...@ib...
Betreff: [Springframework-developer] How to do batch with Spring using Ib=
atis
How do you invoke the underlying Ibatis API batch methods from Spring? I =
am
using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iBatis=
batch API is not exposed. If I use Ibatis API directly, I have to handle
the SQLExceptions. Is this the right way to be able to use the IBatis bat=
ch
API from Spring? Thank you.
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer=
|
|
From: Dmitriy K. <dko...@ru...> - 2004-07-31 18:20:14
|
Stefan,
declare FamiliesBO argument as final i.e.
public void deleteFamily(final FamiliesBO fbo) throws
DataAccessException {...}
Regards,
Dmitriy.
Stefan D Sookraj wrote:
> OK,
> I put 'public' in front of the line and that got rid of the error. i.e.
>
> public Object doInSqlMapClient(SqlMapExecutor executor) throws
> SQLException
>
> now, the only issue I am having is that I am having an error on the
> passed in business object (fbo).
>
> The error is: 'Cannot refer to a non-final variable fbo inside an
> inner class defined in a different method'
>
>
> public void deleteFamily(FamiliesBO fbo) throws DataAccessException {
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> public Object doInSqlMapClient(SqlMapExecutor executor)
> throws SQLException {
> executor.startBatch();
> executor.delete("AuthMaint.deleteCatExtendName",
> fbo.getMethodElement());
> Iterator itr = fbo.getRepItem().iterator();
> while (itr.hasNext()) {
> Map m = (HashMap) itr.next();
> executor.delete("AuthMaint.deleteDocMap", m);
> executor.delete("AuthMaint.deleteRepItem", m);
> }
> executor.delete("AuthMaint.deleteContentEdition",
> fbo.getMethodElement());
> executor.delete("AuthMaint.deleteMthElem",
> fbo.getMethodElement());
>
> executor.executeBatch();
> }
> });
>
> }
>
>
>
>
>
>
>
>
> Juergen,
> Thank you for the response. I am getting this error trying to
> implement the code snippit you provided.
>
> At this line I get the error:
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
>
> Error:
> Cannot reduce the visibility of the inherited method from
> SqlMapClientCallback
>
>
> I am doing this in my DAO in my doUpdate method.
>
>
>
>
>
>
>
>
>
> Saturday, July 31, 2004 10:51 AM
> To: <spr...@li...>
> cc:
> From: jürgen höller [werk3AT] <jue...@we...>
> Subject: Re: [Springframework-developer] How to do batch with Spring
> using Ibatis
>
>
>
> Implement a custom SqlMapClientCallback for this, a la:
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
> executor.startBatch();
> executor.update(...);
> executor.update(...);
>
> executor.executeBatch();
> }
> });
>
> Generally, a SqlMapClientCallback allows you to call any methods on
> the passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The
> template will automatically convert SQLExceptions to
> DataAccessExceptions, just like it does for the convenience operations
> defined on the template itself.
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im Auftrag
> von Stefan D Sookraj
> Gesendet: Sa 31.07.2004 16:08
> An: spr...@li...
> Cc: spr...@li...; cli...@ib...
> Betreff: [Springframework-developer] How to do batch with Spring using
> Ibatis
>
>
>
>
>
>
>
> How do you invoke the underlying Ibatis API batch methods from Spring?
> I am
> using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iBatis
> batch API is not exposed. If I use Ibatis API directly, I have to handle
> the SQLExceptions. Is this the right way to be able to use the IBatis
> batch
> API from Spring? Thank you.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Dmitriy K. <dko...@ru...> - 2004-07-31 18:26:08
|
Oops, didn't see your email. Glad that you solved it ;-)
Cheers,
Dmitriy.
Dmitriy Kopylenko wrote:
> Stefan,
>
> declare FamiliesBO argument as final i.e.
>
> public void deleteFamily(final FamiliesBO fbo) throws
> DataAccessException {...}
>
> Regards,
> Dmitriy.
>
>
> Stefan D Sookraj wrote:
>
>> OK,
>> I put 'public' in front of the line and that got rid of the error. i.e.
>>
>> public Object doInSqlMapClient(SqlMapExecutor executor) throws
>> SQLException
>>
>> now, the only issue I am having is that I am having an error on the
>> passed in business object (fbo).
>>
>> The error is: 'Cannot refer to a non-final variable fbo inside an
>> inner class defined in a different method'
>>
>>
>> public void deleteFamily(FamiliesBO fbo) throws DataAccessException {
>>
>> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
>> public Object doInSqlMapClient(SqlMapExecutor executor)
>> throws SQLException {
>> executor.startBatch();
>> executor.delete("AuthMaint.deleteCatExtendName",
>> fbo.getMethodElement());
>> Iterator itr = fbo.getRepItem().iterator();
>> while (itr.hasNext()) {
>> Map m = (HashMap) itr.next();
>> executor.delete("AuthMaint.deleteDocMap", m);
>> executor.delete("AuthMaint.deleteRepItem", m);
>> }
>> executor.delete("AuthMaint.deleteContentEdition",
>> fbo.getMethodElement());
>> executor.delete("AuthMaint.deleteMthElem",
>> fbo.getMethodElement());
>>
>> executor.executeBatch();
>> }
>> });
>>
>> }
>>
>>
>>
>>
>>
>>
>>
>>
>> Juergen,
>> Thank you for the response. I am getting this error trying to
>> implement the code snippit you provided.
>>
>> At this line I get the error:
>> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
>>
>> Error:
>> Cannot reduce the visibility of the inherited method from
>> SqlMapClientCallback
>>
>>
>> I am doing this in my DAO in my doUpdate method.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Saturday, July 31, 2004 10:51 AM
>> To: <spr...@li...>
>> cc:
>> From: jürgen höller [werk3AT] <jue...@we...>
>> Subject: Re: [Springframework-developer] How to do batch with Spring
>> using Ibatis
>>
>>
>>
>> Implement a custom SqlMapClientCallback for this, a la:
>>
>> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
>> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
>> executor.startBatch();
>> executor.update(...);
>> executor.update(...);
>>
>> executor.executeBatch();
>> }
>> });
>>
>> Generally, a SqlMapClientCallback allows you to call any methods on
>> the passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The
>> template will automatically convert SQLExceptions to
>> DataAccessExceptions, just like it does for the convenience
>> operations defined on the template itself.
>>
>> Juergen
>>
>>
>> ________________________________
>>
>> Von: spr...@li... im Auftrag
>> von Stefan D Sookraj
>> Gesendet: Sa 31.07.2004 16:08
>> An: spr...@li...
>> Cc: spr...@li...; cli...@ib...
>> Betreff: [Springframework-developer] How to do batch with Spring
>> using Ibatis
>>
>>
>>
>>
>>
>>
>>
>> How do you invoke the underlying Ibatis API batch methods from
>> Spring? I am
>> using org.springframework.orm.ibatis.SqlMapClientTemplate, but the
>> iBatis
>> batch API is not exposed. If I use Ibatis API directly, I have to handle
>> the SQLExceptions. Is this the right way to be able to use the IBatis
>> batch
>> API from Spring? Thank you.
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
>> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
>> one more big change to announce. We are now OSTG- Open Source Technology
>> Group. Come see the changes on the new OSTG site. www.ostg.com
>> _______________________________________________
>> Springframework-developer mailing list
>> Spr...@li...
>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
>> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
>> one more big change to announce. We are now OSTG- Open Source Technology
>> Group. Come see the changes on the new OSTG site. www.ostg.com
>> _______________________________________________
>> Springframework-developer mailing list
>> Spr...@li...
>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Stefan D S. <ste...@us...> - 2004-07-31 18:15:55
|
Thomas,
Thanks for the input, actually I just did that and it fixed that proble=
m. I
just sent another reply indicating that a new problem with referring to=
the
passed-in business object. Please assist if you would. Thank you.
make it 'public' like:
public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException
Thomas
Stefan D Sookraj wrote:
>
>
>Juergen,
>Thank you for the response. I am getting this error trying to implemen=
t
the
>code snippit you provided.
>
>At this line I get the error:
>Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
>
>Error:
>Cannot reduce the visibility of the inherited method from
>SqlMapClientCallback
>
>
>I am doing this in my DAO in my doUpdate method.
>
>
>
>
>
>
>
>
>
>Saturday, July 31, 2004 10:51 AM
>To: <spr...@li...>
>cc:
>From: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
>Subject: Re: [Springframework-developer] How to do batch with Spring u=
sing
>Ibatis
>
>
>
>Implement a custom SqlMapClientCallback for this, a la:
>
>getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
>Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {=
> executor.startBatch();
> executor.update(...);
> executor.update(...);
>
> executor.executeBatch();
> }
>});
>
>Generally, a SqlMapClientCallback allows you to call any methods on th=
e
>passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The template=
will
>automatically convert SQLExceptions to DataAccessExceptions, just like=
it
>does for the convenience operations defined on the template itself.
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag =
von
>Stefan D Sookraj
>Gesendet: Sa 31.07.2004 16:08
>An: spr...@li...
>Cc: spr...@li...; clinton.begin@ibatis.c=
om
>Betreff: [Springframework-developer] How to do batch with Spring using=
>Ibatis
>
>
>
>
>
>
>
>How do you invoke the underlying Ibatis API batch methods from Spring?=
I
am
>using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iBa=
tis
>batch API is not exposed. If I use Ibatis API directly, I have to hand=
le
>the SQLExceptions. Is this the right way to be able to use the IBatis
batch
>API from Spring? Thank you.
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by OSTG. Have you noticed the changes o=
n
>Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,=
>one more big change to announce. We are now OSTG- Open Source Technolo=
gy
>Group. Come see the changes on the new OSTG site. www.ostg.com
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer=
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by OSTG. Have you noticed the changes o=
n
>Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,=
>one more big change to announce. We are now OSTG- Open Source Technolo=
gy
>Group. Come see the changes on the new OSTG site. www.ostg.com
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-develope=
r
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by OSTG. Have you noticed the changes o=
n
>Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,=
>one more big change to announce. We are now OSTG- Open Source Technolo=
gy
>Group. Come see the changes on the new OSTG site. www.ostg.com
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer=
>
>
>
>
>
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technolog=
y
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer=
=
|
|
From: Stefan D S. <ste...@us...> - 2004-07-31 18:20:16
|
Never mind guys, I got it to work. I just had to put the work 'final' in =
the parameter signature.
public void deleteFamily(final FamiliesBO fbo) throws DataAccessException=
{
Thanks for all your help.
OK,
I put 'public' in front of the line and that got rid of the error. i.e.
public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLExcepti=
on
now, the only issue I am having is that I am having an error on the passe=
d in business object (fbo).
The error is: 'Cannot refer to a non-final variable fbo inside an inner c=
lass defined in a different method'
public void deleteFamily(FamiliesBO fbo) throws DataAccessException {
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws S=
QLException {
executor.startBatch();
executor.delete("AuthMaint.deleteCatExtendName", fbo.getMetho=
dElement());
Iterator itr =3D fbo.getRepItem().iterator();
while (itr.hasNext()) {
Map m =3D (HashMap) itr.next();
executor.delete("AuthMaint.deleteDocMap", m);
executor.delete("AuthMaint.deleteRepItem", m);
}
executor.delete("AuthMaint.deleteContentEdition", fbo.getMeth=
odElement());
executor.delete("AuthMaint.deleteMthElem", fbo.getMethodEleme=
nt());
executor.executeBatch();
}
});
}
Juergen,
Thank you for the response. I am getting this error trying to implement t=
he code snippit you provided.
At this line I get the error:
Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
Error:
Cannot reduce the visibility of the inherited method from SqlMapClientCal=
lback
I am doing this in my DAO in my doUpdate method.
Saturday, July 31, 2004 10:51 AM
To: <spr...@li...>
cc: =
From: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
Subject: Re: [Springframework-developer] How to do batch with Spring usin=
g Ibatis
Implement a custom SqlMapClientCallback for this, a la:
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
executor.startBatch();
executor.update(...);
executor.update(...);
executor.executeBatch();
}
});
Generally, a SqlMapClientCallback allows you to call any methods on the p=
assed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The template wil=
l automatically convert SQLExceptions to DataAccessExceptions, just like =
it does for the convenience operations defined on the template itself.
Juergen
________________________________
Von: spr...@li... im Auftrag von=
Stefan D Sookraj
Gesendet: Sa 31.07.2004 16:08
An: spr...@li...
Cc: spr...@li...; cli...@ib...
Betreff: [Springframework-developer] How to do batch with Spring using Ib=
atis
How do you invoke the underlying Ibatis API batch methods from Spring? I =
am
using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iBatis=
batch API is not exposed. If I use Ibatis API directly, I have to handle
the SQLExceptions. Is this the right way to be able to use the IBatis bat=
ch
API from Spring? Thank you.
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer=
|
|
From: Stefan D S. <ste...@us...> - 2004-07-31 18:28:51
|
Thanks Dmitriy! Actually I had done that and it fixed the problem. Now,=
what I am noticing is that before using the batch all my statements woe=
re
done in one transaction, now using the executor, it appears that every
statement is now done in its own transaction. Why would this be the cas=
e?
Stefan,
declare FamiliesBO argument as final i.e.
public void deleteFamily(final FamiliesBO fbo) throws
DataAccessException {...}
Regards,
Dmitriy.
Stefan D Sookraj wrote:
> OK,
> I put 'public' in front of the line and that got rid of the error. i.=
e.
>
> public Object doInSqlMapClient(SqlMapExecutor executor) throws
> SQLException
>
> now, the only issue I am having is that I am having an error on the
> passed in business object (fbo).
>
> The error is: 'Cannot refer to a non-final variable fbo inside an
> inner class defined in a different method'
>
>
> public void deleteFamily(FamiliesBO fbo) throws DataAccessException {=
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> public Object doInSqlMapClient(SqlMapExecutor executor)
> throws SQLException {
> executor.startBatch();
> executor.delete("AuthMaint.deleteCatExtendName",
> fbo.getMethodElement());
> Iterator itr =3D fbo.getRepItem().iterator();
> while (itr.hasNext()) {
> Map m =3D (HashMap) itr.next();
> executor.delete("AuthMaint.deleteDocMap", m);
> executor.delete("AuthMaint.deleteRepItem", m);
> }
> executor.delete("AuthMaint.deleteContentEdition",
> fbo.getMethodElement());
> executor.delete("AuthMaint.deleteMthElem",
> fbo.getMethodElement());
>
> executor.executeBatch();
> }
> });
>
> }
>
>
>
>
>
>
>
>
> Juergen,
> Thank you for the response. I am getting this error trying to
> implement the code snippit you provided.
>
> At this line I get the error:
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
>
> Error:
> Cannot reduce the visibility of the inherited method from
> SqlMapClientCallback
>
>
> I am doing this in my DAO in my doUpdate method.
>
>
>
>
>
>
>
>
>
> Saturday, July 31, 2004 10:51 AM
> To: <spr...@li...>
> cc:
> From: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
> Subject: Re: [Springframework-developer] How to do batch with Spring
> using Ibatis
>
>
>
> Implement a custom SqlMapClientCallback for this, a la:
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException =
{
> executor.startBatch();
> executor.update(...);
> executor.update(...);
>
> executor.executeBatch();
> }
> });
>
> Generally, a SqlMapClientCallback allows you to call any methods on
> the passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The
> template will automatically convert SQLExceptions to
> DataAccessExceptions, just like it does for the convenience operation=
s
> defined on the template itself.
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im Auftrag=
> von Stefan D Sookraj
> Gesendet: Sa 31.07.2004 16:08
> An: spr...@li...
> Cc: spr...@li...; clinton.begin@ibatis.=
com
> Betreff: [Springframework-developer] How to do batch with Spring usin=
g
> Ibatis
>
>
>
>
>
>
>
> How do you invoke the underlying Ibatis API batch methods from Spring=
?
> I am
> using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iB=
atis
> batch API is not exposed. If I use Ibatis API directly, I have to han=
dle
> the SQLExceptions. Is this the right way to be able to use the IBatis=
> batch
> API from Spring? Thank you.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes =
on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now=
,
> one more big change to announce. We are now OSTG- Open Source Technol=
ogy
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-develope=
r
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes =
on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now=
,
> one more big change to announce. We are now OSTG- Open Source Technol=
ogy
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-develope=
r
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technolog=
y
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer=
=
|
|
From: Stefan D S. <ste...@us...> - 2004-07-31 18:48:05
|
I made a mistake, the transactions I mentioned was for something else. He=
re is what is really happening. I put a log statement just when entering =
and exiting the call to deleteFamily and here is where the application ha=
ngs (The browser is also hanging waiting for a response)
2004-07-31 14:43:50,841 DEBUG [com.ibm.method.web.manage.FamiliesAddUpdat=
eDelController] - <Entering deleteFamily(fbo)...........>
2004-07-31 14:43:50,841 DEBUG [java.sql.Connection] - <{conn-100135} Conn=
ection>
It appears it is not coming out of the deleteFamily method which now look=
s like this:
public void deleteFamily(final FamiliesBO fbo) throws DataAccessException=
{
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws S=
QLException {
executor.startBatch();
executor.delete("AuthMaint.deleteCatExtendName", fbo.getMetho=
dElement());
Iterator itr =3D fbo.getRepItem().iterator();
while (itr.hasNext()) {
Map m =3D (HashMap) itr.next();
executor.delete("AuthMaint.deleteDocMap", m);
executor.delete("AuthMaint.deleteRepItem", m);
}
executor.delete("AuthMaint.deleteContentEdition", fbo.getMeth=
odElement());
executor.delete("AuthMaint.deleteMthElem", fbo.getMethodEleme=
nt());
executor.executeBatch();
=
return null;
}
});
}
Thanks Dmitriy! Actually I had done that and it fixed the problem. Now,
what I am noticing is that before using the batch all my statements woere=
done in one transaction, now using the executor, it appears that every
statement is now done in its own transaction. Why would this be the case?=
Stefan,
declare FamiliesBO argument as final i.e.
public void deleteFamily(final FamiliesBO fbo) throws
DataAccessException {...}
Regards,
Dmitriy.
Stefan D Sookraj wrote:
> OK,
> I put 'public' in front of the line and that got rid of the error. i.e.=
>
> public Object doInSqlMapClient(SqlMapExecutor executor) throws
> SQLException
>
> now, the only issue I am having is that I am having an error on the
> passed in business object (fbo).
>
> The error is: 'Cannot refer to a non-final variable fbo inside an
> inner class defined in a different method'
>
>
> public void deleteFamily(FamiliesBO fbo) throws DataAccessException {
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> public Object doInSqlMapClient(SqlMapExecutor executor)
> throws SQLException {
> executor.startBatch();
> executor.delete("AuthMaint.deleteCatExtendName",
> fbo.getMethodElement());
> Iterator itr =3D fbo.getRepItem().iterator();
> while (itr.hasNext()) {
> Map m =3D (HashMap) itr.next();
> executor.delete("AuthMaint.deleteDocMap", m);
> executor.delete("AuthMaint.deleteRepItem", m);
> }
> executor.delete("AuthMaint.deleteContentEdition",
> fbo.getMethodElement());
> executor.delete("AuthMaint.deleteMthElem",
> fbo.getMethodElement());
>
> executor.executeBatch();
> }
> });
>
> }
>
>
>
>
>
>
>
>
> Juergen,
> Thank you for the response. I am getting this error trying to
> implement the code snippit you provided.
>
> At this line I get the error:
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
>
> Error:
> Cannot reduce the visibility of the inherited method from
> SqlMapClientCallback
>
>
> I am doing this in my DAO in my doUpdate method.
>
>
>
>
>
>
>
>
>
> Saturday, July 31, 2004 10:51 AM
> To: <spr...@li...>
> cc:
> From: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
> Subject: Re: [Springframework-developer] How to do batch with Spring
> using Ibatis
>
>
>
> Implement a custom SqlMapClientCallback for this, a la:
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
> executor.startBatch();
> executor.update(...);
> executor.update(...);
>
> executor.executeBatch();
> }
> });
>
> Generally, a SqlMapClientCallback allows you to call any methods on
> the passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The
> template will automatically convert SQLExceptions to
> DataAccessExceptions, just like it does for the convenience operations
> defined on the template itself.
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im Auftrag
> von Stefan D Sookraj
> Gesendet: Sa 31.07.2004 16:08
> An: spr...@li...
> Cc: spr...@li...; cli...@ib...=
m
> Betreff: [Springframework-developer] How to do batch with Spring using
> Ibatis
>
>
>
>
>
>
>
> How do you invoke the underlying Ibatis API batch methods from Spring?
> I am
> using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iBat=
is
> batch API is not exposed. If I use Ibatis API directly, I have to handl=
e
> the SQLExceptions. Is this the right way to be able to use the IBatis
> batch
> API from Spring? Thank you.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technolog=
y
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technolog=
y
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
2004-07-31 14:43:50,841 DEBUG [com.ibm.method.web.manage.FamiliesAddUpdat=
eDelController] - <Entering deleteFamily(fbo)...........>
2004-07-31 14:43:50,841 DEBUG [java.sql.Connection] - <{conn-100135} Conn=
ection>=
|
|
From: Stefan D S. <ste...@us...> - 2004-07-31 18:56:21
|
Ok, my application is hung at the line :
executor.executeBatch();
Why would this happen?
I made a mistake, the transactions I mentioned was for something else. He=
re is what is really happening. I put a log statement just when entering =
and exiting the call to deleteFamily and here is where the application ha=
ngs (The browser is also hanging waiting for a response)
2004-07-31 14:43:50,841 DEBUG [com.ibm.method.web.manage.FamiliesAddUpdat=
eDelController] - <Entering deleteFamily(fbo)...........>
2004-07-31 14:43:50,841 DEBUG [java.sql.Connection] - <{conn-100135} Conn=
ection>
It appears it is not coming out of the deleteFamily method which now look=
s like this:
public void deleteFamily(final FamiliesBO fbo) throws DataAccessException=
{
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws S=
QLException {
executor.startBatch();
executor.delete("AuthMaint.deleteCatExtendName", fbo.getMetho=
dElement());
Iterator itr =3D fbo.getRepItem().iterator();
while (itr.hasNext()) {
Map m =3D (HashMap) itr.next();
executor.delete("AuthMaint.deleteDocMap", m);
executor.delete("AuthMaint.deleteRepItem", m);
}
executor.delete("AuthMaint.deleteContentEdition", fbo.getMeth=
odElement());
executor.delete("AuthMaint.deleteMthElem", fbo.getMethodEleme=
nt());
executor.executeBatch();
=
return null;
}
});
}
Thanks Dmitriy! Actually I had done that and it fixed the problem. Now,
what I am noticing is that before using the batch all my statements woere=
done in one transaction, now using the executor, it appears that every
statement is now done in its own transaction. Why would this be the case?=
Stefan,
declare FamiliesBO argument as final i.e.
public void deleteFamily(final FamiliesBO fbo) throws
DataAccessException {...}
Regards,
Dmitriy.
Stefan D Sookraj wrote:
> OK,
> I put 'public' in front of the line and that got rid of the error. i.e.=
>
> public Object doInSqlMapClient(SqlMapExecutor executor) throws
> SQLException
>
> now, the only issue I am having is that I am having an error on the
> passed in business object (fbo).
>
> The error is: 'Cannot refer to a non-final variable fbo inside an
> inner class defined in a different method'
>
>
> public void deleteFamily(FamiliesBO fbo) throws DataAccessException {
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> public Object doInSqlMapClient(SqlMapExecutor executor)
> throws SQLException {
> executor.startBatch();
> executor.delete("AuthMaint.deleteCatExtendName",
> fbo.getMethodElement());
> Iterator itr =3D fbo.getRepItem().iterator();
> while (itr.hasNext()) {
> Map m =3D (HashMap) itr.next();
> executor.delete("AuthMaint.deleteDocMap", m);
> executor.delete("AuthMaint.deleteRepItem", m);
> }
> executor.delete("AuthMaint.deleteContentEdition",
> fbo.getMethodElement());
> executor.delete("AuthMaint.deleteMthElem",
> fbo.getMethodElement());
>
> executor.executeBatch();
> }
> });
>
> }
>
>
>
>
>
>
>
>
> Juergen,
> Thank you for the response. I am getting this error trying to
> implement the code snippit you provided.
>
> At this line I get the error:
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
>
> Error:
> Cannot reduce the visibility of the inherited method from
> SqlMapClientCallback
>
>
> I am doing this in my DAO in my doUpdate method.
>
>
>
>
>
>
>
>
>
> Saturday, July 31, 2004 10:51 AM
> To: <spr...@li...>
> cc:
> From: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
> Subject: Re: [Springframework-developer] How to do batch with Spring
> using Ibatis
>
>
>
> Implement a custom SqlMapClientCallback for this, a la:
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
> executor.startBatch();
> executor.update(...);
> executor.update(...);
>
> executor.executeBatch();
> }
> });
>
> Generally, a SqlMapClientCallback allows you to call any methods on
> the passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The
> template will automatically convert SQLExceptions to
> DataAccessExceptions, just like it does for the convenience operations
> defined on the template itself.
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im Auftrag
> von Stefan D Sookraj
> Gesendet: Sa 31.07.2004 16:08
> An: spr...@li...
> Cc: spr...@li...; cli...@ib...=
m
> Betreff: [Springframework-developer] How to do batch with Spring using
> Ibatis
>
>
>
>
>
>
>
> How do you invoke the underlying Ibatis API batch methods from Spring?
> I am
> using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iBat=
is
> batch API is not exposed. If I use Ibatis API directly, I have to handl=
e
> the SQLExceptions. Is this the right way to be able to use the IBatis
> batch
> API from Spring? Thank you.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technolog=
y
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technolog=
y
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
2004-07-31 14:43:50,841 DEBUG [com.ibm.method.web.manage.FamiliesAddUpdat=
eDelController] - <Entering deleteFamily(fbo)...........>
2004-07-31 14:43:50,841 DEBUG [java.sql.Connection] - <{conn-100135} Conn=
ection>=
|
|
From: Stefan D S. <ste...@us...> - 2004-07-31 22:02:36
|
I still canot get pass why the application hangs on this particular line:=
=
executor.executeBatch();
I know that executor is an Ibatis API, but is there anything else in Spri=
ng that needs to be configured to use it appropriately? Thanks.
Subject: Re: [Springframework-developer] How to do batch with Spring usin=
g Ibatis
Ok, my application is hung at the line :
executor.executeBatch();
Why would this happen?
=
I made a mistake, the transactions I mentioned was for something else. He=
re is what is really happening. I put a log statement just when entering =
and exiting the call to deleteFamily and here is where the application ha=
ngs (The browser is also hanging waiting for a response)
2004-07-31 14:43:50,841 DEBUG [com.ibm.method.web.manage.FamiliesAddUpdat=
eDelController] - <Entering deleteFamily(fbo)...........>
2004-07-31 14:43:50,841 DEBUG [java.sql.Connection] - <{conn-100135} Conn=
ection>
It appears it is not coming out of the deleteFamily method which now look=
s like this:
public void deleteFamily(final FamiliesBO fbo) throws DataAccessException=
{
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws S=
QLException {
executor.startBatch();
executor.delete("AuthMaint.deleteCatExtendName", fbo.getMetho=
dElement());
Iterator itr =3D fbo.getRepItem().iterator();
while (itr.hasNext()) {
Map m =3D (HashMap) itr.next();
executor.delete("AuthMaint.deleteDocMap", m);
executor.delete("AuthMaint.deleteRepItem", m);
}
executor.delete("AuthMaint.deleteContentEdition", fbo.getMeth=
odElement());
executor.delete("AuthMaint.deleteMthElem", fbo.getMethodEleme=
nt());
executor.executeBatch();
=
return null;
}
});
}
Thanks Dmitriy! Actually I had done that and it fixed the problem. Now,
what I am noticing is that before using the batch all my statements woere=
done in one transaction, now using the executor, it appears that every
statement is now done in its own transaction. Why would this be the case?=
Stefan,
declare FamiliesBO argument as final i.e.
public void deleteFamily(final FamiliesBO fbo) throws
DataAccessException {...}
Regards,
Dmitriy.
Stefan D Sookraj wrote:
> OK,
> I put 'public' in front of the line and that got rid of the error. i.e.=
>
> public Object doInSqlMapClient(SqlMapExecutor executor) throws
> SQLException
>
> now, the only issue I am having is that I am having an error on the
> passed in business object (fbo).
>
> The error is: 'Cannot refer to a non-final variable fbo inside an
> inner class defined in a different method'
>
>
> public void deleteFamily(FamiliesBO fbo) throws DataAccessException {
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> public Object doInSqlMapClient(SqlMapExecutor executor)
> throws SQLException {
> executor.startBatch();
> executor.delete("AuthMaint.deleteCatExtendName",
> fbo.getMethodElement());
> Iterator itr =3D fbo.getRepItem().iterator();
> while (itr.hasNext()) {
> Map m =3D (HashMap) itr.next();
> executor.delete("AuthMaint.deleteDocMap", m);
> executor.delete("AuthMaint.deleteRepItem", m);
> }
> executor.delete("AuthMaint.deleteContentEdition",
> fbo.getMethodElement());
> executor.delete("AuthMaint.deleteMthElem",
> fbo.getMethodElement());
>
> executor.executeBatch();
> }
> });
>
> }
>
>
>
>
>
>
>
>
> Juergen,
> Thank you for the response. I am getting this error trying to
> implement the code snippit you provided.
>
> At this line I get the error:
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
>
> Error:
> Cannot reduce the visibility of the inherited method from
> SqlMapClientCallback
>
>
> I am doing this in my DAO in my doUpdate method.
>
>
>
>
>
>
>
>
>
> Saturday, July 31, 2004 10:51 AM
> To: <spr...@li...>
> cc:
> From: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
> Subject: Re: [Springframework-developer] How to do batch with Spring
> using Ibatis
>
>
>
> Implement a custom SqlMapClientCallback for this, a la:
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
> executor.startBatch();
> executor.update(...);
> executor.update(...);
>
> executor.executeBatch();
> }
> });
>
> Generally, a SqlMapClientCallback allows you to call any methods on
> the passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The
> template will automatically convert SQLExceptions to
> DataAccessExceptions, just like it does for the convenience operations
> defined on the template itself.
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im Auftrag
> von Stefan D Sookraj
> Gesendet: Sa 31.07.2004 16:08
> An: spr...@li...
> Cc: spr...@li...; cli...@ib...=
m
> Betreff: [Springframework-developer] How to do batch with Spring using
> Ibatis
>
>
>
>
>
>
>
> How do you invoke the underlying Ibatis API batch methods from Spring?
> I am
> using org.springframework.orm.ibatis.SqlMapClientTemplate, but the iBat=
is
> batch API is not exposed. If I use Ibatis API directly, I have to handl=
e
> the SQLExceptions. Is this the right way to be able to use the IBatis
> batch
> API from Spring? Thank you.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technolog=
y
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on=
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technolog=
y
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
2004-07-31 14:43:50,841 DEBUG [com.ibm.method.web.manage.FamiliesAddUpdat=
eDelController] - <Entering deleteFamily(fbo)...........>
2004-07-31 14:43:50,841 DEBUG [java.sql.Connection] - <{conn-100135} Conn=
ection>=
|
|
From: <jue...@we...> - 2004-07-31 22:11:14
|
There's nothing special to do in Spring here, so I assume it's an iBATIS =
problem. Maybe post this on the iBATIS forum?
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Stefan D Sookraj
Gesendet: So 01.08.2004 00:01
An: spr...@li...
Cc: cli...@ib...
Betreff: Re: [Springframework-developer] How to do batch with Spring =
using Ibatis
I still canot get pass why the application hangs on this particular =
line:=20
=20
executor.executeBatch();
=20
I know that executor is an Ibatis API, but is there anything else in =
Spring that needs to be configured to use it appropriately? Thanks.
=20
=20
=20
=20
=20
Subject: Re: [Springframework-developer] How to do batch with Spring =
using Ibatis
Ok, my application is hung at the line :
=20
executor.executeBatch();
=20
=20
Why would this happen?
=20
=20
=20
=20
=20
=20
=20
=20
=20
I made a mistake, the transactions I mentioned was for something else. =
Here is what is really happening. I put a log statement just when =
entering and exiting the call to deleteFamily and here is where the =
application hangs (The browser is also hanging waiting for a response)
=20
=20
2004-07-31 14:43:50,841 DEBUG =
[com.ibm.method.web.manage.FamiliesAddUpdateDelController] - <Entering =
deleteFamily(fbo)...........>
2004-07-31 14:43:50,841 DEBUG [java.sql.Connection] - <{conn-100135} =
Connection>
=20
=20
=20
It appears it is not coming out of the deleteFamily method which now =
looks like this:
=20
=20
public void deleteFamily(final FamiliesBO fbo) throws =
DataAccessException {
=20
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws =
SQLException {
executor.startBatch();
executor.delete("AuthMaint.deleteCatExtendName", =
fbo.getMethodElement());
Iterator itr =3D fbo.getRepItem().iterator();
while (itr.hasNext()) {
Map m =3D (HashMap) itr.next();
executor.delete("AuthMaint.deleteDocMap", m);
executor.delete("AuthMaint.deleteRepItem", m);
}
executor.delete("AuthMaint.deleteContentEdition", =
fbo.getMethodElement());
executor.delete("AuthMaint.deleteMthElem", =
fbo.getMethodElement());
=20
executor.executeBatch();
=20
return null;
}
});
=20
}
=20
=20
=20
=20
=20
=20
=20
=20
=20
=20
=20
Thanks Dmitriy! Actually I had done that and it fixed the problem. Now,
what I am noticing is that before using the batch all my statements =
woere
done in one transaction, now using the executor, it appears that every
statement is now done in its own transaction. Why would this be the =
case?
=20
=20
=20
=20
=20
Stefan,
=20
declare FamiliesBO argument as final i.e.
=20
public void deleteFamily(final FamiliesBO fbo) throws
DataAccessException {...}
=20
Regards,
Dmitriy.
=20
=20
Stefan D Sookraj wrote:
=20
> OK,
> I put 'public' in front of the line and that got rid of the error. =
i.e.
>
> public Object doInSqlMapClient(SqlMapExecutor executor) throws
> SQLException
>
> now, the only issue I am having is that I am having an error on the
> passed in business object (fbo).
>
> The error is: 'Cannot refer to a non-final variable fbo inside an
> inner class defined in a different method'
>
>
> public void deleteFamily(FamiliesBO fbo) throws DataAccessException {
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> public Object doInSqlMapClient(SqlMapExecutor executor)
> throws SQLException {
> executor.startBatch();
> executor.delete("AuthMaint.deleteCatExtendName",
> fbo.getMethodElement());
> Iterator itr =3D fbo.getRepItem().iterator();
> while (itr.hasNext()) {
> Map m =3D (HashMap) itr.next();
> executor.delete("AuthMaint.deleteDocMap", m);
> executor.delete("AuthMaint.deleteRepItem", m);
> }
> executor.delete("AuthMaint.deleteContentEdition",
> fbo.getMethodElement());
> executor.delete("AuthMaint.deleteMthElem",
> fbo.getMethodElement());
>
> executor.executeBatch();
> }
> });
>
> }
>
>
>
>
>
>
>
>
> Juergen,
> Thank you for the response. I am getting this error trying to
> implement the code snippit you provided.
>
> At this line I get the error:
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException
>
> Error:
> Cannot reduce the visibility of the inherited method from
> SqlMapClientCallback
>
>
> I am doing this in my DAO in my doUpdate method.
>
>
>
>
>
>
>
>
>
> Saturday, July 31, 2004 10:51 AM
> To: <spr...@li...>
> cc:
> From: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
> Subject: Re: [Springframework-developer] How to do batch with Spring
> using Ibatis
>
>
>
> Implement a custom SqlMapClientCallback for this, a la:
>
> getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
> Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
> executor.startBatch();
> executor.update(...);
> executor.update(...);
>
> executor.executeBatch();
> }
> });
>
> Generally, a SqlMapClientCallback allows you to call any methods on
> the passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The
> template will automatically convert SQLExceptions to
> DataAccessExceptions, just like it does for the convenience operations
> defined on the template itself.
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im Auftrag
> von Stefan D Sookraj
> Gesendet: Sa 31.07.2004 16:08
> An: spr...@li...
> Cc: spr...@li...; =
cli...@ib...
> Betreff: [Springframework-developer] How to do batch with Spring using
> Ibatis
>
>
>
>
>
>
>
> How do you invoke the underlying Ibatis API batch methods from Spring?
> I am
> using org.springframework.orm.ibatis.SqlMapClientTemplate, but the =
iBatis
> batch API is not exposed. If I use Ibatis API directly, I have to =
handle
> the SQLExceptions. Is this the right way to be able to use the IBatis
> batch
> API from Spring? Thank you.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes =
on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source =
Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes =
on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source =
Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> 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 OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
=20
=20
=20
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
2004-07-31 14:43:50,841 DEBUG =
[com.ibm.method.web.manage.FamiliesAddUpdateDelController] - <Entering =
deleteFamily(fbo)...........>
2004-07-31 14:43:50,841 DEBUG [java.sql.Connection] - <{conn-100135} =
Connection>
|