Skip to content
Advertisement

Tag: spring

Apache Camel bean parameter binding issue with Spring DSL

I am running into a strange issue with Apache Camel and Spring DSL. Here is an excerpt of my Spring defined route: Everything works fine up until the last line that I posted. The extractDocumentRootOid(Exchange exchange) java method is executed and the result is stored to the documentRootOid header. The getOrganizationByOid(Exchange exchange, String oid) java method is executed and the

Spring Data Rest – Soft Delete

I’ve been using spring data rest without any problem but now I have a requirement that when a user performs a DELETE operation on a given entity i.e. DELETE /accounts/<id> I need to set a flag on the database marking that entity as deleted but i do want to keep the record. Basically this means that I need to do

Spring Batch restart persistent jobs after abnormal termination

I have a following Spring Batch Job config: I’m starting the job with a following code: This is my test tasklet: I use H2 database as a persistent storage for my jobs. During the jobs execution I’m terminating my application. Right after application restart I expect that all uncompleted jobs will continue execution from terminated steps but nothing happens. Also,

How to suppress violations in PMD?

When I run a PMD analysis I receive violation: Each class should declare at least one constructor This violation is on a Spring controller. This controller is instantiated by Spring, so I shouldn’t need to invoke this class. What is recommended way of ignoring this violation? According to this doc can use //NOPMD but I just want to ignore specific

Spring – No EntityManager with actual transaction available for current thread – cannot reliably process ‘persist’ call

I get this error when trying to invoke “persist” method to save entity model to database in my Spring MVC web application. Can’t really find any post or page in internet that can relate to this particular error. It seems like something’s wrong with EntityManagerFactory bean but i’m fairly new to Spring programming so for me it seems like everything

Advertisement