If your DAOs extends JdbcDaoSupport, you have the option to use either approach. If you only a set a DataSource, then a JdbcTemplate will be created for you. But if you supply your own...
Type: Posts; User: wpoitras; Keyword(s):
If your DAOs extends JdbcDaoSupport, you have the option to use either approach. If you only a set a DataSource, then a JdbcTemplate will be created for you. But if you supply your own...
How many threads are executing this code? The number of connections seems a little low. It should definitely be larger than the maximum number of threads that will execute the code
You only list one parameter (besides the results), yet you also setFunction(true), so it thinks the one parameter is the output parameter.
Either setFunction(false) or if the stored procedure try...
I would recommend that all of your services remove their "ejb"-ness first. Usually that means implementing your service interfaces with straight interfaces that only throw business exceptions, and...
This should get your started.
Is your transaction manager loaded? When my tests depend on dependency injection, I have tests which test for non-null values of the items inserted by the test framework, even if they use setter...
As long as the TransactionManager uses the same DataSource as the SqlMapClientTemplate, and you start the transaction in the same thread as the SqlMapClientTemplate call, it should use the same...
I don't think this is an issue because DataSourceTransactionManager has to turn autocommit off to make sure transactions don't commit until it says so. I've used...
This is your problem:
This causes your DAO (which I assume has appropriate annotations for transactions) to be wrapped in a proxy which will commit your transactions before the test has a chance to...
Actually when you are using transactions programatically, the code should use the same transaction until you rollback or commit, not when a particular method exits. That only occurs when you are...
Its not unusual to have a single BeanFactory for the whole application with all the components specified in XML. Maybe have each module have its own XML and then the application loads several XMLs...
You can accomplish this entirely in Spring. Take a look at this thread. It basically entails creating multiple session factories. Its similar to concepts from the blog post Dynamic DataSource...
You can also have your setter/constructor take a java.io.File. Spring knows how to convert from a file system or classpath reference into a File. You should be able to use the level of abstraction...
You could wrap your iBatis DAO in a ProxyFactory bean and add a RetryInterceptor. You would also need to add some sort of exception transaction to indicate which exceptions are going to be retried. ...
What is the type of the object? Looking at the source code, your defintion should return what a normal JNDI lookup would return, which in this case would probably be a remote reference to your EJB...
There should be in an FAQ :)
Take a look at this thread
Spring uses a standard logger library (commons-logging for 1.2, something else for later), that will pick up whatever logger you are using (like log4j or JDK1.4 logging). So you would want to turn...
Based on the stack trace, I did a quick search and someone solved their problem:
Apparently it seems related to too many relationships and not enough lazy loading.
It depends on your exception translation strategy. Its possible that different DAO exceptions will translate into different application exceptions, so its possible that you'll have more than one...
You'll want to make the method which makes those multiple calls tranactional. Check out the Spring reference manual on transactions the different options.
Check out HotSwappableTargetSource. I think the reference guide and javadoc should point you in the right direction.
If there is an exception and you want to handle it, then you should. Perhaps translate the DataAccessException into another exception that is relevant to your application. Its not unusual for your...
Depending on how you use transactions, you can use setRollbackOnly or throw an exception to rollback a query.
And it does indeed rollback all the way to the database.
However, this code runs in...
Java already has a class: http://www.devx.com/tips/Tip/14667
JdbcDaoSupport is a support class which has both DataSource and JdbcTemplate setters. If JdbcTemplate isn't set, one is constructed from a DataSource. It gives you the flexibility of setting...