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

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

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

    https://github.com/apache/nifi-registry/pull/10#discussion_r140073712
  
    --- 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 --
    
    The way I thought this was working was that even with those set to true, 
the logging didn't take place unless you also changed the levels in logback.xml 
as mentioned in your next comment, but apparently that is not true since you 
saw the output in bootstrap.log :)  


> 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