@Dispose(order = 10) public void stop() { // We are nice and stop the persist service at the end... persistService.stop(); }
@Start(order = 10) public void start() { persistService.start(); // At this point JPA is started and ready. }
@Override public Object invoke(MethodInvocation invocation) throws Throwable { if (null == didWeStartWork.get()) { unitOfWork.begin(); didWeStartWork.set(Boolean.TRUE); } else { // If unit of work already started we don't do anything here... // another UnitOfWorkInterceptor point point will take care... // This happens if you are nesting your calls. return invocation.proceed(); } try { return invocation.proceed(); } finally { if (null != didWeStartWork.get()) { didWeStartWork.remove(); unitOfWork.end(); } } }
@Transactional private static class DefaultTransactionalDummy { private DefaultTransactionalDummy() { } } }
public static void beginUnitOfWork() { //try { unitOfWork.begin(); //} catch (IllegalStateException ex) { // unitOfWork.end(); //unitOfWork.begin(); // } }
@Override protected void bindInterceptor(final Matcher<? super Class<?>> classMatcher, final Matcher<? super Method> methodMatcher, final MethodInterceptor... interceptors) { // hack to correctly bind @Transactional annotation for java8: // aop tries to intercept synthetic methods which cause a lot of warnings // (and generally not correct) super.bindInterceptor(classMatcher, new AbstractMatcher<Method>() { @Override public boolean matches(final Method method) { return !method.isSynthetic() && !method.isBridge() && methodMatcher.matches(method); } }, interceptors); }
@Transactional private static class Internal {} }
@Override public void init(FilterConfig filterConfig) throws ServletException { persistService.start(); }
@Override public void stop() { persistService.stop(); } }
@Transactional private static class Internal {}
@Override public void init(FilterConfig filterConfig) throws ServletException { persistService.start(); }
@Override public void destroy() { persistService.stop(); }
@Transactional private static class Internal {}
@Override public void destroy() { persistService.stop(); }
@Transactional private boolean _isSchedulingServiceEnabled() { synchronized (_serviceManagementRecordService) { return _serviceManagementRecordService.isServiceEnabled(Service.SCHEDULING); } }
@Transactional private boolean _isSchedulingServiceEnabled() { synchronized (_serviceManagementRecordService) { return _serviceManagementRecordService.isServiceEnabled(Service.SCHEDULING); } }
@Transactional private boolean _isSchedulingServiceEnabled() { synchronized (_serviceManagementRecordService) { return _serviceManagementRecordService.isServiceEnabled(Service.SCHEDULING); } }
@Transactional private boolean _isSchedulingServiceEnabled() { synchronized (_serviceManagementRecordService) { return _serviceManagementRecordService.isServiceEnabled(Service.SCHEDULING); } }
@Override @Transactional public Dashboard getRuntimeDashboard() { requireNotDisposed(); return _getDashboardForScope("Runtime Dashboard", "argus.jvm"); }