persistence.xml outside /src/main/resources;
check if the persistence.xml has transaction-type="RESOURCE_LOCAL" and points as error;
check if property name="hibernate.hbm2ddl.auto" value="update" or "create-drop" or "create" and points as error;
check if the persistence.xml has transaction-type="JTA" HAS A jta-data-source tag bellow (as its son).
Does SonarQube 5.2 has JPA rules to criticize it? Is it possible? How?
--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/DEUALanUIu4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/a1d69c89-ad9e-4e95-a895-b7d5c528feab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
My intention is to enforce the use of jta-data-source instead of the non-jta-data-source, both tags that are allowed but since I am enforcing the use of JTA I must not allow non jta configurations.
Em ter, 3 de jan de 2017 às 17:49, G. Ann Campbell <ann.ca...@sonarsource.com> escreveu:
Hi Daniel,I've specified a couple rules based on this:
- RSPEC-3823
"RESOURCE_LOCAL" transaction type should not be used
- RSPEC-3822
Hibernate should not update database schemasand I'm wondering about a 3rd rule. What happens if a JTA persistence-unit doesn't have a jta-data-source?Ann
On Thursday, 22 December 2016 18:08:25 UTC-5, Daniel Castro wrote:I am trying to standardize the coding quality rules where I work. One of our greatest offenders if the persistence.xml used by JPA. So, my intention is to find a way on our SonarQube 5.2 to not allow:persistence.xml outside /src/main/resources;
check if the persistence.xml has transaction-type="RESOURCE_LOCAL" and points as error;
check if property name="hibernate.hbm2ddl.auto" value="update" or "create-drop" or "create" and points as error;
check if the persistence.xml has transaction-type="JTA" HAS A jta-data-source tag bellow (as its son).
Does SonarQube 5.2 has JPA rules to criticize it? Is it possible? How?
--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/DEUALanUIu4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/a1d69c89-ad9e-4e95-a895-b7d5c528feab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The real deal is not if you have or not a jta-data-source inside a persistence-unit. It is possible to use it.The problem seems to be when you have a RESOURCE_LOCAL persistence-unit and a jta-data-source inside it.Quoting myself
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/CAEi9rULTLHOWtxOocvM6CBBcat9_yHVQN05mygocCfKgApVmqw%40mail.gmail.com.