org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor Java Examples
The following examples show how to use
org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CodelessDaoFactoryBean.java From sca-best-practice with Apache License 2.0 | 5 votes |
@Override public CodelessDao getObject() { ProxyFactory result = new ProxyFactory(); result.setTarget(codelessDaoProxy); result.setInterfaces(CodelessDao.class, SpringProxy.class); result.addAdvice(SurroundingTransactionDetectorMethodInterceptor.INSTANCE); result.addAdvisor(ExposeInvocationInterceptor.ADVISOR); result.addAdvice(new DefaultMethodInvokingMethodInterceptor()); return (CodelessDao)result.getProxy(classLoader); }
Example #2
Source File: AbstractEbeanQueryExecution.java From spring-data-ebean with Apache License 2.0 | 5 votes |
@Override protected Object doExecute(final AbstractEbeanQuery ebeanQuery, Object[] values) { if (!SurroundingTransactionDetectorMethodInterceptor.INSTANCE.isSurroundingTransactionActive()) { throw new InvalidDataAccessApiUsageException(NO_SURROUNDING_TRANSACTION); } EbeanQueryWrapper createQuery = ebeanQuery.createQuery(values); return createQuery.findStream(); }
Example #3
Source File: MybatisQueryExecution.java From spring-data-mybatis with Apache License 2.0 | 5 votes |
@Override protected Object doExecute(AbstractMybatisQuery query, Object[] values) { if (!SurroundingTransactionDetectorMethodInterceptor.INSTANCE .isSurroundingTransactionActive()) { throw new InvalidDataAccessApiUsageException(NO_SURROUNDING_TRANSACTION); } return null; }