[ 
https://issues.apache.org/jira/browse/NIFIREG-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16173539#comment-16173539
 ] 

ASF GitHub Bot commented on NIFIREG-18:
---------------------------------------

Github user kevdoran commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/10#discussion_r140035681
  
    --- Diff: 
nifi-registry-web-api/src/main/java/org/apache/nifi/registry/NiFiRegistryApiApplication.java
 ---
    @@ -14,27 +14,41 @@
      * See the License for the specific language governing permissions and
      * limitations under the License.
      */
    -package org.apache.nifi.registry.web;
    +package org.apache.nifi.registry;
     
     import org.springframework.boot.SpringApplication;
     import org.springframework.boot.autoconfigure.SpringBootApplication;
     import org.springframework.boot.builder.SpringApplicationBuilder;
     import org.springframework.boot.web.support.SpringBootServletInitializer;
    -import org.springframework.context.annotation.ComponentScan;
    +
    +import java.util.Properties;
     
     /**
      * Main class for starting the NiFi Registry Web API as a Spring Boot 
application.
      *
    - * By default, Spring Boot will only scan in the package this class is 
located in, so we set
    - * @ComponentScan to the common parent package to find beans in other 
packages.
    + * This class is purposely in the org.apache.nifi.registry package since 
that is the common base
    + * package across other modules. This is done because spring-boot will use 
the package of this
    + * class to automatically scan for beans/config/entities/etc. and would 
otherwise require
    + * configuring custom packages to scan in several different places.
      */
     @SpringBootApplication
    -@ComponentScan("org.apache.nifi.registry")
     public class NiFiRegistryApiApplication extends 
SpringBootServletInitializer {
     
    +    public static final String NIFI_REGISTRY_PROPERTIES_ATTRIBUTE = 
"nifi-registry.properties";
    +
         @Override
         protected SpringApplicationBuilder configure(SpringApplicationBuilder 
application) {
    -        return application.sources(NiFiRegistryApiApplication.class);
    +        final Properties fixedProps = new Properties();
    +        fixedProps.setProperty("spring.jpa.hibernate.ddl-auto", "none");
    +        
fixedProps.setProperty("spring.jpa.hibernate.naming.physical-strategy", 
"org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl");
    +
    +        // turn on to debug
    +        fixedProps.setProperty("spring.jpa.show-sql", "true");
    +        fixedProps.setProperty("spring.h2.console.enabled", "true");
    --- End diff --
    
    Did you intend to commit these debug props or was that included 
accidentally?


> Refactor MetadataProvider to use an embedded database
> -----------------------------------------------------
>
>                 Key: NIFIREG-18
>                 URL: https://issues.apache.org/jira/browse/NIFIREG-18
>             Project: NiFi Registry
>          Issue Type: Improvement
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Minor
>
> We need to leverage transactions when persisting data to avoid inconsistent 
> states. Currently the MetadataProvider is based on an XML file which doesn't 
> offer much way to rollback an operation. We should switch to using an 
> embedded database.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to