Oh, right, duh...
Type: Posts; User: Radish; Keyword(s):
Oh, right, duh...
I need a little clarification - I should write a custom BeanPostProcessor then to handle this?
No, that came about through tinkering and curiosity about what happens when. In general I don't log things like setter.
Thank you for your solution as well!
I've got a custom logger annotation that is based off this post: http://jgeeks.blogspot.com/2008/10/auto-injection-of-logger-into-spring.html
It works fine unless I try to use the...
I've got a class that looks something like this:
public class ChangeQuantityTransaction extends AbstractTransaction
I've got a DAO that I'd declared in my applicationContext.xml like so:
<bean id="userDao" class="mypackage.dao.impl.UserDaoSpring" />
I read in the reference guide here that the...
Davey, you've saved me!
It's so obvious now but that did the trick. I think what happened was I was tinkering with SimpleJdbcTemplate which supports named parameters, and at some point I...
The SQL generated by Spring looks exactly the same as what I passed in:
17:17:13,076 DEBUG core.JdbcTemplate - Executing prepared SQL update
17:17:13,087 DEBUG core.JdbcTemplate - Executing...
Does anyone have any ideas about this? I'm really stuck and the problem doesn't make sense to me, that using the MapSQLParameterSource fails but pulling the individual values out of it...
Java 6, Oracle 10g, Spring 3.0.5.
I've got a simple delete query:
JdbcTemplate jt = new JdbcTemplate(dataSource);
String sqlStr = "DELETE FROM mytab WHERE someval = :someval";...
I'm slowly changing our database access calls to use Spring JDBC instead of straight JDBC calls (Connections and Statements). We're using Oracle 10g.
I have an insert query that...
I posted the same question at Stack Overflow and the answer came back "no". Referencing that here in case someone else ever needs the answer:
I've been around long enough to know that when a lot of people haven't run into the same problem, then the problem is likely me.
The question was impossible to answer given the information I...
If I get a data source this way:
<bean id="dataSource" class="my.data.Source" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
Whenever I undeploy my webapp I get a couple of stack traces and a dump to ajcore.blah blah.txt. I have debug turned on and this is the last entry:
How then should I do a "like" query, such as:
SELECT COUNT(*) FROM table WHERE columnval like 'happy%'
I need to use wildcards in this particular instance, as it's...
In my app I call
SELECT COUNT(*) FROM table WHERE columnval=?
Is there any advantage to making that a prepared statement, using PreparedStatementCreator?
In general, does it...
We're switching from direct JDBC calls to using Spring JDBC. One of the things we do is to tag our connections with something like this:
CallableStatement pstmt =...