Проект, которому я был назначен, использует XML-файлы для создания конфигураций AOP.
Part1:
AOP, настроенный в моем XML-файле:
<aop:config>
<aop:advisor advice-ref="txAdvice" pointcut="execution(public * com.RR..manager..*.*(..)) &&
!execution(public * com.RR.DD.manager.IMan.isNonProductionEnvironment(..)) &&
!execution(public * com.RR.DD.manager.IMan.isProductionEnvironment(..))" />
<aop:advisor advice-ref="txAdvice" pointcut="execution(public * com.highradius..manager..*.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut="execution(public * com.scraper.correspondence..manager..*.*(..))" />
</aop:config>
Может кто-нибудь объяснить, что делается здесь, там.У меня есть представление о том, что делает срез точки, но здесь я не могу понять, что означают эти слова «&», и все это в целом озадачивает меня.
Part2:
Также причина, по которой я исследуюэто потому, что я получаю исключение "javax.persistence.TransactionRequiredException: транзакция не выполняется":
javax.persistence.TransactionRequiredException: no transaction is in progress
at org.hibernate.internal.SessionImpl.checkTransactionNeeded(SessionImpl.java:3466) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1426) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1422) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
at org.springframework.orm.hibernate5.SessionFactoryUtils.flush(SessionFactoryUtils.java:144) ~[spring-orm-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.orm.hibernate5.SpringSessionSynchronization.beforeCommit(SpringSessionSynchronization.java:95) ~[spring-orm-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95) ~[spring-tx-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:936) ~[spring-tx-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:748) ~[spring-tx-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:734) ~[spring-tx-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:518) ~[spring-tx-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292) ~[spring-tx-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) ~[spring-aop-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at com.sun.proxy.$Proxy148.isTriggerEmailForNonProdEnvironment(Unknown Source) ~[?:?]
at com.scraper.EmailManagement.filterEmailAddress(EmailManagement.java:525) ~[agent_base-18.6.0-SNAPSHOT-falconfit.jar:?]
at com.scraper.EmailManagement.sendMailWithTemplateAndCc(EmailManagement.java:637) ~[agent_base-18.6.0-SNAPSHOT-falconfit.jar:?]
at com.highradius.eci.agentframework.executor.impl.ECIStandardJobExecutor.sendJobStatusMailNotifiation(ECIStandardJobExecutor.java:823) ~[eci_framework-18.6.0-SNAPSHOT-falconfit.jar:?]
at com.highradius.eci.agentframework.executor.impl.ECIStandardJobExecutor.executeJob(ECIStandardJobExecutor.java:458) ~[eci_framework-18.6.0-SNAPSHOT-falconfit.jar:?]
at com.highradius.eci.agentframework.ECIStandardAction.run(ECIStandardAction.java:89) ~[eci_framework-18.6.0-SNAPSHOT-falconfit.jar:?]
at com.scraper.ScheduledAgentLauncher.immediatelyLaunchScheduledAgent(ScheduledAgentLauncher.java:365) ~[agent_base-18.6.0-SNAPSHOT-falconfit.jar:?]
at com.scraper.WrapperAgentAction.run(WrapperAgentAction.java:182) ~[agent_base-18.6.0-SNAPSHOT-falconfit.jar:?]
at sun.reflect.GeneratedMethodAccessor3068.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101]
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:265) ~[spring-core-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:257) ~[spring-context-support-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:75) ~[spring-context-support-4.3.15.RELEASE.jar:4.3.15.RELEASE]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.3.jar:?]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[quartz-2.2.3.jar:?]
Строка в исключении "в com.sun.proxy. $ Proxy148.isTriggerEmailForNonProdEnvironment (Неизвестный источник) ~ [?:?] "о функции" isTriggerEmailForNonProdEnvironment ", объявленной в интерфейсе Iman и определенной классом ImanImpl.
Будет полезна помощь по любой части.