Search:

Type: Posts; User: wpoitras; Keyword(s):

Page 1 of 20 1 2 3 4

Search: Search took 0.06 seconds; generated 36 minute(s) ago.

  1. If your DAOs extends JdbcDaoSupport, you have the...

    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...
  2. How many threads are executing this code? The...

    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
  3. You only list one parameter (besides the...

    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...
  4. I would recommend that all of your services...

    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...
  5. Replies
    4
    Views
    1,372

    This...

    This should get your started.
  6. Is your transaction manager loaded? When my...

    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...
  7. As long as the TransactionManager uses the same...

    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...
  8. I don't think this is an issue because...

    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...
  9. This is your problem: This causes your DAO...

    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...
  10. Actually when you are using transactions...

    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...
  11. Replies
    1
    Views
    798

    Its not unusual to have a single BeanFactory for...

    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...
  12. You can accomplish this entirely in Spring. Take...

    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...
  13. Replies
    3
    Views
    7,677

    You can also have your setter/constructor take a...

    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...
  14. Replies
    4
    Views
    2,454

    You could wrap your iBatis DAO in a ProxyFactory...

    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. ...
  15. Replies
    14
    Views
    5,129

    What is the type of the object? Looking at the...

    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...
  16. Replies
    4
    Views
    1,919

    There should be in an FAQ :) Take a look at...

    There should be in an FAQ :)

    Take a look at this thread
  17. Replies
    2
    Views
    947

    Spring uses a standard logger library...

    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...
  18. Replies
    6
    Views
    7,437

    Based on the stack trace, I did a quick search...

    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.
  19. Replies
    3
    Views
    837

    It depends on your exception translation...

    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...
  20. Replies
    2
    Views
    792

    You'll want to make the method which makes those...

    You'll want to make the method which makes those multiple calls tranactional. Check out the Spring reference manual on transactions the different options.
  21. Check out HotSwappableTargetSource. I think the...

    Check out HotSwappableTargetSource. I think the reference guide and javadoc should point you in the right direction.
  22. Replies
    3
    Views
    837

    If there is an exception and you want to handle...

    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...
  23. Depending on how you use transactions, you can...

    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...
  24. Java already has a class:...

    Java already has a class: http://www.devx.com/tips/Tip/14667
  25. Replies
    1
    Views
    1,178

    JdbcDaoSupport is a support class which has both...

    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...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4